[FFmpeg-devel] [PATCH v2 7/7] avformat/audiointerleave: use a fixed frame duration for non-audio packets

Michael Niedermayer michaelni at gmx.at
Sat Mar 7 01:00:04 EET 2020


On Thu, Mar 05, 2020 at 10:56:28PM +0100, Marton Balint wrote:
> The packet durations might not be set properly which can cause the MXF muxer
> to write more than one packet of a stream to an edit unit messing up the
> constant byte per element index...
> 
> Also use nb_samples directly to calculate dts of audio packets because adding
> packet durations might not be precise.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/audiointerleave.c | 12 +++++++++---
>  libavformat/audiointerleave.h |  3 ++-
>  libavformat/gxfenc.c          |  2 +-
>  libavformat/mxfenc.c          |  2 +-
>  4 files changed, 13 insertions(+), 6 deletions(-)

This doesnt feel correct

Either case
A. The durations are correct but not what the muxer wants
then changing them at the muxer level could lead to AV sync issues and
wrong timestamps, something which the application should have dealt with
by frame duplication / frame drops or other

B. The durations are just wrong
then changing them at the muxer level will leave the calling application
with incorrect values potentially causing all kinds of problems.

Maybe iam missing something but isnt this just fixing the issue when the
durtations are wrong in a very special way ?

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200307/95b87a05/attachment.sig>


More information about the ffmpeg-devel mailing list