X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=inline;f=libavformat%2Fmtv.c;h=e731d91077104ffc2b76c4e61d94065d0518039b;hb=a04ad248a05e7b613abe09b3bb067f555108d794;hp=dcf4aa428807203440f2d0761e8d9494bca67adf;hpb=398000abcf980d239a789da6f69811913d2fc635;p=ffmpeg diff --git a/libavformat/mtv.c b/libavformat/mtv.c index dcf4aa42880..e731d910771 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -51,7 +51,7 @@ typedef struct MTVDemuxContext { } MTVDemuxContext; -static int mtv_probe(AVProbeData *p) +static int mtv_probe(const AVProbeData *p) { /* we need at least 57 bytes from the header * to try parsing all required fields @@ -171,6 +171,8 @@ static int mtv_read_header(AVFormatContext *s) st->codecpar->width = mtv->img_width; st->codecpar->height = mtv->img_height; st->codecpar->extradata = av_strdup("BottomUp"); + if (!st->codecpar->extradata) + return AVERROR(ENOMEM); st->codecpar->extradata_size = 9; // audio - mp3