summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/mpeg12.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 765a80dd2e..d92d24a836 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -334,8 +334,8 @@ end:
CLOSE_READER(re, gb);
}
- if (i > MAX_INDEX)
- i = AVERROR_INVALIDDATA;
+ if (i > MAX_INDEX)
+ return AVERROR_INVALIDDATA;
block_last_index[index] = i;
return 0;