Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
- {
- 189 int ret;
- 190 av_assert0(s);
- 191 av_assert0(device_list);
- 192 av_assert0(s->oformat || s->iformat);
- 193 if ((s->oformat && !s->oformat->get_device_list) ||
- 194 (s->iformat && !s->iformat->get_device_list)) {
- 195 *device_list = NULL;
- 196 return AVERROR(ENOSYS);
- 197 }
- 198 *device_list = av_mallocz(sizeof(AVDeviceInfoList));
- 199 if (!(*device_list))
- 200 return AVERROR(ENOMEM);
- 201 /* no default device by default */
- 202 (*device_list)->default_device = -1;
- 203 if (s->oformat)
- 204 ret = s->oformat->get_device_list(s, *device_list);
- 205 else
- 206 ret = s->iformat->get_device_list(s, *device_list);
- 207 if (ret < 0)
- 208 avdevice_free_list_devices(device_list);
- 209 return ret;
- 210 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement