[FFmpeg-devel] [PATCH] avformat/tls_schannel: fix the return value on EOF

wm4 nfxjfg at googlemail.com
Thu Apr 19 00:07:17 EEST 2018


On Wed, 18 Apr 2018 23:01:00 +0200
Nicolas George <george at nsup.org> wrote:

> wm4 (2018-04-18):
> > There was a simple patch that would have solved that issue locally in
> > the UDP code.  
> 
> This is not true. The patch would have fixed the author's use case but
> would have broken all applications that rely on empty UDP packets. Since
> it is about public API, we cannot assume anything about what
> applications do. A solution is only acceptable if it works for all cases
> and do not break existing applications.
> 

Which applications (in context of FFmpeg) need to detect empty UDP
packets? Which applications would be broken by a trivial patch in the
UDP code?

From what I remember, the problem was that empty packets were
recognized as EOF, and this issue was fixed with a trivial patch (which
was rejected).

On the other hand, the current code still gives you no way to detect
empty UDP packets, because the retry_wrapper thing in the avio generic
code basically drops them.

A solution that might have worked better (if empty packets really need
to be detected) would have been returning a special error code, that
applications could choose to interpret.


More information about the ffmpeg-devel mailing list