if b frames are parsed, set codec->has_b_frames

Originally committed as revision 19147 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-06-11 04:30:05 +00:00
parent aa9b754ffc
commit 818062f2f3

View File

@ -751,6 +751,9 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
int num, den, presentation_delayed, delay, i; int num, den, presentation_delayed, delay, i;
int64_t offset; int64_t offset;
if (pc && pc->pict_type == FF_B_TYPE)
st->codec->has_b_frames = 1;
/* do we have a video B-frame ? */ /* do we have a video B-frame ? */
delay= st->codec->has_b_frames; delay= st->codec->has_b_frames;
presentation_delayed = 0; presentation_delayed = 0;