[Libav-user] avcodec_open2 error when running encoding_decodingexample

francesco at bltitalia.com francesco at bltitalia.com
Tue Apr 26 16:29:18 CEST 2016


>>
>
>Thanks. Any ideas on how to do that on Visual Studio 2015?
>

Hi 
try displaying error message:

char str_err[256];
AnsiString stre;


    errv = avcodec_open2(c, codec, NULL);
    if(errv<0)
    {
       if(av_strerror(errv,str_err,256)==0){ stre.printf("Error (%s)
returned from encoded video",str_err);  }
         else { stre.printf("Error (%d) returned from encoded video",errv);  }
    }

/*******************************************************************\
*    Ing. Francesco  Cuzzocrea
*    company:    BLT Italia srl        web:  http://www.blt.it
*    address:    via Rosselli, 91     city:  Lido di CAMAIORE
*    country:    ITALY                 zip:  55043-i
*      Tel. :    +39 0584 904788       Fax:  +39 0584 904789  
*     e-mail:   francesco at bltitalia.com
\*******************************************************************/


 



More information about the Libav-user mailing list