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.
pull/28/head^2
Stefano Sabatini 12 years ago
parent bb539eb13a
commit e319725717
  1. 2
      libavformat/segment.c

@ -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;

Loading…
Cancel
Save