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.
This commit is contained in:
Stefano Sabatini 2013-01-23 18:50:21 +01:00
parent bb539eb13a
commit e319725717

View File

@ -485,7 +485,7 @@ static int select_reference_stream(AVFormatContext *s)
ret = avformat_match_stream_specifier(s, s->streams[i],
seg->reference_stream_specifier);
if (ret < 0)
break;
return ret;
if (ret > 0) {
seg->reference_stream_index = i;
break;