[FFmpeg-cvslog] v4l2: set the proper codec_tag
Luca Barbato
git at videolan.org
Thu Jan 5 02:18:54 CET 2012
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Dec 27 07:41:01 2011 +0100| [cd2bbad3032780f8d4536aed15b3f5f45b95859c] | committer: Luca Barbato
v4l2: set the proper codec_tag
Unbreak direct streamcopy.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd2bbad3032780f8d4536aed15b3f5f45b95859c
---
libavdevice/v4l2.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 1e4274c..cde2f9f 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;
More information about the ffmpeg-cvslog
mailing list