[vlc-commits] chromecast: show perfs dialog only one time (if accepted)

Thomas Guillem git at videolan.org
Fri Feb 23 11:53:44 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 23 11:52:43 2018 +0100| [ceda76cfc5db98df965fdc2653b8d274d641b161] | committer: Thomas Guillem

chromecast: show perfs dialog only one time (if accepted)

This fixes the dialog reappearing after a seek.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ceda76cfc5db98df965fdc2653b8d274d641b161
---

 modules/stream_out/chromecast/cast.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 51e9491f32..695c3cc8f8 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -92,6 +92,7 @@ struct sout_stream_sys_t
         , cc_reload( false )
         , has_video( false )
         , out_force_reload( false )
+        , perf_warning_shown( false )
         , transcoding_state( TRANSCODING_NONE )
         , out_streams_added( 0 )
     {
@@ -135,6 +136,7 @@ struct sout_stream_sys_t
     bool                               cc_reload;
     bool                               has_video;
     bool                               out_force_reload;
+    bool                               perf_warning_shown;
     int                                transcoding_state;
     std::vector<sout_stream_id_sys_t*> streams;
     std::vector<sout_stream_id_sys_t*> out_streams;
@@ -977,7 +979,7 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
     int new_transcoding_state = TRANSCODING_NONE;
     if ( !canRemux )
     {
-        if ( i_codec_video == 0 && p_original_video
+        if ( !perf_warning_shown && i_codec_video == 0 && p_original_video
           && var_InheritInteger( p_stream, SOUT_CFG_PREFIX "show-perf-warning" ) )
         {
             int res = vlc_dialog_wait_question( p_stream,
@@ -989,6 +991,7 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
                            "could quickly drain your battery." ) );
             if ( res <= 0 )
                  return false;
+            perf_warning_shown = true;
             if ( res == 2 )
                 config_PutInt(p_stream, SOUT_CFG_PREFIX "show-perf-warning", 0 );
         }



More information about the vlc-commits mailing list