Merge remote-tracking branch 'qatar/release/0.5' into release/0.5
[ffmpeg.git] / libavformat / matroskadec.c
index e16cd1e..7350562 100644 (file)
@@ -1641,7 +1641,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
                         lace_size[n] = lace_size[n - 1] + snum;
                         total += lace_size[n];
                     }
-                    lace_size[n] = size - total;
+                    lace_size[laces - 1] = size - total;
                     break;
                 }
             }