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

Ivan Schreter schreter
Tue Feb 17 10:51:16 CET 2009


Baptiste Coudurier wrote:
> Hi,
>
> Ivan Schreter wrote:
>   
>> Ivan Schreter wrote:
>>     
>>> Ivan Schreter wrote:
>>>   
>>>       
>>>> Ivan Schreter wrote:
>>>>   
>>>>     
>>>>         
>>>>> [...]
>>>>> Patch #2: let mpegts format decoder return correct packet positions by 
>>>>> keeping track of position of first TS packet of a PES packet in 
>>>>> MpegTSPESFilter.
>>>>>           
>
> 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?

Regards,

Ivan





More information about the ffmpeg-devel mailing list