Showing the changes to libavdevice (1 of 1 file). Show all
Unified · Split
| @@ -302,9 +302,14 @@ static int dc1394_v2_read_header(AVFormatContext *c) · 301 unmodified lines | |||
| 302 | 302 | ||
| 303 | /* Now let us prep the hardware. */ | 303 | /* Now let us prep the hardware. */ |
| 304 | dc1394->d = dc1394_new(); | 304 | dc1394->d = dc1394_new(); |
| 305 | dc1394_camera_enumerate (dc1394->d, &list); | 305 | if (dc1394_camera_enumerate(dc1394->d, &list) != DC1394_SUCCESS || !list) { |
| 306 | if ( !list || list->num == 0) { | 306 | av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera.\n"); |
| 307 | av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera\n\n"); | 307 | goto out; |
| 308 | } | ||
| 309 | |||
| 310 | if (list->num == 0) { | ||
| 311 | av_log(c, AV_LOG_ERROR, "No cameras found.\n"); | ||
| 312 | dc1394_camera_free_list(list); | ||
| 308 | goto out; | 313 | goto out; |
| 309 | } | 314 | } |
| 310 | 315 | ||