]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pthread.c
vda: undef Picture.
[ffmpeg] / libavcodec / pthread.c
index 96db9aec9cb030b0b4b77f1e199a9f064734692b..8eff782fcb02396ddf089336cd4541790be914f1 100644 (file)
@@ -38,6 +38,8 @@
 #include <pthread.h>
 #elif HAVE_W32THREADS
 #include "w32pthreads.h"
+#elif HAVE_OS2THREADS
+#include "os2threads.h"
 #endif
 
 typedef int (action_func)(AVCodecContext *c, void *arg);
@@ -363,8 +365,8 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src,
     }
 
     if (for_user) {
+        dst->delay         = src->thread_count - 1;
         dst->coded_frame   = src->coded_frame;
-        dst->has_b_frames += src->thread_count - 1;
     } else {
         if (dst->codec->update_thread_context)
             err = dst->codec->update_thread_context(dst, src);
@@ -686,7 +688,6 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
     av_freep(&fctx->threads);
     pthread_mutex_destroy(&fctx->buffer_mutex);
     av_freep(&avctx->thread_opaque);
-    avctx->has_b_frames -= avctx->thread_count - 1;
 }
 
 static int frame_thread_init(AVCodecContext *avctx)