1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavd/v4l2: Use AVSTREAM_PARSE_FULL_ONCE when reading a h264 stream.

Reported, debugged and tested by trac user noah.
Fixes ticket #4644.
This commit is contained in:
Carl Eugen Hoyos 2015-08-04 14:59:26 +02:00
parent 3f87a17063
commit 4c4f14c717

View File

@ -966,7 +966,7 @@ static int v4l2_read_header(AVFormatContext *ctx)
st->codec->codec_tag = st->codec->codec_tag =
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
else if (codec_id == AV_CODEC_ID_H264) { else if (codec_id == AV_CODEC_ID_H264) {
st->need_parsing = AVSTREAM_PARSE_HEADERS; st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
} }
if (desired_format == V4L2_PIX_FMT_YVU420) if (desired_format == V4L2_PIX_FMT_YVU420)
st->codec->codec_tag = MKTAG('Y', 'V', '1', '2'); st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');