aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/wc3movie.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-11 20:48:56 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-11 20:48:56 +0000
commitcfb9b3550bd62050a2fe2a900c310495b81e327e (patch)
treee4fab4aeb3a85848042225dab35c85f1250c3b09 /libavformat/wc3movie.c
parentcdbe3798d20db744f458cb3f3ad6ed53dae0f4d7 (diff)
downloadandroid_external_ffmpeg-cfb9b3550bd62050a2fe2a900c310495b81e327e.tar.gz
android_external_ffmpeg-cfb9b3550bd62050a2fe2a900c310495b81e327e.tar.bz2
android_external_ffmpeg-cfb9b3550bd62050a2fe2a900c310495b81e327e.zip
wc3movie: return partial packets if not all data can be read.
This is consistent with other demuxer's behaviour and avoids a memleak. It also returns the error from av_get_packet instead of always AVERROR(EIO). Originally committed as revision 18446 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/wc3movie.c')
-rw-r--r--libavformat/wc3movie.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 8e5dd38c0d..42f50d493e 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -320,8 +320,6 @@ static int wc3_read_packet(AVFormatContext *s,
ret= av_get_packet(pb, pkt, size);
pkt->stream_index = wc3->video_stream_index;
pkt->pts = wc3->pts;
- if (ret != size)
- ret = AVERROR(EIO);
packet_read = 1;
break;
@@ -349,8 +347,6 @@ static int wc3_read_packet(AVFormatContext *s,
ret= av_get_packet(pb, pkt, size);
pkt->stream_index = wc3->audio_stream_index;
pkt->pts = wc3->pts;
- if (ret != size)
- ret = AVERROR(EIO);
/* time to advance pts */
wc3->pts++;