diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-08 19:16:21 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-08 19:16:21 +0000 |
commit | 479bdb2c08e8789d580c5c6f5a602499b25438f9 (patch) | |
tree | 2b9b63468b8425b83bc112e8acc0cc68b4ac515c /libmpcodecs/ad_ffmpeg.c | |
parent | 2ac89bd3885fd96de680a2965c105d1b77ace1ca (diff) | |
download | mpv-479bdb2c08e8789d580c5c6f5a602499b25438f9.tar.bz2 mpv-479bdb2c08e8789d580c5c6f5a602499b25438f9.tar.xz |
change malloc and free to av_ variants where needed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14432 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ad_ffmpeg.c')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 06f74f9a10..2e484f92aa 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -72,7 +72,7 @@ static int init(sh_audio_t *sh_audio) /* alloc extra data */ if (sh_audio->wf && sh_audio->wf->cbSize > 0) { - lavc_context->extradata = malloc(sh_audio->wf->cbSize); + lavc_context->extradata = av_malloc(sh_audio->wf->cbSize); lavc_context->extradata_size = sh_audio->wf->cbSize; memcpy(lavc_context->extradata, (char *)sh_audio->wf + sizeof(WAVEFORMATEX), lavc_context->extradata_size); @@ -120,9 +120,8 @@ static void uninit(sh_audio_t *sh) if (avcodec_close(lavc_context) < 0) mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec); - if (lavc_context->extradata) - free(lavc_context->extradata); - free(lavc_context); + av_freep(&lavc_context->extradata); + av_freep(&lavc_context); } static int control(sh_audio_t *sh,int cmd,void* arg, ...) |