On Sun, Aug 21, 2011 at 11:37:42PM +0300, Uoti Urpala wrote:
> On Sat, 2011-08-20 at 18:14 +0200, Kostya Shishkov wrote:
> > +static void wavpack_decode_flush(AVCodecContext *avctx)
> > +{
> > +    WavpackContext *s = avctx->priv_data;
> > +    int i;
> > +
> > +    for (i = 0; i < s->fdec_num; i++)
> > +        s->fdec[i]->samples_left = 0;
> > +}
> 
> This doesn't work, playback still produces "CRC error" messages after
> flushing if that happens in the middle of a packet. Adding
> "wv_reset_saved_context(s->fdec[i]);" in the loop seems to fix it.
> 
> However, that playback broke _permanently_ due to this suggests that
> recovery from CRC errors is also broken - I assume it's not supposed to
> drop all future packets too after seeing one error? Probably there
> should be a similar reset after reporting a CRC error too.

In theory setting samples_left to zero should be enough to clear decoding
status and decode new packet fresh from the start.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to