From f1f5484b16ed6df991d489b0f7167c7381719494 Mon Sep 17 00:00:00 2001 From: kc5nra Date: Mon, 23 Mar 2015 21:31:20 -0500 Subject: [PATCH] deps-libff: Skip further decode refresh if aborted Skip decode refresh scheduling if the abort flag is set when the timer fails to start. This avoids extraneous refresh scheduling when tearing down the decoders. --- deps/libff/libff/ff-decoder.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deps/libff/libff/ff-decoder.c b/deps/libff/libff/ff-decoder.c index d7e9577fd..7187c1304 100644 --- a/deps/libff/libff/ff-decoder.c +++ b/deps/libff/libff/ff-decoder.c @@ -205,6 +205,12 @@ void ff_decoder_refresh(void *opaque) // Our clock was never started and deleted or // aborted + if (decoder->refresh_timer.abort) { + av_log(NULL, AV_LOG_INFO, + "refresh timer aborted"); + return; + } + // Drop this frame? The only way this can happen // is if one stream finishes before another and // the input is looping or canceled. Until we