[FFmpeg-devel] [PATCH] ffm packet synchronization lost

Baptiste Coudurier baptiste.coudurier
Sat Jun 7 06:47:36 CEST 2008


Hi Steve,

Steve Webster wrote:
> This message is a resubmission, because I didn't submit correctly the 
> first time. The patch is in-lined and an explanation follows afterwards.
> 
> [...]
> 
> On Tue, 8 Jan 2008, Steve Webster wrote:
> 
>> 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.

Thanks for the contribution.

>> 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.

Yes, but like you say, this patch only address the symptom, I think this
problem is fixed in latest svn, there was a problem with the seek
function which didn't reset the read state after sucessful action.

Any feedback is welcome.

>> 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.
>>

Humm the load problem should be investigated further I think.
Nonetheless, tests are needed with latest svn. Here it is pretty stable.

Thanks.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list