On Sat, Dec 20, 2008 at 04:13:51PM -0800, Michael Tison wrote:
> Hi,
> 
> I'm trying to do something like this:
> 
> ----
> AVCodecContext* c_ctx1 = avcodec_alloc_context();
> AVCodecContext* c_ctx2 = avcodec_alloc_context();
> 
> AVCodec* codec = avcodec_find_decoder(CODEC_ID_VORBIS);
> 
> int ret1 = avcodec_open(c_ctx1, codec);
> int ret2 = avcodec_open(c_ctx2, codec);
> ----
> 
> Then ret2 will be == -1 (ERROR).
> 
> This works with CODEC_ID_MP3 and other video decoders. So I'm not
> suppose to open a codec twice or is there an error somewhere else?

The vorbis decoder needs extradata to be set from the container.
It also prints an error message if its not set.
There is no problem with using AVCodec twice and ret1 will be -1 too
in your example above.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact

Attachment: signature.asc
Description: Digital signature

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to