On Mon, 19 Aug 2013, John Stebbins wrote:

From: Clément Bœsch <[email protected]>

The old method doesn't work when moov is relocated to beginning of file
---
libavformat/movenc.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 6df84f6..0fc173a 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -82,15 +82,21 @@ static int64_t update_size(AVIOContext *pb, int64_t pos)
    return curpos - pos;
}

+static int is_co64_required(const MOVTrack *track)
+{
+    if (track->cluster[track->entry - 1].pos + track->data_offset > UINT32_MAX)
+        return 1;
+    return 0;
+}

I didn't check right now, but does this need a check for entry>0, or are we positive that it won't ever be called in that case?

Other than that it looks good.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to