[FFmpeg-devel] [PATCH] matroskadec : propagate AVERROR to the caller.

Jai Menon jmenon86
Tue Jun 15 19:34:30 CEST 2010


---
 libavformat/matroskadec.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 7995ce5..b82c7a9 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1159,6 +1159,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
     Ebml ebml = { 0 };
     AVStream *st;
     int i, j;
+    int ret;
 
     matroska->ctx = s;
 
@@ -1182,8 +1183,10 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
     ebml_free(ebml_syntax, &ebml);
 
     /* The next thing is a segment. */
-    if (ebml_parse(matroska, matroska_segments, matroska) < 0)
-        return -1;
+    ret = ebml_parse(matroska, matroska_segments, matroska);
+    if (ret < 0)
+        return ret;
+
     matroska_execute_seekhead(matroska);
 
     if (!matroska->time_scale)
-- 
1.7.1




More information about the ffmpeg-devel mailing list