Skip to content

Commit

Permalink
Add avformat_open_input error code when videos cannot be opened (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 11, 2021
1 parent 4735df9 commit 717b540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/avio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function open_avinput(avin::AVInput, io::IO, input_format=C_NULL, options=C_NULL
# "Open" the input
ret = avformat_open_input(avin.format_context, C_NULL, input_format, options)
if ret != 0
error("Unable to open input")
error("Unable to open input. avformat_open_input error code $(ret)")
end

nothing
Expand All @@ -193,7 +193,7 @@ end
function open_avinput(avin::AVInput, source::AbstractString,
input_format=C_NULL, options=C_NULL)
ret = avformat_open_input(avin.format_context, source, input_format, options)
ret != 0 && error("Could not open $source")
ret != 0 && error("Could not open $source. avformat_open_input error code $(ret)")
nothing
end

Expand Down

0 comments on commit 717b540

Please sign in to comment.