lavf: Exporting opus pre_skip in AVCodecContext
authorVignesh Venkatasubramanian <vigneshv@google.com>
Thu, 21 Nov 2013 20:44:11 +0000 (12:44 -0800)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 25 Nov 2013 14:29:49 +0000 (15:29 +0100)
Opus Pre Skip is exported in AVCodecContext->delay similar to how
it is done for matroska. Doing the same for ogg too.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggparseopus.c

index 78aa333..94267b2 100644 (file)
@@ -55,6 +55,7 @@ static int opus_header(AVFormatContext *avf, int idx)
         st->codec->codec_id   = AV_CODEC_ID_OPUS;
         st->codec->channels   = AV_RL8 (packet + 9);
         priv->pre_skip        = AV_RL16(packet + 10);
+        st->codec->delay      = priv->pre_skip;
         /*orig_sample_rate    = AV_RL32(packet + 12);*/
         /*gain                = AV_RL16(packet + 16);*/
         /*channel_map         = AV_RL8 (packet + 18);*/