]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pthread.c
eamad: release the reference frame on video size changes
[ffmpeg] / libavcodec / pthread.c
index 08104914eec182f505781f74573141d5f98006ba..454e51f55519edd88827e6d8645e8a40a80c54aa 100644 (file)
@@ -32,6 +32,7 @@
 #include <pthread.h>
 
 #include "avcodec.h"
+#include "internal.h"
 #include "thread.h"
 
 typedef int (action_func)(AVCodecContext *c, void *arg);
@@ -787,6 +788,8 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
 
     f->owner = avctx;
 
+    ff_init_buffer_info(avctx, f);
+
     if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
         f->thread_opaque = NULL;
         return avctx->get_buffer(avctx, f);