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

Nicolas George george at nsup.org
Tue Oct 24 22:17:55 EEST 2017


Le tridi 3 brumaire, an CCXXVI, Jan Ekstrom a écrit :
> 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.

I had not considered the case of custom callbacks, indeed.

I do not consider this a public API change because 0 was never
documented as a valid return value for a read_packet callback, while
AVERROR_EOF has been around for a long time.

But my goal is not to break existing code on purpose. Fortunately, there
is a rather simple workaround, I will try to implement it tomorrow.
Still, lacking a simple test case, I will not be able to test it.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171024/93cca37c/attachment.sig>


More information about the ffmpeg-devel mailing list