[FFmpeg-devel] [PATCH] rmdec.c: merge old/new packet reading code
Ronald S. Bultje
Wed Mar 11 14:04:02 CET 2009
On Wed, Mar 11, 2009 at 8:58 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Wed, Mar 11, 2009 at 08:27:10AM -0400, Ronald S. Bultje wrote:
>> Yes, I'd like it easier also, but don't know how yet. We could add
>> 1argument to ff_rm_parse_packet() like int *please_write_index_entry
>> or *is_first_slice, since the know exactly when we are at the first
>> packet of a packet and whether that is a keyframe (flags&2). Then the
>> condition would just be 1-2 pieces, if (is_first_slice && old_flags &
>> 2) or if (please_write_index_entry).
> Hey, it sets *flags = 2 which is the thing you need.
It sets flags=2 for the last audio packet of a series of packets to be
unscrambled together, so that the first data to be returned from it
will have the keyframe flag set. However, this is not the first audio
packet in that series at the time when we were reading data from the
disk. I need the first packet for the seek to be useful in any way.
More information about the ffmpeg-devel