[FFmpeg-devel] [PATCH 4/5] avformat/mxfdec: take into account run-in in find_partition_by_offset

Marton Balint cus at passwd.hu
Fri Apr 12 02:09:19 EEST 2019


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/mxfdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 236294880e..6f0f87763d 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -433,15 +433,15 @@ static int find_body_sid_by_offset(MXFContext *mxf, int64_t offset)
 {
     // we look for partition where the offset is placed
     int a, b, m;
-    int64_t this_partition;
+    int64_t pack_ofs;
 
     a = -1;
     b = mxf->partitions_count;
 
     while (b - a > 1) {
-        m         = (a + b) >> 1;
-        this_partition = mxf->partitions[m].this_partition;
-        if (this_partition <= offset)
+        m = (a + b) >> 1;
+        pack_ofs = mxf->partitions[m].pack_ofs;
+        if (pack_ofs <= offset)
             a = m;
         else
             b = m;
-- 
2.16.4



More information about the ffmpeg-devel mailing list