Commit 53928e0b authored by Steven Liu's avatar Steven Liu

avformat/mtv: check av_strdup() return value

Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent f5263172
...@@ -171,6 +171,8 @@ static int mtv_read_header(AVFormatContext *s) ...@@ -171,6 +171,8 @@ static int mtv_read_header(AVFormatContext *s)
st->codecpar->width = mtv->img_width; st->codecpar->width = mtv->img_width;
st->codecpar->height = mtv->img_height; st->codecpar->height = mtv->img_height;
st->codecpar->extradata = av_strdup("BottomUp"); st->codecpar->extradata = av_strdup("BottomUp");
if (!st->codecpar->extradata)
return AVERROR(ENOMEM);
st->codecpar->extradata_size = 9; st->codecpar->extradata_size = 9;
// audio - mp3 // audio - mp3
......
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