On Mon, 7 Jan 2013 07:54:57 -0800, "Ronald S. Bultje" <[email protected]> wrote: > Hi, > > On Jan 7, 2013 4:24 AM, "Anton Khirnov" <[email protected]> wrote: > > > > I.e. don't do anything on already released frames. > > --- > > libavcodec/pthread.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c > > index cd330fc..751fca8 100644 > > --- a/libavcodec/pthread.c > > +++ b/libavcodec/pthread.c > > @@ -981,6 +981,9 @@ void ff_thread_release_buffer(AVCodecContext *avctx, > AVFrame *f) > > PerThreadContext *p = avctx->thread_opaque; > > FrameThreadContext *fctx; > > > > + if (!f->data[0]) > > + return; > > + > > if (!(avctx->active_thread_type&FF_THREAD_FRAME)) { > > avctx->release_buffer(avctx, f); > > return; > > Shouldn't it assert? This is a bug. >
It's more convenient. I don't see how it's better to have a duplicate if(frame->data[0]) check in every single place release_buffer is called. Also that's the way free() behaves. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
