Signed-off-by: Michael Niedermayer <[email protected]>
---
libavdevice/sdrindev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavdevice/sdrindev.c b/libavdevice/sdrindev.c
index f07bd6b154..8766fc2f34 100644
--- a/libavdevice/sdrindev.c
+++ b/libavdevice/sdrindev.c
@@ -88,6 +88,10 @@ static int sdrindev_set_gain_callback(SDRContext *sdr, float
gain)
}
if (sdr->sdr_gain != GAIN_SDR_AGC) {
+ if (sdr->current_direct_samp && !strcmp(sdr->current_direct_samp,
"2")) {
+ return -1; // soapy ignores gain in direct sampling mode
+ }
+
ret = SoapySDRDevice_setGain(soapy, SOAPY_SDR_RX, 0, gain);
if (ret) {
av_log(avfmt, AV_LOG_WARNING, "Failed to set gain to %f
(%s)\n", gain, SoapySDRDevice_lastError());
--
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".