vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Fri Jan 19 10:15:36 
2018 +0100| [9015016418fb20a300f2da882d932ef8495a4103] | committer: Thomas 
Guillem

chromecast: always re-encode if the first pass failed

Even if the failing codec is h264, we should re-encoding since the cc may not
support the h264 resolution or profile.

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

 modules/stream_out/chromecast/cast.cpp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp 
b/modules/stream_out/chromecast/cast.cpp
index f136169720..c70cd6380d 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -264,7 +264,7 @@ static void Del(sout_stream_t *p_stream, 
sout_stream_id_sys_t *id)
 
 bool sout_stream_sys_t::canDecodeVideo( vlc_fourcc_t i_codec ) const
 {
-    if ( transcode_attempt_idx == MAX_TRANSCODE_PASS - 1 )
+    if ( transcode_attempt_idx != 0 )
         return false;
     if ( i_codec == VLC_CODEC_HEVC || i_codec == VLC_CODEC_VP9 )
         return transcode_attempt_idx == 0;
@@ -372,15 +372,6 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t 
*p_stream )
         }
     }
 
-    if ( transcode_attempt_idx == 1 && p_original_video != NULL &&
-         ( p_original_video->i_codec != VLC_CODEC_HEVC &&
-           p_original_video->i_codec != VLC_CODEC_VP9 ) )
-    {
-        msg_Dbg( p_stream, "Video format wasn't HEVC/VP9; skipping 2nd step 
and"
-                 " transcoding to h264/mp3" );
-        transcode_attempt_idx++;
-    }
-
     std::stringstream ssout;
     if ( !canRemux )
     {

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

Reply via email to