History

lavd/libdc1394: distinguish between enumeration errors and no cameras found

Josh de Kock committed 10 years ago

Commit 384251d1 parent e947b751 file · +8 −3Browse files

Showing the changes to libavdevice (1 of 1 file). Show all

Unified · Split

libavdevice/libdc1394.c+8−3
@@ -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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t