summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-04 01:10:50 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-04 01:10:50 +0000
commit8bfed902f30f2c1c2c7e3e6f85bb44c42127dea3 (patch)
tree082fecd4120bb26a480239ba977541418faf5099 /libavformat
parenta5247e3d8de5d7a7210c2e951356c1f0b1995aad (diff)
remove spyware from ogg*.c
fix vorbis in ogg decoding Originally committed as revision 2952 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/ogg.c8
-rw-r--r--libavformat/utils.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/ogg.c b/libavformat/ogg.c
index 129c8c462e..b3cc68bb9a 100644
--- a/libavformat/ogg.c
+++ b/libavformat/ogg.c
@@ -7,7 +7,6 @@
*/
#include <stdio.h>
-#include <time.h>
#include <ogg/ogg.h>
#include <vorbis/vorbisenc.h>
@@ -42,8 +41,7 @@ static int ogg_write_header(AVFormatContext *avfcontext)
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 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap)
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 --git a/libavformat/utils.c b/libavformat/utils.c
index 1f07ac1ebe..c170c03577 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1476,6 +1476,7 @@ int av_find_stream_info(AVFormatContext *ic)
(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 @@ int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg)
}
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)