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

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Apr 6 23:09:41 EEST 2017


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.



More information about the ffmpeg-devel mailing list