dont start muxer if open_encoder fails, fix framerate in theme
authorGood Guy <good1.2guy@gmail.com>
Tue, 2 Feb 2016 20:16:53 +0000 (13:16 -0700)
committerGood Guy <good1.2guy@gmail.com>
Tue, 2 Feb 2016 20:16:53 +0000 (13:16 -0700)
cinelerra-5.0/cinelerra/ffmpeg.C
cinelerra-5.0/cinelerra/theme.C

index b149a30cd183c262558c6604f2316b4f21113476..c0914420ef612a6686557b4c4ed49424cf699c47 100644 (file)
@@ -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;
 }
index fe869cd74cae730a762bbcd48295ea556c196609..aad03564cff71478c4d22136b7c00f94e9d035e5 100644 (file)
@@ -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"));