aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-13 21:21:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-13 21:50:37 +0200
commit367d9b2957fa455b59f131fd6bee896cb7ed6600 (patch)
tree4c6f6a32752bc64d7aea93e37d4bd5666cd6ecb9 /libavformat
parent62e5ef95cacb29b5ee3149792f12f9204dbd1655 (diff)
parentef0ee7f657e66d91162d2b4fad882ece9fbb264e (diff)
downloadffmpeg-367d9b2957fa455b59f131fd6bee896cb7ed6600.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: swscale: K&R formatting cosmetics (part II) tiffdec: Add a malloc check and refactor another. faxcompr: Check malloc results and unify return path configure: escape colons in values written to config.fate ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE matroska: Fix leaking memory allocated for laces. pthread: Fix crash due to fctx->delaying not being cleared. vp3: Assert on invalid filter_limit values. h264: fix 10bit biweight functions after recent x86inc.asm fixes. ffv1: Fix size mismatch in encode_line. movenc: Remove a dead initialization git-howto: Explain how to avoid Windows line endings in git checkouts. build: Move all arch OBJS declarations into arch subdirectory Makefiles. Conflicts: configure libavcodec/vp3.c libavformat/matroskadec.c libavutil/Makefile libswscale/Makefile libswscale/swscale.c libswscale/swscale_internal.h libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c13
-rw-r--r--libavformat/movenc.c2
2 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 856508ca77..2205af6894 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1940,8 +1940,8 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
if (size < cfs * h / 2) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt int4 RM-style audio packet size\n");
- av_free(lace_size);
- return AVERROR_INVALIDDATA;
+ res = AVERROR_INVALIDDATA;
+ goto end;
}
for (x=0; x<h/2; x++)
memcpy(track->audio.buf+x*2*w+y*cfs,
@@ -1950,16 +1950,16 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
if (size < w) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt sipr RM-style audio packet size\n");
- av_free(lace_size);
- return AVERROR_INVALIDDATA;
+ res = AVERROR_INVALIDDATA;
+ goto end;
}
memcpy(track->audio.buf + y*w, data, w);
} else {
if (size < sps * w / sps) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt generic RM-style audio packet size\n");
- av_free(lace_size);
- return AVERROR_INVALIDDATA;
+ res = AVERROR_INVALIDDATA;
+ goto end;
}
for (x=0; x<w/sps; x++)
memcpy(track->audio.buf+sps*(h*x+((h+1)/2)*(y&1)+(y>>1)), data+x*sps, sps);
@@ -2049,6 +2049,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
}
}
+end:
av_free(lace_size);
return res;
}
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1e0dab7e82..c99e854b25 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -939,7 +939,7 @@ static const AVCodecTag codec_3gp_tags[] = {
static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
{
- int tag = track->enc->codec_tag;
+ int tag;
if (track->mode == MODE_MP4 || track->mode == MODE_PSP)
tag = mp4_get_codec_tag(s, track);