[FFmpeg-devel] [PATCH] avformat/scd: add demuxer

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Nov 26 19:14:30 EET 2021


Zane van Iperen:
> 
> 
> On 27/11/21 01:32, Andreas Rheinhardt wrote:
>> Zane van Iperen:
>>> +
>>> +static int scd_seek(AVFormatContext *s, int stream_index,
>>> +                    int64_t pts, int flags)
>>> +{
>>> +    SCDDemuxContext *ctx = s->priv_data;
>>> +    SCDTrackHeader  *trk = ctx->tracks + stream_index;
>>> +
>>> +    if (pts != 0)
>>> +        return AVERROR(EINVAL);
>>> +
>>> +    trk->bytes_read = 0;
>>
>> You are only resetting the one track that the user explicitly specified.
>> This is not in line with how this flag is generally understood.
>>
> 
> How it it meant to be understood? Do I reset the entire file, regardless
> of what's in stream_index?
> 

Yes. You only use stream_index to know what timebase pts is in and to
know which streams' keyframes to use when seeking is done by keyframes.

- Andreas


More information about the ffmpeg-devel mailing list