X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fffmpeg.C;h=c0914420ef612a6686557b4c4ed49424cf699c47;hb=6a82410515aad7c7588933c9380041f63020a6bc;hp=b149a30cd183c262558c6604f2316b4f21113476;hpb=b38c2d6d89f77744bf410777ef2053bf4520cc2a;p=goodguy%2Fhistory.git 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; }