Commit 90a63e0092 for ffmpeg

commit 90a63e009264615641f8dda4bf7746a5ec825fbe
Author: Romain Beauxis <romain.beauxis@gmail.com>
Date:   Thu Dec 3 08:02:10 2026 -0600

    avcodec/vvc_parser: start the POC of the first picture at 0

    The first picture took the MSB of the INT_MAX the previous POC starts
    at, so a stream that does not start at an IDR picture got POCs close to
    INT_MAX that overflow at the next lsb wrap.

    The first picture starts a CLVS with NoOutputBeforeRecoveryFlag, whose
    PicOrderCntMsb is 0 (8.3.1).

diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c
index 4cab3dd71f..7e4849c41e 100644
--- a/libavcodec/vvc_parser.c
+++ b/libavcodec/vvc_parser.c
@@ -230,7 +230,9 @@ static void get_slice_poc(VVCParserContext *s, int *poc,
     AuDetector *d = &s->au_detector;
     max_poc_lsb = 1 << (sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4);
     poc_lsb = ph->ph_pic_order_cnt_lsb;
-    if (IS_IDR(slice->nal_unit_header.nal_unit_type)) {
+    // The first picture starts a CLVS with NoOutputBeforeRecoveryFlag.
+    if (IS_IDR(slice->nal_unit_header.nal_unit_type) ||
+        d->prev_tid0_poc == INT_MAX) {
         if (ph->ph_poc_msb_cycle_present_flag)
             poc_msb = ph->ph_poc_msb_cycle_val * max_poc_lsb;
         else