diff --git a/src/add-ons/media/plugins/ogg/OggReaderPlugin.cpp b/src/add-ons/media/plugins/ogg/OggReaderPlugin.cpp index d7fe54c2bc..c9b2ec0819 100644 --- a/src/add-ons/media/plugins/ogg/OggReaderPlugin.cpp +++ b/src/add-ons/media/plugins/ogg/OggReaderPlugin.cpp @@ -213,8 +213,8 @@ oggReader::GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, TRACE("oggReader::GetStreamInfo\n"); ogg_stream_state * stream = static_cast(cookie); memset(format, 0, sizeof(*format)); - *frameCount = -1; // don't know - *duration = -1; // don't know + *frameCount = 1024*1024; // don't know + *duration = 1024*1024; // don't know ogg_packet * packet = &fInitialHeaderPackets[stream->serialno]; *infoBuffer = (void*)packet; *infoSize = sizeof(ogg_packet); @@ -246,8 +246,7 @@ oggReader::GetNextChunk(void *cookie, void **chunkBuffer, int32 *chunkSize, media_header *mediaHeader) { - TRACE("oggReader::GetNextChunk"); - debugger("oggReader::GetNextChunk"); + TRACE("oggReader::GetNextChunk\n"); ogg_stream_state * stream = static_cast(cookie); while (ogg_stream_packetpeek(stream,NULL) != 1) { ogg_page page; diff --git a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp index 844c3c0f0a..d1fff26e3a 100644 --- a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp +++ b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp @@ -33,7 +33,6 @@ vorbisDecoder::vorbisDecoder() vorbisDecoder::~vorbisDecoder() { - debugger("vorbisDecoder::~vorbisDecoder"); TRACE("vorbisDecoder::~vorbisDecoder\n"); delete [] fDecodeBuffer; } @@ -43,8 +42,6 @@ status_t vorbisDecoder::Setup(media_format *ioEncodedFormat, const void *infoBuffer, int32 infoSize) { - debugger("vorbisDecoder::Setup"); - TRACE("vorbisDecoder::Setup\n"); if ((ioEncodedFormat->type != B_MEDIA_UNKNOWN_TYPE) && (ioEncodedFormat->type != B_MEDIA_ENCODED_AUDIO)) { TRACE("vorbisDecoder::Setup not called with audio/unknown stream: not vorbis"); @@ -85,6 +82,7 @@ vorbisDecoder::Setup(media_format *ioEncodedFormat, // initialize decoder vorbis_synthesis_init(&fDspState,&fInfo); vorbis_block_init(&fDspState,&fBlock); + ioEncodedFormat->type = B_MEDIA_ENCODED_AUDIO; return B_OK; } @@ -96,7 +94,6 @@ size_t get_audio_buffer_size(const media_raw_audio_format & raf) { status_t vorbisDecoder::NegotiateOutputFormat(media_format *ioDecodedFormat) { - debugger("vorbisDecoder::NegotiateOutputFormat"); TRACE("vorbisDecoder::NegotiateOutputFormat\n"); // BeBook says: The codec will find and return in ioFormat its best matching format // => This means, we never return an error, and always change the format values