aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-21 10:47:14 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-21 10:47:14 +0000
commit2922cbdb14a69ca8f763182a9d70d13ddcdcd1ec (patch)
treedd5ded1ee880b19b7c5b1fa08127fefab9947e81 /libavformat/mov.c
parente3c4740fd488e382445ed1414434bbf68eeb53e9 (diff)
downloadffmpeg-2922cbdb14a69ca8f763182a9d70d13ddcdcd1ec.tar.gz
cannot free AVStream like this, and return ENOMEM
Originally committed as revision 12529 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6b4cf2a246..70b059bb8d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1204,10 +1204,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
st = av_new_stream(c->fc, c->fc->nb_streams);
if (!st) return -2;
sc = av_mallocz(sizeof(MOVStreamContext));
- if (!sc) {
- av_free(st);
- return -1;
- }
+ if (!sc) return AVERROR(ENOMEM);
st->priv_data = sc;
st->codec->codec_type = CODEC_TYPE_DATA;