clapper: Do not reset "adaptive-bandwidth" to zero

When new instance of adaptive demuxer is created (different video is played)
this prop value would become zero. We want to avoid that and instead report
only bandwidth after fragment is downloaded, so when video will be unplayable,
next one will not start from lowest quality.
This commit is contained in:
Rafał Dzięgiel
2024-11-16 15:25:01 +01:00
parent 22430620a8
commit 303bda4d65

View File

@@ -726,6 +726,11 @@ _adaptive_demuxer_bandwidth_changed_cb (GstElement *adaptive_demuxer,
g_object_get (adaptive_demuxer, "current-bandwidth", &bandwidth, NULL);
/* Skip uncalculated bandwidth from
* new adaptive demuxer instance */
if (bandwidth == 0)
return;
GST_OBJECT_LOCK (self);
if ((changed = bandwidth != self->bandwidth))
self->bandwidth = bandwidth;