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>
This commit is contained in:
Alexander Strange
2011-02-07 21:15:44 -05:00
committed by Michael Niedermayer
parent 8a278ad30d
commit b38f008ea6
11 changed files with 1068 additions and 10 deletions

View File

@ -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 &&