Commit bc739993 authored by Josh de Kock's avatar Josh de Kock Committed by Diego Biurrun

libdc1394: Distinguish between enumeration errors and no cameras found

Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent df379502
...@@ -299,9 +299,14 @@ static int dc1394_v2_read_header(AVFormatContext *c) ...@@ -299,9 +299,14 @@ static int dc1394_v2_read_header(AVFormatContext *c)
/* Now let us prep the hardware. */ /* Now let us prep the hardware. */
dc1394->d = dc1394_new(); dc1394->d = dc1394_new();
dc1394_camera_enumerate (dc1394->d, &list); if (dc1394_camera_enumerate(dc1394->d, &list) != DC1394_SUCCESS || !list) {
if ( !list || list->num == 0) { av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera.\n");
av_log(c, AV_LOG_ERROR, "Unable to look for an IIDC camera\n\n"); goto out;
}
if (list->num == 0) {
av_log(c, AV_LOG_ERROR, "No cameras found.\n");
dc1394_camera_free_list(list);
goto out; goto out;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment