On Sun, Apr 26, 2020 at 11:26 PM David Manouchehri
<david.manouche...@riseup.net> wrote:
>
> Resubmit of a previous patch, not sure why the diff didn't come through.
> _______________________________________________
>
> @@ -56,7 +55,13 @@  static av_cold int write_header(AVFormatContext *s1)
>
>      par = s1->streams[0]->codecpar;
>
> -    v4l2_pixfmt = ff_fmt_ff2v4l(par->format, AV_CODEC_ID_RAWVIDEO);
> +    if(s1->streams[0]->codecpar->codec_id == AV_CODEC_ID_RAWVIDEO) {
> +        v4l2_pixfmt = ff_fmt_ff2v4l(par->format, AV_CODEC_ID_RAWVIDEO);
> +    }
> +    else {
> +        v4l2_pixfmt = ff_fmt_ff2v4l(AV_PIX_FMT_NONE, 
> s1->streams[0]->codecpar->codec_id);
> +    }
> +

Hi,

A small nit. Wouldn't the variable `par` be usable there that was just
created right on top of this if/else structure ? A la `par->codec_id`
instead of poking at s1->streams[0] again?

Otherwise looks good to me, linked this today on IRC as someone needed
to test a v4l2 device they were developing with MJPEG. Didn't work,
but that could be due to our MJPEG encoder adding all the metadata
headers etc into the bit stream.

Best regards,
Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to