aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2011-12-27 07:41:01 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-01-04 13:10:20 +0100
commitcd2bbad3032780f8d4536aed15b3f5f45b95859c (patch)
tree7e5bc90b8148b28aa253e046b72f8f85d2e6d887
parenteb89b4fc0994d682cd3f24b882164439c8c3af28 (diff)
downloadffmpeg-cd2bbad3032780f8d4536aed15b3f5f45b95859c.tar.gz
v4l2: set the proper codec_tag
Unbreak direct streamcopy.
-rw-r--r--libavdevice/v4l2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 1e4274c84b..cde2f9f317 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -689,6 +689,9 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = codec_id;
+ if (codec_id == CODEC_ID_RAWVIDEO)
+ st->codec->codec_tag =
+ avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
st->codec->width = s->width;
st->codec->height = s->height;
st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;