Exemplo n.º 1
0
/**
 * creates a new decoder context
 */
LIBDE265_API de265_decoder_context* de265_new_decoder()
{
  de265_error init_err = de265_init();
  if (init_err != DE265_OK) {
    return NULL;
  }

  decoder_context* ctx = (decoder_context*)calloc(sizeof(decoder_context),1);
  if (!ctx) {
    de265_free();
    return NULL;
  }

  init_decoder_context(ctx);

  return (de265_decoder_context*)ctx;
}
Exemplo n.º 2
0
static av_cold void ff_libde265dec_static_init(struct AVCodec *codec)
{
#if LIBDE265_NUMERIC_VERSION < 0x00050000
    de265_init();
#endif
}