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

Git pushed a commit to branch master
in repository ffmpeg.

commit ff98352c3d002e6406fc03e9e69fcaf8064d838f
Author:     James Almer <[email protected]>
AuthorDate: Tue Feb 10 11:30:32 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu Feb 12 09:59:54 2026 -0300

    avcodec: set skip_samples in generic code
    
    Decoders should only worry about exporting AVCodeContext->delay during init.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/avcodec.c    | 2 ++
 libavcodec/liblc3dec.c  | 1 -
 libavcodec/libopusdec.c | 2 +-
 libavcodec/opus/parse.c | 2 --
 libavcodec/wmadec.c     | 2 +-
 5 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index de4e083db1..9ff4c7f319 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -354,6 +354,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext 
*avctx, const AVCodec *code
         if (!avctx->bit_rate)
             avctx->bit_rate = get_bit_rate(avctx);
 
+        avci->skip_samples = avctx->delay;
+
         /* validate channel layout from the decoder */
         if ((avctx->ch_layout.nb_channels && 
!av_channel_layout_check(&avctx->ch_layout)) ||
             avctx->ch_layout.nb_channels > FF_SANE_NB_CHANNELS) {
diff --git a/libavcodec/liblc3dec.c b/libavcodec/liblc3dec.c
index 953445ecfa..b27c2ee90f 100644
--- a/libavcodec/liblc3dec.c
+++ b/libavcodec/liblc3dec.c
@@ -87,7 +87,6 @@ static av_cold int liblc3_decode_init(AVCodecContext *avctx)
 
     avctx->delay = lc3_hr_delay_samples(
         liblc3->hr_mode, liblc3->frame_us, liblc3->srate_hz);
-    avctx->internal->skip_samples = avctx->delay;
 
     return 0;
 }
diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
index c602499b7c..fc2119baff 100644
--- a/libavcodec/libopusdec.c
+++ b/libavcodec/libopusdec.c
@@ -139,7 +139,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
 #endif
 
     /* Decoder delay (in samples) at 48kHz */
-    avc->delay = avc->internal->skip_samples = opus->pre_skip;
+    avc->delay = opus->pre_skip;
 
     return 0;
 }
diff --git a/libavcodec/opus/parse.c b/libavcodec/opus/parse.c
index 716561d62c..1c7876e37e 100644
--- a/libavcodec/opus/parse.c
+++ b/libavcodec/opus/parse.c
@@ -321,8 +321,6 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
     }
 
     avctx->delay = AV_RL16(extradata + 10);
-    if (avctx->internal)
-        avctx->internal->skip_samples = avctx->delay;
 
     channels = avctx->extradata ? extradata[9] : (channels == 1) ? 1 : 2;
     if (!channels) {
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index d0607b8305..3b1c617e84 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -140,7 +140,7 @@ static av_cold int wma_decode_init(AVCodecContext *avctx)
 
     avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
 
-    avctx->internal->skip_samples = s->frame_len * 2;
+    avctx->delay = s->frame_len * 2;
 
     return 0;
 }

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

Reply via email to