summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-01-04 17:53:01 +0100
committerPaul B Mahol <onemda@gmail.com>2023-01-04 18:19:07 +0100
commit99bd2dbc9101549b4c6afb3e8d50c6a9e9e80215 (patch)
treeb761cc3c1102b5c72659c90245bacb9db38fd64c /libswresample
parenta0b5aaceca3a339f0027e8733e604020bd09e998 (diff)
downloadffmpeg-99bd2dbc9101549b4c6afb3e8d50c6a9e9e80215.tar.gz
swresample/swresample_frame: fix regression in detecting changes
Do not overwrite return variable values, instead use different one for checking results.
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample_frame.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libswresample/swresample_frame.c b/libswresample/swresample_frame.c
index 53ac487136..8726ee58e9 100644
--- a/libswresample/swresample_frame.c
+++ b/libswresample/swresample_frame.c
@@ -84,7 +84,7 @@ static int config_changed(SwrContext *s,
const AVFrame *out, const AVFrame *in)
{
AVChannelLayout ch_layout = { 0 };
- int ret = 0;
+ int ret = 0, err;
if (in) {
#if FF_API_OLD_CHANNEL_LAYOUT
@@ -96,8 +96,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
} else
#endif
- if ((ret = av_channel_layout_copy(&ch_layout, &in->ch_layout)) < 0)
- return ret;
+ if ((err = av_channel_layout_copy(&ch_layout, &in->ch_layout)) < 0)
+ return err;
if (av_channel_layout_compare(&s->in_ch_layout, &ch_layout) ||
s->in_sample_rate != in->sample_rate ||
s->in_sample_fmt != in->format) {
@@ -116,8 +116,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
} else
#endif
- if ((ret = av_channel_layout_copy(&ch_layout, &out->ch_layout)) < 0)
- return ret;
+ if ((err = av_channel_layout_copy(&ch_layout, &out->ch_layout)) < 0)
+ return err;
if (av_channel_layout_compare(&s->out_ch_layout, &ch_layout) ||
s->out_sample_rate != out->sample_rate ||
s->out_sample_fmt != out->format) {