diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-13 19:04:30 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-13 19:04:30 +0000 |
commit | ab91e84d2b537a4b33cbf1399f052c37ef3b475f (patch) | |
tree | 032b9a0b8bc40ba3577635ee572ca9663b972c89 | |
parent | 03b127477f49698d173abc6fb16a74528bccd1db (diff) | |
download | ffmpeg-ab91e84d2b537a4b33cbf1399f052c37ef3b475f.tar.gz |
fix slice offset computation
Originally committed as revision 17212 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mxfenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index ef350c4708..56d6da3475 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1723,8 +1723,9 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt) mxf->edit_units_count++; } else if (st->index == 1) { - mxf->index_entries[mxf->edit_units_count-1].slice_offset = - url_ftell(pb) - mxf->index_entries[mxf->edit_units_count-1].offset; + uint64_t pos = url_ftell(pb); + mxf->index_entries[mxf->edit_units_count-1].slice_offset = pos + + klv_fill_size(pos) - mxf->index_entries[mxf->edit_units_count-1].offset; } mxf_write_klv_fill(s); |