[FFmpeg-cvslog] lavf/segment: exit immediately in case of invalid stream specifier

Stefano Sabatini git at videolan.org
Wed Jan 23 18:55:58 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Wed Jan 23 18:50:21 2013 +0100| [e3197257171c347353538152523f9d3fe880aee6] | committer: 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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3197257171c347353538152523f9d3fe880aee6
---

 libavformat/segment.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index d58d9fe..7d72229 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;



More information about the ffmpeg-cvslog mailing list