Unbreak direct streamcopy.
---
 libavdevice/v4l2.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 1bcd39f..885e9ec 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -732,6 +732,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;
-- 
1.7.8.rc1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to