From 03bf11ec3f2c7a2077c8f521722d97b9e2eeb383 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Thu, 25 Apr 2024 15:51:07 -0600 Subject: [PATCH] Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does not display pits and dust when set to zero --- cinelerra-5.1/cinelerra/ffmpeg.C | 4 ++-- cinelerra-5.1/plugins/aging/aging.C | 4 ++-- cinelerra-5.1/plugins/aging/agingwindow.C | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 8c753a35..6685f468 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -641,8 +641,8 @@ int FFStream::encode_frame(AVFrame *frame) if ( ret == AVERROR(EAGAIN) && !frame ) continue; FFPacket opkt; ret = avcodec_receive_packet(avctx, opkt); - if( !frame && ret == AVERROR_EOF ) return pkts; - if( ret < 0 ) break; + if( !frame && (ret == AVERROR_EOF || ret == AVERROR(EAGAIN) )) return pkts; + //if( ret < 0 ) break; ret = write_packet(opkt); if( ret < 0 ) break; ++pkts; diff --git a/cinelerra-5.1/plugins/aging/aging.C b/cinelerra-5.1/plugins/aging/aging.C index 5517b44d..41d30d75 100644 --- a/cinelerra-5.1/plugins/aging/aging.C +++ b/cinelerra-5.1/plugins/aging/aging.C @@ -581,12 +581,12 @@ void AgingClient::process_package(LoadPackage *package) plugin->input_ptr->get_color_model(), plugin->input_ptr->get_w(), local_package->row2 - local_package->row1); - if( plugin->config.pits ) + if( plugin->config.pits && plugin->config.pits_interval > 0 ) pits(output_rows, plugin->input_ptr->get_color_model(), plugin->input_ptr->get_w(), local_package->row2 - local_package->row1); - if( plugin->config.dust ) + if( plugin->config.dust && plugin->config.dust_interval > 0 ) dusts(output_rows, plugin->input_ptr->get_color_model(), plugin->input_ptr->get_w(), diff --git a/cinelerra-5.1/plugins/aging/agingwindow.C b/cinelerra-5.1/plugins/aging/agingwindow.C index 5f4007aa..9ccb4d8a 100644 --- a/cinelerra-5.1/plugins/aging/agingwindow.C +++ b/cinelerra-5.1/plugins/aging/agingwindow.C @@ -82,6 +82,7 @@ AgingISlider::~AgingISlider() int AgingISlider::handle_event() { int ret = BC_ISlider::handle_event(); + *output = get_value(); win->plugin->send_configure_change(); return ret; } -- 2.26.2