OLD | NEW |
1 /* | 1 /* |
2 * Monkey's Audio lossless audio decoder | 2 * Monkey's Audio lossless audio decoder |
3 * Copyright (c) 2007 Benjamin Zores <ben@geexbox.org> | 3 * Copyright (c) 2007 Benjamin Zores <ben@geexbox.org> |
4 * based upon libdemac from Dave Chapman. | 4 * based upon libdemac from Dave Chapman. |
5 * | 5 * |
6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
7 * | 7 * |
8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 204 } |
205 | 205 |
206 static av_cold int ape_decode_close(AVCodecContext * avctx) | 206 static av_cold int ape_decode_close(AVCodecContext * avctx) |
207 { | 207 { |
208 APEContext *s = avctx->priv_data; | 208 APEContext *s = avctx->priv_data; |
209 int i; | 209 int i; |
210 | 210 |
211 for (i = 0; i < APE_FILTER_LEVELS; i++) | 211 for (i = 0; i < APE_FILTER_LEVELS; i++) |
212 av_freep(&s->filterbuf[i]); | 212 av_freep(&s->filterbuf[i]); |
213 | 213 |
| 214 av_freep(&s->data); |
214 return 0; | 215 return 0; |
215 } | 216 } |
216 | 217 |
217 /** | 218 /** |
218 * @defgroup rangecoder APE range decoder | 219 * @defgroup rangecoder APE range decoder |
219 * @{ | 220 * @{ |
220 */ | 221 */ |
221 | 222 |
222 #define CODE_BITS 32 | 223 #define CODE_BITS 32 |
223 #define TOP_VALUE ((unsigned int)1 << (CODE_BITS-1)) | 224 #define TOP_VALUE ((unsigned int)1 << (CODE_BITS-1)) |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 CODEC_TYPE_AUDIO, | 882 CODEC_TYPE_AUDIO, |
882 CODEC_ID_APE, | 883 CODEC_ID_APE, |
883 sizeof(APEContext), | 884 sizeof(APEContext), |
884 ape_decode_init, | 885 ape_decode_init, |
885 NULL, | 886 NULL, |
886 ape_decode_close, | 887 ape_decode_close, |
887 ape_decode_frame, | 888 ape_decode_frame, |
888 .capabilities = CODEC_CAP_SUBFRAMES, | 889 .capabilities = CODEC_CAP_SUBFRAMES, |
889 .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), | 890 .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), |
890 }; | 891 }; |
OLD | NEW |