* @see doc/multithreading.txt
*/
- #include <pthread.h>
-
+ #include "config.h"
#include "avcodec.h"
+#include "internal.h"
#include "thread.h"
+ #if HAVE_PTHREADS
+ #include <pthread.h>
+ #elif HAVE_W32THREADS
+ #include "w32pthreads.h"
+ #endif
+
typedef int (action_func)(AVCodecContext *c, void *arg);
typedef int (action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr);
if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
return -1;
- avctx->pkt = avpkt;
-
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
- if (HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
+ av_packet_split_side_data(avpkt);
+ avctx->pkt = avpkt;
+ if (HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr,
avpkt);
else {