Commit 90150164 authored by Thomas Guillem's avatar 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.
parent 96deec5a
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment