Revision 826ca104 libavcodec/g726.c

View differences:

libavcodec/g726.c
334 334
    c->bit_buffer = 0;
335 335
    c->bits_left = 0;
336 336

  
337
    avctx->coded_frame = avcodec_alloc_frame();
338
    if (!avctx->coded_frame)
339
        return -ENOMEM;
340
    avctx->coded_frame->key_frame = 1;
341

  
342
    return 0;
343
}
344

  
345
static int g726_close(AVCodecContext *avctx)
346
{
347
    av_freep(&avctx->coded_frame);
337 348
    return 0;
338 349
}
339 350

  
......
394 405
    sizeof(AVG726Context),
395 406
    g726_init,
396 407
    g726_encode_frame,
397
    NULL,
408
    g726_close,
398 409
    NULL,
399 410
};
400 411
#endif //CONFIG_ENCODERS
......
406 417
    sizeof(AVG726Context),
407 418
    g726_init,
408 419
    NULL,
409
    NULL,
420
    g726_close,
410 421
    g726_decode_frame,
411 422
};

Also available in: Unified diff