[MPlayer-users] ffmpeg://udp:// ... feedback
Roger Pack
rogerdpack2 at gmail.com
Mon Jan 6 20:22:21 CET 2014
Hello.
I noticed when playing
ffmpeg://udp://127.0.0.1:2000 type streams, I would frequently get
messages like this:
[udp @ 0x1a4487700]Part of datagram lost due to insufficient buffer size
it appears from digging into the code that what this means is that the
"udp_read" method for ffmpeg is called first with request size "2048"
which works fine, and it returns out the first udp packet, typically
size 1472.
It is then called again with size 576. However, this is smaller than
the "next packet to give" so (if compiled with PTHREAD_CANCEL support)
it will return half a packet and discard the rest. If compiled
without PTHREAD_CANCEL support, it will return half a packet and
silently discard the rest. Which causes lots of corruption since many
bytes are lost. Interestingly, in the normal stream/udp.c file, only
request of size 2048 come through. I'm not entirely sure what is the
right way to go here. My guess is that mplayer should not be
requesting such small byte sizes though. Any feedback here?
Thank you.
-roger-
PS as a side note, I believe mplayer's config.h file doesn't setup
HAVE_PTHREAD_CANCEL right currently, FWIW.
More information about the MPlayer-users
mailing list