changeset 3747:b8f428926617 libavformat

matroskadec: stop parsing when skipping en element crossing over the end of file
author aurel
date Wed, 20 Aug 2008 22:30:15 +0000
parents d9d8ee457c22
children 6b469866ffda
files matroskadec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Wed Aug 20 00:49:45 2008 +0000
+++ b/matroskadec.c	Wed Aug 20 22:30:15 2008 +0000
@@ -765,7 +765,7 @@
                      return ebml_parse_nest(matroska, syntax->def.n, data);
     case EBML_PASS:  return ebml_parse_id(matroska, syntax->def.n, id, data);
     case EBML_STOP:  *(int *)data = 1;      return 1;
-    default:         url_fskip(pb, length); return 0;
+    default:         return url_fseek(pb,length,SEEK_CUR)<0 ? AVERROR(EIO) : 0;
     }
     if (res == AVERROR_INVALIDDATA)
         av_log(matroska->ctx, AV_LOG_ERROR, "Invalid element\n");