[FFmpeg-cvslog] segment: Check av_get_frame_filename() return value

Vittorio Giovara git at videolan.org
Fri Jan 23 23:16:26 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Jan 22 20:13:45 2015 +0000| [3a6dfec864d569c2d0a875e1a7466f51b00edb63] | committer: Vittorio Giovara

segment: Check av_get_frame_filename() return value

CC: libav-stable at libav.org
Bug-Id: CID 1265713

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a6dfec864d569c2d0a875e1a7466f51b00edb63
---

 libavformat/segment.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index bcfd1f9..824bbf7 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -105,7 +105,11 @@ static int segment_hls_window(AVFormatContext *s, int last)
         if (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);
     }
 



More information about the ffmpeg-cvslog mailing list