[FFmpeg-cvslog] mxfdec: reduce loop bound in mxf_read_pixel_layout()

Tomas Härdin git at videolan.org
Mon Oct 27 23:49:35 CET 2014


ffmpeg | branch: master | Tomas Härdin <tomas.hardin at codemill.se> | Mon Oct 27 13:59:48 2014 +0100| [11467ecf519788f2e2f49c63a17eb600e618489e] | committer: Vittorio Giovara

mxfdec: reduce loop bound in mxf_read_pixel_layout()

Makes coverity less confused and code more readable.

Bug-Id: CID 732262

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11467ecf519788f2e2f49c63a17eb600e618489e
---

 libavformat/mxfdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index ff88f91..b71c80f 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -816,7 +816,7 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor)
         value = avio_r8(pb);
         av_dlog(NULL, "pixel layout: code %#x\n", code);
 
-        if (ofs < 16) {
+        if (ofs <= 14) {
             layout[ofs++] = code;
             layout[ofs++] = value;
         }



More information about the ffmpeg-cvslog mailing list