]> git.sesse.net Git - ffmpeg/commitdiff
lavf/segment: exit immediately in case of invalid stream specifier
authorStefano Sabatini <stefasab@gmail.com>
Wed, 23 Jan 2013 17:50:21 +0000 (18:50 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 23 Jan 2013 17:54:53 +0000 (18:54 +0100)
Avoid duplicated confusing error message, and propagate error code from
the failing avformat_match_stream_specifier() call.

libavformat/segment.c

index d58d9fe0b4605031b4357ad3774218100e06033a..7d7222922c21c4005f3df2f324390fcb8117d654 100644 (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;