]> git.sesse.net Git - ffmpeg/commitdiff
Make rawvideo_read_packet return partial frames.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Thu, 1 Oct 2009 17:32:22 +0000 (17:32 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Thu, 1 Oct 2009 17:32:22 +0000 (17:32 +0000)
This is consistent with other demuxers and also fixes a memleak (memory
allocated for partial frame data was leaked).

Originally committed as revision 20130 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/raw.c

index 4b0a31caf02939d75435a349c630dac7acbb08ae..260b690664c74fb634249fd3206c92d42c8aa72f 100644 (file)
@@ -171,7 +171,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
     pkt->dts= pkt->pos / packet_size;
 
     pkt->stream_index = 0;
-    if (ret != packet_size)
+    if (ret <= 0)
         return AVERROR(EIO);
     return 0;
 }