[FFmpeg-devel] [PATCH] pthread_frame: don't return stale error codes after flush

wm4 nfxjfg at googlemail.com
Fri Apr 7 09:34:14 EEST 2017


On Thu, 06 Apr 2017 23:09:41 +0300
Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:

> On Thu, 2017-04-06 at 18:18 +0200, wm4 wrote:
> > > >          p->got_frame = 0;
> > > >          av_frame_unref(p->frame);
> > > > +        p->result = 0;  
> 
> Shouldn't p->result be similarly reset together with p->got_frame also
> in ff_thread_decode_frame()? A similar problem seems possible:
> - a normal decode call returns an error due to p->result being negative
> - drain packet is sent before cycling through all threads
> - the loop in ff_thread_decode_frame hits "if (p->result < 0)"
> Thus incorrectly returning the same error again from the drain packet.

Please send a patch.


More information about the ffmpeg-devel mailing list