[FFmpeg-devel] [PATCH 4/4] livavdevice/decklink: Don't allow any codecs but V210 and UYVY422

Marton Balint cus at passwd.hu
Sat Sep 30 23:42:27 EEST 2017



On Tue, 26 Sep 2017, Devin Heitmueller wrote:

> Make sure that codecs other than V210 or wrapped avframes with
> uyvy422 video are passed to decklink output (which would result
> in undefined behavior).
>
> Signed-off-by: Devin Heitmueller <dheitmueller at ltnglobal.com>
> ---
> libavdevice/decklink_enc.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
> index 0d965699ec..8f08ded933 100644
> --- a/libavdevice/decklink_enc.cpp
> +++ b/libavdevice/decklink_enc.cpp
> @@ -159,6 +159,10 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st)
>                    " Only AV_PIX_FMT_UYVY422 is supported.\n");
>             return -1;
>         }
> +    } else if (c->codec_id != AV_CODEC_ID_V210) {
> +        av_log(avctx, AV_LOG_ERROR, "Unsupported codec type!"
> +               " Only V210 and wrapped frame with AV_PIX_FMT_UYVY422 are supported.\n");
> +        return -1;

I think you should squash this with the previous patch.

Regards,
Marton


More information about the ffmpeg-devel mailing list