[Libav-user] PCMU - avcodec_open2 return -22 Unknow Error
许凯军
xukaijun at hikvision.com
Sat Jul 20 12:03:44 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130720/1b2fbd0a/attachment.html>
More information about the Libav-user
mailing list