Browse Source

avformat/movenc: fix cleanup on insufficient reserved_moov_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
47785b44b5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/movenc.c

+ 2
- 1
libavformat/movenc.c View File

@@ -5160,7 +5160,8 @@ static int mov_write_trailer(AVFormatContext *s)
size = mov->reserved_moov_size - (avio_tell(pb) - mov->reserved_moov_pos); size = mov->reserved_moov_size - (avio_tell(pb) - mov->reserved_moov_pos);
if (size < 8){ if (size < 8){
av_log(s, AV_LOG_ERROR, "reserved_moov_size is too small, needed %"PRId64" additional\n", 8-size); 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); avio_wb32(pb, size);
ffio_wfourcc(pb, "free"); ffio_wfourcc(pb, "free");


Loading…
Cancel
Save