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

Michael Niedermayer michaelni at gmx.at
Tue Apr 14 01:10:10 CEST 2015


On Sun, Apr 12, 2015 at 11:30:32PM +0200, Milan Matejec wrote:
> Hi,
> 
> 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 ...

please split the patch in 2, one for the demuxer and one for the muxer
make sure the code works with only one patch applied and interoperation
between versions that have and do not have the patch is fully fine
it appears its not with this patchset

also please attach patches normally and dont double encode them

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150414/d4951dd9/attachment.asc>


More information about the ffmpeg-devel mailing list