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

Git pushed a commit to branch master
in repository ffmpeg.

commit 3e59635d1e04bbf29e10e276a027ab9aa1204471
Author:     guy-with-a-why <[email protected]>
AuthorDate: Tue Aug 25 14:24:05 2026 +0100
Commit:     Timo Rothenpieler <[email protected]>
CommitDate: Mon Aug 31 18:13:21 2026 +0000

    avcodec/h264_parser: recognise partition A as a picture start
    
    parse_nal_units() takes slice_type and the POC fields from the first
    VCL NAL of a picture, but recognised only plain and IDR slices. A
    partition A opens with a slice header too, so until now a partitioned
    stream left the parser reporting no picture type at all. It needs the
    same leading bytes as any other VCL NAL, so it gets the same source
    length cap rather than having its whole RBSP extracted.
    
    Signed-off-by: guy-with-a-why <[email protected]>
---
 libavcodec/h264_parser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index af43cad609..1bd0be38a5 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -314,6 +314,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
         switch (state & 0x1f) {
         case H264_NAL_SLICE:
         case H264_NAL_IDR_SLICE:
+        case H264_NAL_DPA:
             // Do not walk the whole buffer just to decode slice header
             if ((state & 0x1f) == H264_NAL_IDR_SLICE || ((state >> 5) & 0x3) 
== 0) {
                 /* IDR or disposable slice
@@ -360,6 +361,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
             p->poc.prev_poc_lsb          = 0;
             av_fallthrough;
         case H264_NAL_SLICE:
+        case H264_NAL_DPA:                // starts with a slice header too
             get_ue_golomb_long(&nal.gb);  // skip first_mb_in_slice
             slice_type   = get_ue_golomb_31(&nal.gb);
             s->pict_type = ff_h264_golomb_to_pict_type[slice_type % 5];

-- 
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