From: Good Guy Date: Tue, 2 Feb 2016 20:16:53 +0000 (-0700) Subject: dont start muxer if open_encoder fails, fix framerate in theme X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=commitdiff_plain;h=6a82410515aad7c7588933c9380041f63020a6bc;ds=sidebyside dont start muxer if open_encoder fails, fix framerate in theme --- diff --git a/cinelerra-5.0/cinelerra/ffmpeg.C b/cinelerra-5.0/cinelerra/ffmpeg.C index b149a30c..c0914420 100644 --- a/cinelerra-5.0/cinelerra/ffmpeg.C +++ b/cinelerra-5.0/cinelerra/ffmpeg.C @@ -1565,7 +1565,6 @@ int FFMPEG::init_encoder(const char *filename) load_options("encode.opts", opts); } ff_unlock(); - start_muxer(); return ret; } @@ -1654,7 +1653,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) ctx->channel_layout = av_get_default_channel_layout(ctx->channels); ctx->sample_rate = check_sample_rate(codec, asset->sample_rate); if( !ctx->sample_rate ) { - eprintf("FFMPEG::open_audio_encode:" + eprintf("FFMPEG::open_encoder:" " check_sample_rate failed %s\n", filename); ret = 1; break; @@ -1716,7 +1715,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) ctx->pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P; AVRational frame_rate = check_frame_rate(codec, vid->frame_rate); if( !frame_rate.num || !frame_rate.den ) { - eprintf("FFMPEG::open_audio_encode:" + eprintf("FFMPEG::open_encoder:" " check_frame_rate failed %s\n", filename); ret = 1; break; @@ -1751,6 +1750,8 @@ int FFMPEG::open_encoder(const char *type, const char *spec) } ff_unlock(); + if( !ret ) + start_muxer(); av_dict_free(&sopts); return ret; } diff --git a/cinelerra-5.0/cinelerra/theme.C b/cinelerra-5.0/cinelerra/theme.C index fe869cd7..aad03564 100644 --- a/cinelerra-5.0/cinelerra/theme.C +++ b/cinelerra-5.0/cinelerra/theme.C @@ -316,7 +316,7 @@ void Theme::build_menus() frame_rates.append(new BC_ListBoxItem("10")); frame_rates.append(new BC_ListBoxItem("12")); frame_rates.append(new BC_ListBoxItem("15")); - frame_rates.append(new BC_ListBoxItem("23.97")); + frame_rates.append(new BC_ListBoxItem("23.976")); frame_rates.append(new BC_ListBoxItem("24")); frame_rates.append(new BC_ListBoxItem("25")); frame_rates.append(new BC_ListBoxItem("29.97"));