[FFmpeg-devel] [PATCH] matroskadec minor simplification

Reimar Döffinger Reimar.Doeffinger
Sat Aug 14 08:25:27 CEST 2010


Hello,
I think it's better to reuse th local variable, also like this the check
matches the error message better, which makes it less confusing.
Index: libavformat/matroskadec.c
===================================================================
--- libavformat/matroskadec.c   (revision 24788)
+++ libavformat/matroskadec.c   (working copy)
@@ -1731,7 +1731,7 @@
                 int offset = 0, pkt_size = lace_size[n];
                 uint8_t *pkt_data = data;
 
-                if (lace_size[n] > size) {
+                if (pkt_size > size) {
                     av_log(matroska->ctx, AV_LOG_ERROR, "Invalid packet size\n");
                     break;
                 }




More information about the ffmpeg-devel mailing list