avdevice/dshow: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-12-28 18:16:37 +01:00
parent beaea2de61
commit a3f6e8c4d9

View File

@@ -146,9 +146,9 @@ dshow_read_close(AVFormatContext *s)
IBaseFilter_Release(ctx->device_filter[AudioDevice]); IBaseFilter_Release(ctx->device_filter[AudioDevice]);
if (ctx->device_name[0]) if (ctx->device_name[0])
av_free(ctx->device_name[0]); av_freep(&ctx->device_name[0]);
if (ctx->device_name[1]) if (ctx->device_name[1])
av_free(ctx->device_name[1]); av_freep(&ctx->device_name[1]);
if(ctx->mutex) if(ctx->mutex)
CloseHandle(ctx->mutex); CloseHandle(ctx->mutex);