Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/sdrdemux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/sdrdemux.c b/libavformat/sdrdemux.c
index e5ee4e80f5..fa45d30a3d 100644
--- a/libavformat/sdrdemux.c
+++ b/libavformat/sdrdemux.c
@@ -1533,8 +1533,10 @@ static void
*soapy_needs_bigger_buffers_worker(SDRContext *sdr)
fabs(wanted_gain - agc_gain) > 0.001 &&
sdr->set_gain_callback
) {
- sdr->set_gain_callback(sdr, wanted_gain);
- agc_gain = wanted_gain;
+ int ret = sdr->set_gain_callback(sdr, wanted_gain);
+ if (ret >= 0) {
+ agc_gain = wanted_gain;
+ }
}
pthread_mutex_unlock(&sdr->mutex);
--
2.31.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".