mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
avformat/mpeg: check av_strdup() return value
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
1f7b527194
commit
f5263172de
@ -898,6 +898,11 @@ static int vobsub_read_header(AVFormatContext *s)
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
AVStream *sub_st = s->streams[i];
|
||||
sub_st->codecpar->extradata = av_strdup(header_str);
|
||||
if (!sub_st->codecpar->extradata) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
sub_st->codecpar->extradata_size = 0;
|
||||
goto end;
|
||||
}
|
||||
sub_st->codecpar->extradata_size = header.len;
|
||||
}
|
||||
av_free(header_str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user