[FFmpeg-cvslog] avcodec/opus: set skip_samples

Paul B Mahol git at videolan.org
Wed Nov 28 11:26:36 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov 27 15:16:36 2018 +0100| [18aea7bdd96b320a40573bccabea56afeccdd91c] | committer: Paul B Mahol

avcodec/opus: set skip_samples

Also update fate test. Fixes #5258.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18aea7bdd96b320a40573bccabea56afeccdd91c
---

 libavcodec/opus.c   | 3 ++-
 tests/fate/opus.mak | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/opus.c b/libavcodec/opus.c
index aa827b604c..22cda64801 100644
--- a/libavcodec/opus.c
+++ b/libavcodec/opus.c
@@ -31,6 +31,7 @@
 
 #include "opus_celt.h"
 #include "opustab.h"
+#include "internal.h"
 #include "vorbis.h"
 
 static const uint16_t opus_frame_duration[32] = {
@@ -325,7 +326,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
         return AVERROR_PATCHWELCOME;
     }
 
-    avctx->delay = AV_RL16(extradata + 10);
+    avctx->delay = avctx->internal->skip_samples = AV_RL16(extradata + 10);
 
     channels = avctx->extradata ? extradata[9] : (avctx->channels == 1) ? 1 : 2;
     if (!channels) {
diff --git a/tests/fate/opus.mak b/tests/fate/opus.mak
index 7f289455cf..c50d88f5e9 100644
--- a/tests/fate/opus.mak
+++ b/tests/fate/opus.mak
@@ -36,6 +36,7 @@ fate-opus-testvector09:      CMP_TARGET = 0
 fate-opus-testvector10:      CMP_TARGET = 38
 fate-opus-testvector11:      CMP_TARGET = 0
 fate-opus-testvector12:      CMP_TARGET = 160
+fate-opus-tron.6ch.tinypkts: CMP_SHIFT = 1440
 fate-opus-tron.6ch.tinypkts: CMP_TARGET = 0
 
 $(FATE_OPUS_CELT): CMP = oneoff



More information about the ffmpeg-cvslog mailing list