Mercurial > libavformat.hg
changeset 4854:28a0c59a9625 libavformat
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).
author | reimar |
---|---|
date | Sat, 11 Apr 2009 20:48:56 +0000 |
parents | 74342058fc9d |
children | adec0fc30104 |
files | wc3movie.c |
diffstat | 1 files changed, 0 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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++;