gst/audioresample/gstaudioresample.c: Don't leak all input buffers to audioresample.
Original commit message from CVS: * gst/audioresample/gstaudioresample.c: Don't leak all input buffers to audioresample.
This commit is contained in:
parent
c6b2b19ca2
commit
e1eae4061d
@ -480,7 +480,7 @@ static GstFlowReturn
|
|||||||
{
|
{
|
||||||
GstAudioresample *audioresample;
|
GstAudioresample *audioresample;
|
||||||
ResampleState *r;
|
ResampleState *r;
|
||||||
guchar *data;
|
guchar *data, *datacopy;
|
||||||
gulong size;
|
gulong size;
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
|
|
||||||
@ -514,7 +514,8 @@ static GstFlowReturn
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* need to memdup, resample takes ownership. */
|
/* need to memdup, resample takes ownership. */
|
||||||
resample_add_input_data (r, g_memdup (data, size), size, NULL, NULL);
|
datacopy = g_memdup (data, size);
|
||||||
|
resample_add_input_data (r, datacopy, size, g_free, datacopy);
|
||||||
|
|
||||||
return audioresample_do_output (audioresample, outbuf);
|
return audioresample_do_output (audioresample, outbuf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user