1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/movenc: fix cleanup on insufficient reserved_moov_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-25 14:28:43 +01:00
parent c50ddc10b2
commit 47785b44b5

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);
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");