[FFmpeg-cvslog] Read h264 headers from v4l2 to allow stream-copying.
Carl Eugen Hoyos
git at videolan.org
Thu Sep 5 23:12:50 CEST 2013
ffmpeg | branch: release/1.1 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Sep 1 20:20:47 2013 +0200| [1a65ce923a67329beb450ac3502dc023dc94b57b] | committer: Carl Eugen Hoyos
Read h264 headers from v4l2 to allow stream-copying.
Fixes ticket #2882.
Analyzed and tested by William C Bonner.
(cherry picked from commit e337c9d56408dc00a15887309488a1ff5cb06ba3)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a65ce923a67329beb450ac3502dc023dc94b57b
---
libavdevice/v4l2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index b2e5fed..88cacd9 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -882,6 +882,9 @@ static int v4l2_read_header(AVFormatContext *s1)
if (codec_id == AV_CODEC_ID_RAWVIDEO)
st->codec->codec_tag =
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
+ else if (codec_id == AV_CODEC_ID_H264) {
+ st->need_parsing = AVSTREAM_PARSE_HEADERS;
+ }
if (desired_format == V4L2_PIX_FMT_YVU420)
st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');
st->codec->width = s->width;
More information about the ffmpeg-cvslog
mailing list