[vlc-devel] [PATCH] demux: adaptive: fix no audio track is selected

Zhao Zhili quinkblack at foxmail.com
Fri May 18 19:14:54 CEST 2018


For streams with several audio tracks, if the selected audio track is
not the first one, no audio track is selected after seek. This problem
show up after 5066a19.
---
 modules/demux/adaptive/plumbing/FakeESOut.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/plumbing/FakeESOut.cpp b/modules/demux/adaptive/plumbing/FakeESOut.cpp
index 017e857ed8..ffd1d91de7 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.cpp
@@ -138,8 +138,8 @@ void FakeESOut::createOrRecycleRealEsID( FakeESOutID *es_id )
             /* We need to enforce same selection when not reused
                Otherwise the es will select any other compatible track
                and will end this in a activate/select loop when reactivating a track */
-            es_out_Control( real_es_out, ES_OUT_GET_ES_STATE, cand->realESID(), &b_select );
-            break;
+            if( !b_select )
+                es_out_Control( real_es_out, ES_OUT_GET_ES_STATE, cand->realESID(), &b_select );
         }
     }
 
-- 
2.14.3 (Apple Git-98)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-adaptive-fix-no-audio-track-is-selected.patch
Type: application/octet-stream
Size: 1335 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180519/d57bcb49/attachment.obj>


More information about the vlc-devel mailing list