summaryrefslogtreecommitdiff
path: root/libavformat/ipmovie.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-17 02:46:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-17 02:46:47 +0000
commit49c8132b17ec26666d71ee94a50f421b84feeb35 (patch)
treec317db75659be35bf186a0caee70bce591e2cad1 /libavformat/ipmovie.c
parentc861e7da7493b4b85a1c6fb91fe32c9c46040068 (diff)
downloadffmpeg-49c8132b17ec26666d71ee94a50f421b84feeb35.tar.gz
not checking error return, resulting double free
returning uninitalized pointers Originally committed as revision 8002 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index e6470fa0ca..975bfd36ba 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -227,7 +227,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, ByteIOContext *pb,
/* see if there are any pending packets */
chunk_type = load_ipmovie_packet(s, pb, pkt);
- if ((chunk_type == CHUNK_VIDEO) && (chunk_type != CHUNK_DONE))
+ if (chunk_type != CHUNK_DONE)
return chunk_type;
/* read the next chunk, wherever the file happens to be pointing */
@@ -601,8 +601,10 @@ static int ipmovie_read_packet(AVFormatContext *s,
ret = AVERROR_IO;
else if (ret == CHUNK_NOMEM)
ret = AVERROR_NOMEM;
- else
+ else if (ret == CHUNK_VIDEO)
ret = 0;
+ else
+ ret = -1;
return ret;
}