vlc/vlc-3.0 | branch: master | Thomas Guillem <tho...@gllm.fr> | Fri Feb 23 
11:52:43 2018 +0100| [955706db61261eb0f5ddf0e08a70f00ff8a6290f] | committer: 
Thomas Guillem

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

This fixes the dialog reappearing after a seek.

(cherry picked from commit ceda76cfc5db98df965fdc2653b8d274d641b161)
Signed-off-by: Thomas Guillem <tho...@gllm.fr>

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

 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 
);
         }

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to