[FFmpeg-devel] [PATCH] Fix MPEG-TS seek and frame positions in general
Baptiste Coudurier
baptiste.coudurier
Tue Feb 17 03:14:01 CET 2009
Hi,
Ivan Schreter wrote:
> Ivan Schreter wrote:
>> Ivan Schreter wrote:
>>
>>> Ivan Schreter wrote:
>>>
>>>
>>>> [...]
>>>> Patch #5: mpegts seek only searches for a PES packet with correct pid
>>>> and existing DTS and relies on this being a key frame. This is not
>>>> even the case in the test file. Read frames via av_read_frame until a
>>>> key frame is found and return position/timestamp of this frame. This
>>>> needs #1 to reset the packet reader after reading the frames, so
>>>> further reads work correctly, #2 to have correct positions from mpegts
>>>> and #4 to have exact position of the packet for later file seek.
>>>>
If I understand correctly, this seems to be a general issue with
read_timestamp which does not honor the key frame request.
I'm not sure if this code belongs in mpegts demuxer since mpegps also
suffer from the same problem, using read_timestamps.
I think this could be handled in a generic way in av_seek_frame_binary.
Maybe mpegts and mpegps demuxer could use AVFMT_GENERIC_INDEX to
populate index entries with key flag set which will be set by parser, it
seems current mpegps demuxer use index but consider all frames as key
frames.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list