[FFmpeg-devel] [PATCH] fix ffplay to keep calling av_read_frame after EOF

Michael Chinen mchinen
Fri Oct 8 22:52:51 CEST 2010


On Fri, Oct 8, 2010 at 12:42 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Oct 07, 2010 at 08:00:10PM +0200, Michael Chinen wrote:
>> ffplay stops calling av_read_frame as soon as EOF is hit, but it
>> should keep going until av_read_frame stops giving back packets.
>> The FLAC parser needs this to play the last few frames.
>>
>> Michael
>
>> ?ffplay.c | ? ?2 +-
>> ?1 file changed, 1 insertion(+), 1 deletion(-)
>> 37316a8fbb7620139992cc2ab9c938322976d35a ?0001-fix-ffplay-to-keep-calling-av_read_frame-even-if-EOF.patch
>> From 4bb76c399ea534973bf415565231ab0a5d228969 Mon Sep 17 00:00:00 2001
>
> this would be ok if all demuxers returned AVERROR_EOF at the end but they dont.
> so this patch would break many demuxers.
> if you could change ffmpeg so it warns when there is no AVERROR_EOF at the end
> then it would be more vissible and maintainers and authors of new dmuxers
> would see it and could fix it

Yes, this broke looping on many formats.  I modified the patch to wait
till some error is received after the file pointer is EOF and it's
still not ideal that it isn't EOF that we set the eof flag on but
perhaps this solution is acceptable.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-ffplay-to-keep-calling-av_read_frame-even-if-EOF.patch
Type: application/octet-stream
Size: 1018 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101008/1ae3a9e1/attachment.obj>



More information about the ffmpeg-devel mailing list