diff options
author | Alexander Strange <astrange@ithinksw.com> | 2011-02-07 21:15:44 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-11 02:53:58 +0100 |
commit | b38f008ea64cc5c0087fc9804569338ef005897c (patch) | |
tree | 010130d14be559e429b24181c83cd5bade94909c /libavformat/utils.c | |
parent | 8a278ad30d6f9a428c71dfab5bd6fe68d4717094 (diff) | |
download | ffmpeg-b38f008ea64cc5c0087fc9804569338ef005897c.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.c | 6 |
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 && |