This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 9dfa93db8417545d61747394cd99f63e0e4d8e50
Author:     romainhedouin <[email protected]>
AuthorDate: Wed Oct 14 21:07:20 2026 +0200
Commit:     Marton Balint <[email protected]>
CommitDate: Sat Nov 7 21:48:01 2026 +0000

    avformat/mpegts: read the PID at the sync byte in analyze()
    
    The PID was read from buf + 1, i.e. always from the first packet,
    while the adaptation field control on the next line is read at the
    current sync byte (buf + i). The null-packet check in probe mode thus
    used the wrong packet.
    
    Tested: make fate passes. Probing all 2569 files of the FATE suite
    gives the same detected format and score before and after.
    
    Signed-off-by: romainhedouin <[email protected]>
---
 libavformat/mpegts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 8c7df85173..6e252e63fc 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -621,7 +621,7 @@ static int analyze(const uint8_t *buf, int size, int 
packet_size,
 
     for (i = 0; i < size - 3; i++) {
         if (buf[i] == SYNC_BYTE) {
-            int pid = AV_RB16(buf+1) & 0x1FFF;
+            int pid = AV_RB16(buf + i + 1) & 0x1FFF;
             int asc = buf[i + 3] & 0x30;
             if (!probe || pid == 0x1FFF || asc) {
                 int x = i % packet_size;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to