Mercurial > mplayer.hg
diff libmpcodecs/ad_ffmpeg.c @ 14431:0c10f923746e
change malloc and free to av_ variants where needed.
| author | reimar |
|---|---|
| date | Sat, 08 Jan 2005 19:16:21 +0000 |
| parents | 9d0b052c4f74 |
| children | bde5c3261037 |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Sat Jan 08 17:58:56 2005 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Sat Jan 08 19:16:21 2005 +0000 @@ -72,7 +72,7 @@ /* 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 @@ 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, ...)
