History

demux: don't log if track isn't refreshed

Also use demux_internal type for the refresh_track in style of other internal functions.

nanahi committed 2 years ago

Commit c461ea61 parent dc523b11 file · +7 −6Browse files

Unified · Split

demux/demux.c+7−6
@@ -3965,14 +3965,12 @@ static void initiate_refresh_seek(struct demux_internal *in, · 3964 unmodified lines
39653965 }
39663966
39673967 // Called locked.
3968−static void refresh_track(struct demuxer *demuxer, struct sh_stream *stream,
3968+static void refresh_track(struct demux_internal *in, struct sh_stream *stream,
39693969 double ref_pts)
39703970 {
3971− struct demux_internal *in = demuxer->in;
39723971 struct demux_stream *ds = stream->ds;
39733972 ref_pts = MP_ADD_PTS(ref_pts, -in->ts_offset);
39743973
3975− MP_VERBOSE(in, "refresh track %d\n", stream->index);
39763974 if (in->back_demuxing)
39773975 ds->back_seek_pos = ref_pts;
39783976 // Allow refresh seek for non-video streams, even if no packets have
@@ -3982,8 +3980,11 @@ static void refresh_track(struct demuxer *demuxer, struct sh_stream *stream, · 3 unmodified lines
39823980 // - If cache is enabled and a seek causes some new data to be cached, the demuxer
39833981 // is sought to the end of cache after cache joining. Switching track immediately
39843982 // after this also causes the same problem.
3985− if (!in->after_seek || ds->type != STREAM_VIDEO)
3983+ if (!in->after_seek || ds->type != STREAM_VIDEO) {
3984+ MP_VERBOSE(in, "refresh track %d (%s)\n", stream->index,
3985+ stream_type_name(ds->type));
39863986 initiate_refresh_seek(in, ds, ref_pts);
3987+ }
39873988 }
39883989
39893990 // Set whether the given stream should return packets.
@@ -4002,7 +4003,7 @@ void demuxer_select_track(struct demuxer *demuxer, struct sh_stream *stream, · 12 unmodified lines
40024003 update_stream_selection_state(in, ds);
40034004 in->tracks_switched = true;
40044005 if (ds->selected)
4005− refresh_track(demuxer, stream, ref_pts);
4006+ refresh_track(in, stream, ref_pts);
40064007 if (in->threading) {
40074008 mp_cond_signal(&in->wakeup);
40084009 } else {
@@ -4022,7 +4023,7 @@ void demuxer_refresh_track(struct demuxer *demuxer, struct sh_stream *stream, · 13 unmodified lines
40224023 mp_mutex_lock(&in->lock);
40234024 if (ds->selected) {
40244025 update_stream_selection_state(in, ds);
4025− refresh_track(demuxer, stream, ref_pts);
4026+ refresh_track(in, stream, ref_pts);
40264027 }
40274028 mp_mutex_unlock(&in->lock);
40284029 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t