PR #26047 opened by Baptiste Coudurier (bcoudurier)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26047
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26047.patch

ISO/IEC 14496-14:2020 section 4.1.2 assigns the track-derived elementary stream 
ID during transmission. The ID in the stored descriptor is zero. This applies 
to the MPEG-4 ES descriptor, including when embedded in a QuickTime wave atom.




>From 8b1b388d15513e16d59d81ecd5ded9d0b2d1aea7 Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <[email protected]>
Date: Fri, 13 Nov 2026 21:13:52 -0800
Subject: [PATCH] avformat/movenc: store zero in the elementary stream
 descriptor ID

ISO/IEC 14496-14:2020 section 4.1.2 assigns the track-derived elementary stream 
ID during transmission. The ID in the stored descriptor is zero. This applies 
to the MPEG-4 ES descriptor, including when embedded in a QuickTime wave atom.
---
 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index c3fa66d816c..aeb84e88678 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -824,7 +824,7 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack 
*track) // Basic
 
     // ES descriptor
     put_descr(pb, 0x03, 3 + 5+13 + decoder_specific_info_len + 5+1);
-    avio_wb16(pb, track->track_id);
+    avio_wb16(pb, 0); // ES_ID as stored in the file
     avio_w8(pb, 0x00); // flags (= no flags)
 
     // DecoderConfig descriptor
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to