diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/libopencore-amr.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/libopencore-amr.c')
| -rw-r--r-- | ffmpeg/libavcodec/libopencore-amr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ffmpeg/libavcodec/libopencore-amr.c b/ffmpeg/libavcodec/libopencore-amr.c index c991106..3a8787b 100644 --- a/ffmpeg/libavcodec/libopencore-amr.c +++ b/ffmpeg/libavcodec/libopencore-amr.c @@ -128,6 +128,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_libopencore_amrnb_decoder = { .name = "libopencore_amrnb", + .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_AMR_NB, .priv_data_size = sizeof(AMRContext), @@ -135,7 +136,6 @@ AVCodec ff_libopencore_amrnb_decoder = { .close = amr_nb_decode_close, .decode = amr_nb_decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), }; #endif /* CONFIG_LIBOPENCORE_AMRNB_DECODER */ @@ -180,7 +180,7 @@ static const AVOption options[] = { { NULL } }; -static const AVClass class = { +static const AVClass amrnb_class = { "libopencore_amrnb", av_default_item_name, options, LIBAVUTIL_VERSION_INT }; @@ -205,7 +205,6 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx) s->enc_state = Encoder_Interface_init(s->enc_dtx); if (!s->enc_state) { av_log(avctx, AV_LOG_ERROR, "Encoder_Interface_init error\n"); - av_freep(&avctx->coded_frame); return -1; } @@ -281,6 +280,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libopencore_amrnb_encoder = { .name = "libopencore_amrnb", + .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_AMR_NB, .priv_data_size = sizeof(AMRContext), @@ -290,8 +290,7 @@ AVCodec ff_libopencore_amrnb_encoder = { .capabilities = CODEC_CAP_DELAY | CODEC_CAP_SMALL_LAST_FRAME, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, - .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), - .priv_class = &class, + .priv_class = &amrnb_class, }; #endif /* CONFIG_LIBOPENCORE_AMRNB_ENCODER */ @@ -366,6 +365,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) AVCodec ff_libopencore_amrwb_decoder = { .name = "libopencore_amrwb", + .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_AMR_WB, .priv_data_size = sizeof(AMRWBContext), @@ -373,7 +373,6 @@ AVCodec ff_libopencore_amrwb_decoder = { .close = amr_wb_decode_close, .decode = amr_wb_decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)"), }; #endif /* CONFIG_LIBOPENCORE_AMRWB_DECODER */ |
