From 6a82410515aad7c7588933c9380041f63020a6bc Mon Sep 17 00:00:00 2001 From: Good Guy Date: Tue, 2 Feb 2016 13:16:53 -0700 Subject: [PATCH] dont start muxer if open_encoder fails, fix framerate in theme --- cinelerra-5.0/cinelerra/ffmpeg.C | 7 ++++--- cinelerra-5.0/cinelerra/theme.C | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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")); -- 2.26.2