[FFmpeg-cvslog] lavd: no default device unless explicitly set
Lukasz Marek
git at videolan.org
Sun Apr 13 01:19:25 CEST 2014
ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Sat Apr 12 19:05:54 2014 +0200| [c1c3c3611ef13af824f507d1ec4d4ace5ac78c9a] | committer: 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: Lukasz Marek <lukasz.m.luki2 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1c3c3611ef13af824f507d1ec4d4ace5ac78c9a
---
libavdevice/avdevice.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index bc79ca7..6a75bd7 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
More information about the ffmpeg-cvslog
mailing list