mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
e89f3d0ed2
commit
c1c3c3611e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user