Commit f955abe3 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e71149a7'

* commit 'e71149a7':
  nuv: validate image size
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents b04cbbe2 e71149a7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment