[FFmpeg-cvslog] avformat/movenc: fix cleanup on insufficient reserved_moov_size

Michael Niedermayer git at videolan.org
Sun Jan 25 15:08:53 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 25 14:28:43 2015 +0100| [47785b44b554bb4d93e28cbfa114ef8a51d32203] | committer: Michael Niedermayer

avformat/movenc: fix cleanup on insufficient reserved_moov_size

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

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

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

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 29535cd..8b06623 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5160,7 +5160,8 @@ static int mov_write_trailer(AVFormatContext *s)
             size = mov->reserved_moov_size - (avio_tell(pb) - mov->reserved_moov_pos);
             if (size < 8){
                 av_log(s, AV_LOG_ERROR, "reserved_moov_size is too small, needed %"PRId64" additional\n", 8-size);
-                return -1;
+                res = AVERROR(EINVAL);
+                goto error;
             }
             avio_wb32(pb, size);
             ffio_wfourcc(pb, "free");



More information about the ffmpeg-cvslog mailing list