[FFmpeg-devel] [PATCH] libavformat: not treat 0 as EOF

Jan Ekstrom jeebjp at gmail.com
Tue Oct 24 21:18:51 EEST 2017


On Tue, Oct 24, 2017 at 8:57 PM, Nicolas George <george at nsup.org> wrote:
> Le duodi 2 brumaire, an CCXXVI, James Almer a écrit :
>> https://trac.ffmpeg.org/ticket/6767
>
> I do not see in this ticket anything that allows to reproduce the issue
> without a huge amount of foreign code.
>
> Regards,

Hi,

The base idea was grasped rather quickly though, which seems to be
that all API clients utilizing their own IO seem to now require an
update to their code to return AVERROR_EOF if EOF was hit instead of
being able to return the number of read bytes, as usual.

See https://github.com/mpv-player/mpv/pull/5033/files , for example.

This is a public API change, and I'm not sure if we were planning on
this. I am not against the fact that zero is no longer implictly EOF,
but this might have been worth a bit more notice as this does indeed
break quite a few API clients as noted by nevcairiel as well. If it is
considered that no further changes are required then I think we at the
very least want to mention this in the change log as well as the
doc/APIchanges file.

Best regards,
Jan Ekström


More information about the ffmpeg-devel mailing list