# HG changeset patch # User reimar # Date 1239482936 0 # Node ID 28a0c59a9625fd7ef8f05897645959b45185d4cd # Parent 74342058fc9dfa0a844d48def9692208483cc2cb 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). diff -r 74342058fc9d -r 28a0c59a9625 wc3movie.c --- a/wc3movie.c Sat Apr 11 20:08:16 2009 +0000 +++ b/wc3movie.c Sat Apr 11 20:48:56 2009 +0000 @@ -320,8 +320,6 @@ 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 @@ 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++;