[FFmpeg-devel] [PATCH] Check for not synchronized packets (very small feed file, very slow client connection)

Milan Matejec milan.matejec at gmail.com
Sun Apr 12 23:30:32 CEST 2015


attached is patch for encoding/decoding .ffm format. When you set a maximum
size of feed file to too small number (I tried 20k) and try to connect to
ffserver from very slow connection (simulated by reading 8k chunks and then
wait 3 seconds) .ffm decoder will after a few seconds (10 maybe more ...)
stuck in endless "READ_HEADER" state because it got unreal size of .ffm
data packet (it's 24bits so take some random number - usually something
about 10MB) leading to immediately return after *ffm_is_avail_data()*. This
patch adds a packet header with signature so after loading header it tries
to check if signature is there. If not then it logs an error and tries to
reset a packet and read header again. It's not a best solution but better
than end up in an endless loop ...



Milan Matejec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-for-not-synchronized-packets-very-small-feed-f.b64
Type: application/octet-stream
Size: 7004 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150412/879819ac/attachment.obj>

More information about the ffmpeg-devel mailing list