Unified · Split
| @@ -302,9 +302,14 @@ static int dc1394_v2_read_header(AVFormatContext *c) · 301 unmodified lines | ||
| 302 | 302 | |
| 303 | 303 | /* Now let us prep the hardware. */ |
| 304 | 304 | dc1394->d = dc1394_new(); |
| 305 | − dc1394_camera_enumerate (dc1394->d, &list); | |
| 306 | − if ( !list || list->num == 0) { | |
| 307 | − av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera\n\n"); | |
| 305 | + if (dc1394_camera_enumerate(dc1394->d, &list) != DC1394_SUCCESS || !list) { | |
| 306 | + av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera.\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 | 313 | goto out; |
| 309 | 314 | } |
| 310 | 315 | |