Commit c1c3c361 authored by Lukasz Marek's avatar Lukasz Marek

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: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
parent e89f3d0e
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment