Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2014-02-05 19:36:13 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-02-06 00:16:36 +0400
commit129e24f78e5dd2166211156346872ee92545b8a4 (patch)
treef88da9825b9b5752d143ad9bf2bdd60cca5c6bca /libavformat/oggparseopus.c
parent9a4a559d6fbe4f3da9d8d94fe03fc84c903ac3b1 (diff)
lavf/oggparseopus: Setting seek_preroll in AVCodecContext
Setting seek_preroll value in AVCodecContext for Opus streams embedded in ogg container. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/oggparseopus.c')
-rw-r--r--libavformat/oggparseopus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c
index 553ddb0b03..75c611413e 100644
--- a/libavformat/oggparseopus.c
+++ b/libavformat/oggparseopus.c
@@ -32,6 +32,7 @@ struct oggopus_private {
int64_t cur_dts;
};
+#define OPUS_SEEK_PREROLL_MS 80
#define OPUS_HEAD_SIZE 19
static int opus_header(AVFormatContext *avf, int idx)
@@ -66,6 +67,9 @@ static int opus_header(AVFormatContext *avf, int idx)
memcpy(st->codec->extradata, packet, os->psize);
st->codec->sample_rate = 48000;
+ av_codec_set_seek_preroll(st->codec,
+ av_rescale(OPUS_SEEK_PREROLL_MS,
+ st->codec->sample_rate, 1000));
avpriv_set_pts_info(st, 64, 1, 48000);
priv->need_comments = 1;
return 1;