[FFmpeg-cvslog] avformat/mpegts: Warn if ffio_ensure_seekback() failed

Michael Niedermayer git at videolan.org
Sat Dec 6 20:56:46 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec  6 20:08:08 2014 +0100| [a4f387bf56a6285d926b4b5a467a4114efbd19b1] | committer: Michael Niedermayer

avformat/mpegts: Warn if ffio_ensure_seekback() failed

Should silence CID1257005

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpegts.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index f4250c8..74ae4fa 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2454,7 +2454,8 @@ static int mpegts_read_header(AVFormatContext *s)
     int len;
     int64_t pos, probesize = s->probesize ? s->probesize : s->probesize2;
 
-    ffio_ensure_seekback(pb, probesize);
+    if (ffio_ensure_seekback(pb, probesize) < 0)
+        av_log(s, AV_LOG_WARNING, "Failed to allocate buffers for seekback\n");
 
     /* read the first 8192 bytes to get packet size */
     pos = avio_tell(pb);



More information about the ffmpeg-cvslog mailing list