Browse Source

dshow: avoid duplicate NULL check before free

Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
rogerdpack Michael Niedermayer 9 years ago
parent
commit
bfbffbd7d8
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      libavdevice/dshow.c

+ 4
- 8
libavdevice/dshow.c View File

@@ -104,14 +104,10 @@ dshow_read_close(AVFormatContext *s)
if (ctx->device_filter[AudioDevice])
IBaseFilter_Release(ctx->device_filter[AudioDevice]);

if (ctx->device_name[0])
av_freep(&ctx->device_name[0]);
if (ctx->device_name[1])
av_freep(&ctx->device_name[1]);
if (ctx->device_unique_name[0])
av_freep(&ctx->device_unique_name[0]);
if (ctx->device_unique_name[1])
av_freep(&ctx->device_unique_name[1]);
av_freep(&ctx->device_name[0]);
av_freep(&ctx->device_name[1]);
av_freep(&ctx->device_unique_name[0]);
av_freep(&ctx->device_unique_name[1]);

if(ctx->mutex)
CloseHandle(ctx->mutex);


Loading…
Cancel
Save