[FFmpeg-devel] [PATCH] udp: ignore UDP packets without payload

Daniel Kučera daniel.kucera at gmail.com
Thu May 25 10:28:56 EEST 2017


2017-05-24 9:02 GMT+02:00 Nicolas George <george at nsup.org>:
> Le quartidi 4 prairial, an CCXXV, Daniel Kucera a écrit :
>> Time to time some devices send UDP packets without payload.
>> ffmpeg previously exited on receiving such packet, this patch
>> fixes this behaviour.
>>
>> Signed-off-by: Daniel Kucera <daniel.kucera at gmail.com>
>> ---
>>  libavformat/udp.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> I do not think this is correct: UDP is a packetized protocol, packet
> with empty payload are still packets, and meaningful for some protocols.
>
> Regards,
>
> --
>   Nicolas George

If we return 0, then it is considered as EOF by calling functions
(e.g. avio_read). So returning 0 means: "this is end of stream" and
not: "we received zero length packet, but more data may be coming" and
thus the stream processing ends. I need to fix this behavior, example
errors are described here:
https://blog.danman.eu/new-version-of-lenkeng-hdmi-over-ip-extender-lkv373a/#comment-478

S pozdravom / Best regards
Daniel Kucera.


More information about the ffmpeg-devel mailing list