# HG changeset patch # User michael # Date 1081041050 0 # Node ID 6579fe3ade4077dfbe0d995c05f4edb8affb1c24 # Parent 967c6bb2b8a6da0128f8a597d18598ac6b89422e remove spyware from ogg*.c fix vorbis in ogg decoding diff -r 967c6bb2b8a6 -r 6579fe3ade40 ogg.c --- a/ogg.c Sat Apr 03 21:00:14 2004 +0000 +++ b/ogg.c Sun Apr 04 01:10:50 2004 +0000 @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -42,8 +41,7 @@ ogg_packet header, header_comm, header_code ; int n ; - srand(time(NULL)); - ogg_stream_init(&context->os, rand()); + ogg_stream_init(&context->os, 31415); for(n = 0 ; n < avfcontext->nb_streams ; n++) { avccontext = &avfcontext->streams[n]->codec ; @@ -196,7 +194,9 @@ char *buf ; ogg_page og ; AVStream *ast ; - + + avfcontext->ctx_flags |= AVFMTCTX_NOHEADER; + ogg_sync_init(&context->oy) ; buf = ogg_sync_buffer(&context->oy, DECODER_BUFFER_SIZE) ; diff -r 967c6bb2b8a6 -r 6579fe3ade40 utils.c --- a/utils.c Sat Apr 03 21:00:14 2004 +0000 +++ b/utils.c Sun Apr 04 01:10:50 2004 +0000 @@ -1476,6 +1476,7 @@ (st->codec.codec_id == CODEC_ID_FLV1 || st->codec.codec_id == CODEC_ID_H264 || st->codec.codec_id == CODEC_ID_H263 || + st->codec.codec_id == CODEC_ID_VORBIS || (st->codec.codec_id == CODEC_ID_MPEG4 && !st->need_parsing))) try_decode_frame(st, pkt->data, pkt->size); @@ -1864,7 +1865,7 @@ } else { /* Finally we give up and parse it as double */ - *frame_rate_base = DEFAULT_FRAME_RATE_BASE; + *frame_rate_base = DEFAULT_FRAME_RATE_BASE; //FIXME use av_d2q() *frame_rate = (int)(strtod(arg, 0) * (*frame_rate_base) + 0.5); } if (!*frame_rate || !*frame_rate_base)