Browse Source

avconv_hw: Free device on initialisation failure

tags/n4.0
Mark Thompson 8 years ago
parent
commit
c2b0bea40f
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      avtools/avconv_hw.c

+ 2
- 1
avtools/avconv_hw.c View File

@@ -75,7 +75,7 @@ int hw_device_init_from_string(const char *arg, HWDevice **dev_out)
char *type_name = NULL, *name = NULL, *device = NULL;
enum AVHWDeviceType type;
HWDevice *dev, *src;
AVBufferRef *device_ref;
AVBufferRef *device_ref = NULL;
int err;
const char *errmsg, *p, *q;
size_t k;
@@ -208,6 +208,7 @@ invalid:
fail:
av_log(NULL, AV_LOG_ERROR,
"Device creation failed: %d.\n", err);
av_buffer_unref(&device_ref);
goto done;
}



Loading…
Cancel
Save