X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmtv.c;h=e731d91077104ffc2b76c4e61d94065d0518039b;hb=18b3deee2256a8861fd292653c8dd3ef191ef893;hp=dcf4aa428807203440f2d0761e8d9494bca67adf;hpb=ce47f1589e9f5a6cf8372a269bdd862ff0cc3f91;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