[FFmpeg-devel] [PATCH 3/3] movenc: simplify the 'tfxd' fragment start timestamps

Michael Niedermayer michael at niedermayer.cc
Sun Mar 20 14:28:40 CET 2016


On Sat, Mar 19, 2016 at 07:39:07PM +0200, Jan Ekström wrote:
> As far as can be seen, this value is supposed to be the DTS of a
> fragment in smooth streaming. Thus, don't take b-picture delay and
> such into mention when calculating the start timestamp. The duration
> calculation requires PTS values, so it is not touched.
> ---
>  libavformat/movenc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 11c8275..77f28b0 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -3565,8 +3565,7 @@ static int mov_write_tfxd_tag(AVIOContext *pb, MOVTrack *track)
>      avio_write(pb, uuid, sizeof(uuid));
>      avio_w8(pb, 1);
>      avio_wb24(pb, 0);
> -    avio_wb64(pb, track->start_dts + track->frag_start +
> -                  track->cluster[0].cts);
> +    avio_wb64(pb, track->start_dts + track->frag_start);
>      avio_wb64(pb, track->end_pts -
>                    (track->cluster[0].dts + track->cluster[0].cts));

breaks fate / needs an update for the checksums if the changes match
what is intended

--- ./tests/ref/fate/movenc     2016-03-20 12:58:44.273740770 +0100
+++ tests/data/fate/movenc      2016-03-20 13:40:13.701793216 +0100
@@ -1,7 +1,7 @@
 249e02e3645ea5ca2c74397c62c53314 3269 non-empty-moov
 3281ff664e9a06e5a03ec6ea1729696c 3721 non-empty-moov-elst
 b408a545b1963a5ea82cf37208b66548 3629 non-empty-moov-no-elst
-a66c786022280c1f69ad7c98c719fa53 4435 ismv
+9cba2a625a9e7618d429067d07f8ff50 4435 ismv
 176a315a5385cb2e082d863e0fb22bf1 2891 empty-moov
 10eb3fdf6ed1400a1eec50746537159f 3283 empty-moov-no-elst
 bcd4d6d22f828f1061e13f3af459644f 3115 empty-moov-no-elst-no-adjust


>  
> -- 
> 2.5.0
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160320/9f0be58e/attachment.sig>


More information about the ffmpeg-devel mailing list