summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-02 00:59:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-02 00:59:35 +0200
commitcf942994489210c9509ae811cd4fc0515c872f09 (patch)
tree5fd7e1c6f91a22898bc56d81d8ffe8fa95ba99a4
parent21dc3a3cc23c624630a4379f08a6efe0230de37a (diff)
parente337c9d56408dc00a15887309488a1ff5cb06ba3 (diff)
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Read h264 headers from v4l2 to allow stream-copying. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavdevice/v4l2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 33668c152f..c7cd5190ff 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -931,6 +931,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');
else if (desired_format == V4L2_PIX_FMT_YVU410)