[Libav-user] avcodec_encode_video2 failed (returned -12 as return value)

Clément Bœsch u at pkh.me
Thu Nov 21 13:19:22 CET 2013


On Thu, Nov 21, 2013 at 07:56:40PM +0800, Mark Ma wrote:
> On 2013/11/21 19:40, Clément Bœsch wrote:
> >On Thu, Nov 21, 2013 at 06:37:16PM +0800, Mark Ma wrote:
> >>Hi everyone,
> >>Now I'm getting yuv frames from a video monitor every second and call
> >>avcodec_encode_video2() to convert them to mpeg frame. At first
> >>avcodec_encode_video2() works well, but after about 1 minute, it keeps
> >>returning -12 as return value.  But what's the meaning of -12?
> >>
> >>Any suggestion is appreciated.
> >>
> >Try:
> >
> >   #include <libavutil/error.h>
> >
> >  ret = avcodec_encode_video2(...);
> >  if (ret < 0)
> >    av_log(0, 0, "Err: %s\n", av_err2str(ret));
> 
> Hi,
> After including error.h and using av_err2str(), I got following compilation error: Could not find the identifier "av_err2str"
> 

This macro was added in Jun 2012. Make sure you are up-to-date. You can
still look at av_strerror() which is older.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131121/29ccfe5c/attachment.asc>


More information about the Libav-user mailing list