[FFmpeg-cvslog] avformat/mxfdec: fix essence_offset calculation

Marton Balint git at videolan.org
Thu Mar 1 23:31:36 EET 2018


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Feb 17 11:47:57 2018 +0100| [e9b0e42e773d4a1c9575c75e95688faca7ce4e06] | committer: Marton Balint

avformat/mxfdec: fix essence_offset calculation

The reference point for a KAG is the first byte of the key of a Partition Pack.

Fixes ticket #2817.
Fixes ticket #5317.

Signed-off-by: Marton Balint <cus at passwd.hu>

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

 libavformat/mxfdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index fcae863ef4..95767ccba4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2875,8 +2875,8 @@ static int mxf_read_header(AVFormatContext *s)
                  *       for OPAtom we still need the actual essence_offset though (the KL's length can vary)
                  */
                 int64_t op1a_essence_offset =
-                    round_to_kag(mxf->current_partition->this_partition +
-                                 mxf->current_partition->pack_length,       mxf->current_partition->kag_size) +
+                    mxf->current_partition->this_partition +
+                    round_to_kag(mxf->current_partition->pack_length,       mxf->current_partition->kag_size) +
                     round_to_kag(mxf->current_partition->header_byte_count, mxf->current_partition->kag_size) +
                     round_to_kag(mxf->current_partition->index_byte_count,  mxf->current_partition->kag_size);
 



More information about the ffmpeg-cvslog mailing list