diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 02:03:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 02:03:14 +0100 |
commit | 0bd42ae72c0e88826b823d8106286d5abe2028e7 (patch) | |
tree | da7087d1f67ea54580026e30dcedb4f58db6aba6 /libavformat/matroskaenc.c | |
parent | 5955c63c36e9b822f1186cd45a8dec5056b9c575 (diff) | |
parent | 1c8c41ff079953d332f61a9d26656e4e36af606c (diff) | |
download | ffmpeg-0bd42ae72c0e88826b823d8106286d5abe2028e7.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avformat: Avoid a warning about mixed declarations and code
BMV demuxer and decoder
matroskaenc: Make sure the seekhead struct is freed even on seek failure
mpeg12enc: Remove write-only variables.
mpeg12enc: Don't set up run-level info for level 0.
msmpeg4: Don't set up run-level info for level 0.
avformat: Warn about using network functions without calling avformat_network_init
avformat: Revise wording
rdt: Set AVFMT_NOFILE on ff_rdt_demuxer
rdt: Check the return value of avformat_open
rtsp: Discard the dynamic handler, if it has an alloc function which failed
dsputil: use cpuflags in x86 versions of vector_clip_int32()
Conflicts:
libavcodec/avcodec.h
libavcodec/version.h
libavformat/Makefile
libavformat/allformats.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 131a7498af..f22e084449 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -317,9 +317,12 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead) currentpos = avio_tell(pb); - if (seekhead->reserved_size > 0) - if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0) - return -1; + if (seekhead->reserved_size > 0) { + if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0) { + currentpos = -1; + goto fail; + } + } metaseek = start_ebml_master(pb, MATROSKA_ID_SEEKHEAD, seekhead->reserved_size); for (i = 0; i < seekhead->num_entries; i++) { @@ -343,6 +346,7 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead) currentpos = seekhead->filepos; } +fail: av_free(seekhead->entries); av_free(seekhead); |