Commit e3197257 authored by Stefano Sabatini's avatar Stefano Sabatini

lavf/segment: exit immediately in case of invalid stream specifier

Avoid duplicated confusing error message, and propagate error code from
the failing avformat_match_stream_specifier() call.
parent bb539eb1
...@@ -485,7 +485,7 @@ static int select_reference_stream(AVFormatContext *s) ...@@ -485,7 +485,7 @@ static int select_reference_stream(AVFormatContext *s)
ret = avformat_match_stream_specifier(s, s->streams[i], ret = avformat_match_stream_specifier(s, s->streams[i],
seg->reference_stream_specifier); seg->reference_stream_specifier);
if (ret < 0) if (ret < 0)
break; return ret;
if (ret > 0) { if (ret > 0) {
seg->reference_stream_index = i; seg->reference_stream_index = i;
break; break;
......
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