summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/resampler/ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/resampler/ffmpeg.c b/src/pulsecore/resampler/ffmpeg.c
index 691bdd4b4..388b555af 100644
--- a/src/pulsecore/resampler/ffmpeg.c
+++ b/src/pulsecore/resampler/ffmpeg.c
@@ -119,8 +119,10 @@ int pa_resampler_ffmpeg_init(pa_resampler *r) {
* internally only uses these hardcoded values, so let's use them
* here for now as well until ffmpeg makes this configurable. */
- if (!(ffmpeg_data->state = av_resample_init((int) r->o_ss.rate, (int) r->i_ss.rate, 16, 10, 0, 0.8)))
+ if (!(ffmpeg_data->state = av_resample_init((int) r->o_ss.rate, (int) r->i_ss.rate, 16, 10, 0, 0.8))) {
+ pa_xfree(ffmpeg_data);
return -1;
+ }
r->impl.free = ffmpeg_free;
r->impl.resample = ffmpeg_resample;