Le septidi 7 thermidor, an CCXXIV, Jan Sebechlebsky a écrit :
> I gave this a second thought, wouldn't it be better to simply ignore pkt
> without payload? So after caller would send empty packet using
> av_bsf_send_packet, he would get AVERROR(EAGAIN) from the next
> av_bsf_receive_packet call (from the definition in documentation
> AVERROR(EAGAIN) means "more data needed" when returned by
> av_bsf_receive_packet).
> However, if you think it is better to reserve packet without payload for
> some future use, I won't object.

Both are possible, it is a matter of balance between convenience for us and
convenience for the applications.

If at some point someone finds a way to use that kind of packet. If they
used to be ignored, it makes an incompatible API change. If they used to be
forbidden, it works.

The same logic applies for functions that return 0 for success or an AVERROR
code: the documentation usually states ">= 0 for success", that allows to
extend their return value later.

In this particular case, I do not see how an application can accidentally
send a completely empty packet, and therefore I think forbidding them is
better.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to