X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmtv.c;h=26a0fd0ea4b60c55159e44bff2d3c8bc3e80efc2;hb=bc70684e74a185d7b80c8b80bdedda659cb581b8;hp=728f4a4781c48a801808057e26141a1920924628;hpb=4d8875ec23cf299277a0f028ea2ac99eb6f603c9;p=ffmpeg diff --git a/libavformat/mtv.c b/libavformat/mtv.c index 728f4a4781c..26a0fd0ea4b 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -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 @@ -223,7 +225,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_mtv_demuxer = { +const AVInputFormat ff_mtv_demuxer = { .name = "mtv", .long_name = NULL_IF_CONFIG_SMALL("MTV"), .priv_data_size = sizeof(MTVDemuxContext),