From 22a7e19b50cc1627dd16e22c5e89b1f92f1d0c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Thu, 1 Oct 2009 17:32:22 +0000 Subject: [PATCH] Make rawvideo_read_packet return partial frames. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/raw.c b/libavformat/raw.c index 4b0a31caf0..260b690664 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -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; }