|
@@ -251,6 +251,13 @@ static int h264_parse(AVCodecParserContext *s, |
|
|
h->got_first = 1; |
|
|
h->got_first = 1; |
|
|
if (avctx->extradata_size) { |
|
|
if (avctx->extradata_size) { |
|
|
h->s.avctx = avctx; |
|
|
h->s.avctx = avctx; |
|
|
|
|
|
// must be done like in the decoder. |
|
|
|
|
|
// otherwise opening the parser, creating extradata, |
|
|
|
|
|
// and then closing and opening again |
|
|
|
|
|
// will cause has_b_frames to be always set. |
|
|
|
|
|
// NB: estimate_timings_from_pts behaves exactly like this. |
|
|
|
|
|
if (!avctx->has_b_frames) |
|
|
|
|
|
h->s.low_delay = 1; |
|
|
ff_h264_decode_extradata(h); |
|
|
ff_h264_decode_extradata(h); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|