]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nuv.c
avdevice/decklink: 10 Bit support for Decklink input device
[ffmpeg] / libavformat / nuv.c
index e7f0eeae8e2577e10b83bb439a6d4e6ce3c28d73..65d2e56f19f4d3a8796542ecf73213482f490307 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/channel_layout.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/intfloat.h"
 #include "avformat.h"
@@ -185,6 +186,10 @@ static int nuv_header(AVFormatContext *s)
             return AVERROR(ENOMEM);
         ctx->v_id = vst->index;
 
+        ret = av_image_check_size(width, height, 0, ctx);
+        if (ret < 0)
+            return ret;
+
         vst->codec->codec_type            = AVMEDIA_TYPE_VIDEO;
         vst->codec->codec_id              = AV_CODEC_ID_NUV;
         vst->codec->width                 = width;