summaryrefslogtreecommitdiff
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-01-23 18:50:21 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-01-23 18:54:53 +0100
commite3197257171c347353538152523f9d3fe880aee6 (patch)
tree4e552c0633bce4388a2ebc6b566334d590279ab7 /libavformat/segment.c
parentbb539eb13ab024a3acf11fc2253497ad941d0b48 (diff)
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.
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index d58d9fe0b4..7d7222922c 100644
--- a/libavformat/segment.c
+++ b/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;