[FFmpeg-devel] [PATCH] fix ffplay eof memleak (issue806)

Peter Ross pross
Sat Feb 14 07:54:46 CET 2009


On Sat, Feb 07, 2009 at 03:03:57AM +0100, Michael Niedermayer wrote:
> On Sat, Feb 07, 2009 at 12:03:51PM +1100, Peter Ross wrote:
> > $subject.
> > 
> > XREF: https://roundup.ffmpeg.org/roundup/ffmpeg/issue806
> > 

> i remember problems with EOF detection, the return of url_* is just not
> correct to detect it. The reason is they are related to the file pointer
> and not if the demuxer reached the end of the available packets
> we should add a special return code to indicate EOF maybe, someone
> suggested that already not too long ago ..

This patch adds AVERROR_EOF, with demuxer modificatiojns for AVI and FLV.

> > +                av_free_packet(pkt);

> this looks wrong, a negative return from av_read_frame() really means
> that no packet has been allocated

Right. There is something awry going on inside avidec.c. av_get_packet()
is called, but is not free on an error or EOF condition.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: averror_eof.diff
Type: text/x-diff
Size: 1902 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/8c1d1ebd/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/8c1d1ebd/attachment.pgp>



More information about the ffmpeg-devel mailing list