@@ -1401,6 +1401,8 @@ static int sdrfile_initial_setup(AVFormatContext *s)
sdr->bandwidth = sdr->sdr_sample_rate;
sdr->fileheader_size = 40;
}
+ if (sdr->bandwidth >= sdr->sdr_sample_rate)
+ sdr->bandwidth = sdr->sdr_sample_rate * 4 / 5;
//After reading the first packet header we return to the begin so the packet can be read whole
avio_seek(s->pb, 0, SEEK_SET);
@@ -320,7 +320,7 @@ static int sdrindev_initial_hw_setup(AVFormatContext *s)
// rtlsdr doesnt return a valid value
if (!sdr->bandwidth)
- sdr->bandwidth = sdr->sdr_sample_rate;
+ sdr->bandwidth = sdr->sdr_sample_rate * 4 / 5;
av_log(s, AV_LOG_INFO, "bandwidth %"PRId64"\n", sdr->bandwidth);
SoapySDRDevice_activateStream(soapy, soapyRxStream, 0, 0, 0);
The previous of 100% was a unrealistic default Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavradio/sdrdemux.c | 2 ++ libavradio/sdrinradio.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)