PS: I have invoke before avcodec_open2: av_register_all(); avcodec_register_all();
xukaijun 发件人: [email protected] [mailto:[email protected]] 代表 许凯军 发送时间: 2013年7月20日 18:04 收件人: [email protected] 主题: [Libav-user] PCMU - avcodec_open2 return -22 Unknow Error Hi! When I try to open AV_CODEC_ID_PCM_MULAW by the code below: Open_satus = -22. AVCodec* codec = avcodec_find_decoder(codec_id); if (!codec) { return -1; } m_ffmpeg_codec_context = avcodec_alloc_context3(codec); if (!m_ffmpeg_codec_context) { return -1; } int open_status = avcodec_open2(m_ffmpeg_codec_context, codec, NULL); if (open_status < 0) { CString formater; formater.Format("avcodec_open2 failed :%d\r\n", open_status); OutputDebugString(formater); } Did I make any mistakes? xukaijun
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
