[FFmpeg-devel] [vorbis @ 6C19BE80]Extradata corrupt
Mike Gerdov
dev.ma99us
Tue Jun 17 20:55:02 CEST 2008
Hi,
I am new to ffmpeg so I might be doing something wrong.
I was trying to initiate Vorbis decoder like this:
AVCodecContext *dc = avcodec_alloc_context();
dc->codec_id = CODEC_ID_VORBIS;
dc->codec_type = CODEC_TYPE_AUDIO;
// put sample parameters
dc->bit_rate = 16000;
dc->sample_rate = 22050;
dc->channels = 2;
AVCodec* dcodec = avcodec_find_decoder(dc->codec_id);
if (!dcodec)
{
fprintf(stderr, "decoder not found\n");
done(1);
}
if (avcodec_open(dc, dcodec) < 0) //
<= Error here!
{
fprintf(stderr, "could not open decoder\n");
done(1);
}
.........
av_free(dc);
Console output says:
[vorbis @ 6C19BE80]Extradata corrupt.
Do I need to do something specific to initiate Vorbis decoder?
Thanks,
Mike
More information about the ffmpeg-devel
mailing list