1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

segment: Check av_get_frame_filename() return value

CC: libav-stable@libav.org
Bug-Id: CID 1265713
This commit is contained in:
Vittorio Giovara 2015-01-22 20:13:45 +00:00
parent 7915e6741d
commit 3a6dfec864

View File

@ -105,7 +105,11 @@ static int segment_hls_window(AVFormatContext *s, int last)
if (seg->entry_prefix) { if (seg->entry_prefix) {
avio_printf(seg->pb, "%s", seg->entry_prefix); avio_printf(seg->pb, "%s", seg->entry_prefix);
} }
av_get_frame_filename(buf, sizeof(buf), s->filename, i); ret = av_get_frame_filename(buf, sizeof(buf), s->filename, i);
if (ret < 0) {
ret = AVERROR(EINVAL);
goto fail;
}
avio_printf(seg->pb, "%s\n", buf); avio_printf(seg->pb, "%s\n", buf);
} }