[FFmpeg-devel] [PATCH v3] mov: Compare frag times in correct time base when seeking a stream without a corresponding sidx

Zhao Zhili quinkblack at foxmail.com
Wed Aug 17 13:29:30 EEST 2022


On Tue, 2022-08-16 at 17:32 +0100, Derek Buitenhuis wrote:
> On 8/16/2022 5:21 PM, Zhao Zhili wrote:
> > get_frag_time() can be called with an mp4 file which has no sidx at
> > all. In that case,
> > dst_st should have a higher priority than other streams, even if
> > sc->has_sidx is false.
> > And first_tfra_pts might be used here, which makes the check of sc-
> > >has_sidx unnatural.
> > So in my opinion, the check on sc->has_sidx should be removed.
> 
> This seems like it should be in a separate patch, though - it is
> changing a different
> behavior than what this patch does.

OK.

> 
> > +    frag_stream_info = get_frag_stream_info(frag_index, index,
> > dst_st->id);
> > +    timestamp = get_stream_info_time(frag_stream_info);
> > +    if (timestamp != AV_NOPTS_VALUE)
> > +        return timestamp;
> 
> I did look at that, but I do not think it can be.
> 
> get_stream_info_time is not equivalent to what is here.
> get_stream_info_time will
> eventually fall back to frag_stream_info->tfdt_dts, where as this
> code falls back
> to frag_stream_info->sidx_pts even if it is AV_NOPTS_VALUE. It would
> be a behavior
> change do use get_stream_info_time here.

OK, it make sense together with `if (sc->has_sidx)`.

No more comments from me.

> 
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list