[FFmpeg-devel] ffm synchronization when using ffserver on revision 11463

Steve Webster swebster
Tue Jan 8 19:51:16 CET 2008


Greetings,

I have written an application that encodes synthesized video and provides 
it to ffserver in a similar manner to ffmpeg. However, I've noticed 
synchronization errors while reading ffm data. I've attached a patch to 
address these issues, and I'm looking for feedback.

One issue occurs when reading the first header, when encountering a frame 
that does not include an offset in the initial packets. A frame header can 
not be found, and the ffm_read_data returns 0. However, the FFMContext 
pointers are not reset, so the ffm_read_data succeeds on a subsequent 
read, regardless of whether the header is next to be read. I've reset the 
FFMContext pointers upon this case, which appears to handle this case.

The other issue is a loss of synchronization when ffserver is under load. 
Essentially, the size to be read does not align with the next header, as 
indicated between a mismatch of offset and size. I've spent days trying to 
understand why synchronization can be lost, so I'm hoping someone here 
will have some insight into the root cause. My patch only addresses the 
symptom, by trapping and recovering from the loss of synchronization.

Thanks,
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffm.patch
Type: text/x-diff
Size: 1117 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080108/1e3ff13d/attachment.patch>



More information about the ffmpeg-devel mailing list