OSDN Git Service

avcodec/libopusdec: Set codec->delay to pre_skip not fixed value
authorJan Gerber <j@v2v.cc>
Fri, 20 Dec 2013 06:10:41 +0000 (11:40 +0530)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Dec 2013 03:53:52 +0000 (04:53 +0100)
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libopusdec.c

index 2409de2..8436302 100644 (file)
@@ -108,8 +108,8 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
     }
 #endif
 
-    avc->internal->skip_samples = opus->pre_skip;
-    avc->delay = 3840;  /* Decoder delay (in samples) at 48kHz */
+    /* Decoder delay (in samples) at 48kHz */
+    avc->delay = avc->internal->skip_samples = opus->pre_skip;
 
     return 0;
 }