vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Thu Oct 4 09:07:55 2018 +0200| [32ab3f71fbb9fcba0c91ec700dccf9060806f679] | committer: Thomas Guillem
chromecast: remove unnecessary check p_vid can't be NULL here. Fixes CID #1439870 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32ab3f71fbb9fcba0c91ec700dccf9060806f679 --- modules/stream_out/chromecast/cast.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp index 3de2d7a3ba..7026eb1a95 100644 --- a/modules/stream_out/chromecast/cast.cpp +++ b/modules/stream_out/chromecast/cast.cpp @@ -1005,7 +1005,7 @@ static std::string GetVencX264Option( sout_stream_t * /* p_stream */, break; } - const bool b_hdres = p_vid == NULL || p_vid->i_height == 0 || p_vid->i_height >= 800; + const bool b_hdres = p_vid->i_height == 0 || p_vid->i_height >= 800; unsigned i_video_x264_crf = b_hdres ? i_video_x264_crf_hd : i_video_x264_crf_720p; ssout << "venc=x264{preset=" << psz_video_x264_preset @@ -1139,8 +1139,7 @@ sout_stream_sys_t::GetVcodecOption( sout_stream_t *p_stream, vlc_fourcc_t *p_cod ssout << ( ( p_vid->i_width > 1280 ) ? "width=1280," : "" ) << video_maxres_720p << ','; } - if( p_vid == NULL - || p_vid->i_frame_rate == 0 || p_vid->i_frame_rate_base == 0 + if( p_vid->i_frame_rate == 0 || p_vid->i_frame_rate_base == 0 || ( p_vid->i_frame_rate / p_vid->i_frame_rate_base ) > 30 ) { /* Even force 24fps if the frame rate is unknown */ _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits