mirror of
https://github.com/horgh/videostreamer.git
synced 2025-09-26 20:41:31 +08:00
Provide error reason if opening input fails
This commit is contained in:
@@ -58,9 +58,10 @@ vs_open_input(const char * const input_format_name,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avformat_open_input(&input->format_ctx, input_url, input_format,
|
int const open_status = avformat_open_input(&input->format_ctx, input_url,
|
||||||
NULL) != 0) {
|
input_format, NULL);
|
||||||
printf("unable to open input\n");
|
if (open_status != 0) {
|
||||||
|
printf("unable to open input: %s\n", av_err2str(open_status));
|
||||||
vs_destroy_input(input);
|
vs_destroy_input(input);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user