Ticket #2882: patchv4l2parseh264.diff

File patchv4l2parseh264.diff, 602 bytes (added by Carl Eugen Hoyos, 13 years ago)
  • libavdevice/v4l2.c

    diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
    index 33668c1..bea7f33 100644
    a b static int v4l2_read_header(AVFormatContext *s1)  
    931931    if (codec_id == AV_CODEC_ID_RAWVIDEO)
    932932        st->codec->codec_tag =
    933933            avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
     934    else if (codec_id == AV_CODEC_ID_H264) {
     935        st->need_parsing = AVSTREAM_PARSE_FULL;
     936    }
    934937    if (desired_format == V4L2_PIX_FMT_YVU420)
    935938        st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');
    936939    else if (desired_format == V4L2_PIX_FMT_YVU410)