[FFmpeg-cvslog] ALSA: fix a stupid bad use of av_freep.

Nicolas George git at videolan.org
Thu Mar 31 21:34:57 CEST 2011


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Mar 31 18:49:07 2011 +0200| [1e96d4c71e68fdefc284d7dfb9701d1378a024c8] | committer: Nicolas George

ALSA: fix a stupid bad use of av_freep.

It caused a segfault when channel reordering was in use and the last chunk
of data was not silent.
Spotted and diagnosed by Carl Eugen Hoyos.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e96d4c71e68fdefc284d7dfb9701d1378a024c8
---

 libavdevice/alsa-audio-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index 8e3535e..bbe2c87 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -234,7 +234,7 @@ av_cold int ff_alsa_close(AVFormatContext *s1)
 {
     AlsaData *s = s1->priv_data;
 
-    av_freep(s->reorder_buf);
+    av_freep(&s->reorder_buf);
     snd_pcm_close(s->h);
     return 0;
 }



More information about the ffmpeg-cvslog mailing list