[FFmpeg-devel] Bad audio DTSs in MXF clip
matthieu.bouron at gmail.com
Wed Nov 7 15:16:49 CET 2012
On Wed, Nov 7, 2012 at 12:49 PM, Tomas Härdin <tomas.hardin at codemill.se>wrote:
> On Tue, 2012-11-06 at 20:21 +0100, Michael Niedermayer wrote:
> > On Tue, Nov 06, 2012 at 12:05:49PM +0100, Jorge Acereda wrote:
> > > Hi,
> > >
> > > I've uploaded to the incoming folder a clip (bad_audio_dts.mxf) and a
> text describing the problem (bad_audio_dts.txt).
> > >
> > > Looks like in that stream, the audio packet duration is fluctuating
> between a bit more than the timescale and a bit less. Due to the way
> libavformat/utils.c:compute_pkt_fields() rounds, it gets alternating
> durations 0 and 1 and that leads to bad timestamps.
> > >
> > > I've included a patch in the text file (just changing the rounding
> mode to AV_ROUND_NEAR_INF).
> > > Is that the right thing to do?
> > no, the bug is in the demuxer, it MUST set a timebase that is accurate
> > enough to represent the durations reasonable exactly.
> See Matthieu's patch in "[FFmpeg-devel] [PATCH 2/2] mxfdec: set audio
> packets pts". It needs a bit more work, but the idea is fairly sane
> (well, as sane as can be when dealing with MXF).
I should be able to send a second version of the patch in the next few days.
More information about the ffmpeg-devel