[FFmpeg-devel] [PATCH] Fix MPEG-TS seek and frame positions in general

Ivan Schreter schreter
Tue Feb 24 20:57:00 CET 2009


Baptiste Coudurier wrote:
> On 2/23/2009 1:01 PM, Ivan Schreter wrote:
>   
>> Ivan Schreter wrote:
>>     
>>> Baptiste Coudurier wrote:
>>>   
>>>       
>>>> [...]
>>>> I believe AVPacket->pos should be set to the point where a byte seek can
>>>> occur for formats allowing it, this can be really useful for application
>>>> constructing indexes and/or using AVIndex.
>>>>
>>>> So in this case I believe AVPacket->pos should be set to the 0x47 byte
>>>> containing the start of the PES packet containing the frame.
>>>>
>>>>   
>>>>     
>>>>         
>>> Um, this is the case with the patch...
>>>
>>> If I look in the ts file, the positions returned point exactly to 0x47 
>>> byte. Did you see something different in your sample?
>>>
>>>   
>>>       
>> Ping Baptiste/Mans?
>>     
>
> Yes, did you address my comment with stream->pos being -1 ?
>
>   
Hm, I could not reproduce the problem with stream->pos being < 0... So I 
removed the special case. Updated patch attached.

OK now?

Regards,

Ivan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: seek_2_mpegts_pos.patch
Type: text/x-patch
Size: 2804 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090224/9b0de539/attachment.bin>



More information about the ffmpeg-devel mailing list