diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-05-21 20:43:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-05-21 20:43:21 +0000 |
commit | 9ee91c2f53dbc7cc61e65805d57e0a805b5752d7 (patch) | |
tree | 8b9419fb7d80a440bacf3d2783b3599648ee1c3d /libavformat/ogg.c | |
parent | e8733cc4d9b866643009342ec6839795a059fe53 (diff) | |
download | ffmpeg-9ee91c2f53dbc7cc61e65805d57e0a805b5752d7.tar.gz |
move time_base (pts_num/pts_den) from AVFormatContext -> AVStream
Originally committed as revision 3148 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ogg.c')
-rw-r--r-- | libavformat/ogg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/ogg.c b/libavformat/ogg.c index 61a9212663..82354c6cdd 100644 --- a/libavformat/ogg.c +++ b/libavformat/ogg.c @@ -36,14 +36,14 @@ static int ogg_write_header(AVFormatContext *avfcontext) ogg_packet *op= &context->op; int n, i; - av_set_pts_info(avfcontext, 60, 1, AV_TIME_BASE); - ogg_stream_init(&context->os, 31415); for(n = 0 ; n < avfcontext->nb_streams ; n++) { AVCodecContext *codec = &avfcontext->streams[n]->codec; uint8_t *p= codec->extradata; + av_set_pts_info(avfcontext->streams[n], 60, 1, AV_TIME_BASE); + for(i=0; i < codec->extradata_size; i+= op->bytes){ op->bytes = p[i++]<<8; op->bytes+= p[i++]; @@ -172,7 +172,6 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap) int i; avfcontext->ctx_flags |= AVFMTCTX_NOHEADER; - av_set_pts_info(avfcontext, 60, 1, AV_TIME_BASE); ogg_sync_init(&context->oy) ; buf = ogg_sync_buffer(&context->oy, DECODER_BUFFER_SIZE) ; @@ -190,6 +189,7 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap) ast = av_new_stream(avfcontext, 0) ; if(!ast) return AVERROR_NOMEM ; + av_set_pts_info(ast, 60, 1, AV_TIME_BASE); codec= &ast->codec; codec->codec_type = CODEC_TYPE_AUDIO; |