From 266b42f1c0cfaa0e44f328d9fd523612fce6022e Mon Sep 17 00:00:00 2001
From: Oana Stratulat <oanaandreeastratulat@gmail.com>
Date: Wed, 11 Jan 2012 03:50:12 +0200
Subject: [PATCH] Fixes wrong duration in .mov file. Issue 599
---
libavformat/mov.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 05521fd..884079c 100644
a
|
b
|
static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
791 | 791 | av_dlog(c->fc, "time scale = %i\n", c->time_scale); |
792 | 792 | |
793 | 793 | c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */ |
| 794 | //Set the AVFormatContext duration because the track duration is not accurate |
| 795 | c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale); |
794 | 796 | avio_rb32(pb); /* preferred scale */ |
795 | 797 | |
796 | 798 | avio_rb16(pb); /* preferred volume */ |