aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-04-12 19:05:54 +0200
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-04-12 19:14:57 +0200
commitc1c3c3611ef13af824f507d1ec4d4ace5ac78c9a (patch)
tree1dca9fced8a1f97b98530e7a534cf6777275bbf6
parente89f3d0ed21259a714a8bd5d05d95af5b1e0f73f (diff)
downloadffmpeg-c1c3c3611ef13af824f507d1ec4d4ace5ac78c9a.tar.gz
lavd: no default device unless explicitly set
AVDeviceInfoList was allocated with first device set as default even though there is no device after allocation. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
-rw-r--r--libavdevice/avdevice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index bc79ca7030..6a75bd79d7 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -194,6 +194,8 @@ int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
*device_list = av_mallocz(sizeof(AVDeviceInfoList));
if (!(*device_list))
return AVERROR(ENOMEM);
+ /* no default device by default */
+ (*device_list)->default_device = -1;
if (s->oformat)
ret = s->oformat->get_device_list(s, *device_list);
else