aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2011-02-07 21:15:44 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-09 09:17:28 -0500
commit37b00b47cbeecd66bb34c5c7c534d016d6e8da24 (patch)
treedce47f2343f8a0f0f73e09a787aa92f255f9aa0f /libavformat/utils.c
parentc2bd7578af069206831a9c25fa68c9bbd5004619 (diff)
downloadffmpeg-37b00b47cbeecd66bb34c5c7c534d016d6e8da24.tar.gz
Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8c3311f3bc..c21b922401 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -930,6 +930,12 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
/* do we have a video B-frame ? */
delay= st->codec->has_b_frames;
presentation_delayed = 0;
+
+ // ignore delay caused by frame threading so that the mpeg2-without-dts
+ // warning will not trigger
+ if (delay && st->codec->active_thread_type&FF_THREAD_FRAME)
+ delay -= st->codec->thread_count-1;
+
/* XXX: need has_b_frame, but cannot get it if the codec is
not initialized */
if (delay &&