[FFmpeg-cvslog] r18446 - trunk/libavformat/wc3movie.c

reimar subversion
Sat Apr 11 22:48:57 CEST 2009


Author: reimar
Date: Sat Apr 11 22:48:56 2009
New Revision: 18446

Log:
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).

Modified:
   trunk/libavformat/wc3movie.c

Modified: trunk/libavformat/wc3movie.c
==============================================================================
--- trunk/libavformat/wc3movie.c	Sat Apr 11 22:08:16 2009	(r18445)
+++ trunk/libavformat/wc3movie.c	Sat Apr 11 22:48:56 2009	(r18446)
@@ -320,8 +320,6 @@ static int wc3_read_packet(AVFormatConte
             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(AVFormatConte
             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++;



More information about the ffmpeg-cvslog mailing list