From 9304882bd349ce15be054efb7cdcf69a0829f0f9 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Mon, 11 Sep 2017 14:17:57 -0600 Subject: [PATCH] ffmpeg frame reset retry to push design limits --- cinelerra-5.1/cinelerra/ffmpeg.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 74b32cf1..dcbb49c6 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -739,6 +739,7 @@ int FFAudioStream::load(int64_t pos, int len) init_swr(frame->channels, frame->format, frame->sample_rate); load_history(&frame->extended_data[0], frame->nb_samples); curr_pos += frame->nb_samples; + i = 0; } } if( end_pos > curr_pos ) { @@ -868,7 +869,7 @@ int FFVideoStream::load(VFrame *vframe, int64_t pos) } for( int i=0; ret>=0 && !flushed && curr_pos<=pos && i 0 ) ++curr_pos; + if( ret > 0 ) { ++curr_pos; i = 0; } } if( frame->format == AV_PIX_FMT_NONE || frame->width <= 0 || frame->height <= 0 ) ret = -1; -- 2.26.2