git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a670eea
)
avconv_hw: Free device on initialisation failure
author
Mark Thompson
<sw@jkqxz.net>
Fri, 16 Jun 2017 22:18:55 +0000
(23:18 +0100)
committer
Mark Thompson
<sw@jkqxz.net>
Sun, 18 Jun 2017 16:01:49 +0000
(17:01 +0100)
avtools/avconv_hw.c
patch
|
blob
|
history
diff --git
a/avtools/avconv_hw.c
b/avtools/avconv_hw.c
index
94be723
..
36ef866
100644
(file)
--- a/
avtools/avconv_hw.c
+++ b/
avtools/avconv_hw.c
@@
-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;
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;
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);
fail:
av_log(NULL, AV_LOG_ERROR,
"Device creation failed: %d.\n", err);
+ av_buffer_unref(&device_ref);
goto done;
}
goto done;
}