mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
move time_base (pts_num/pts_den) from AVFormatContext -> AVStream
Originally committed as revision 3148 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user