* RTP AMR Depacketizer, RFC 3267
* Copyright (c) 2010 Martin Storsjo
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
-#include "rtpdec_amr.h"
+#include "rtpdec_formats.h"
#include "libavutil/avstring.h"
static const uint8_t frame_sizes_nb[16] = {
static int amr_parse_fmtp(AVStream *stream, PayloadContext *data,
char *attr, char *value)
{
- /* Some AMR SDP configurations contain "octet-align", without
- * the trailing =1. Therefore, if the value is empty,
- * interpret it as "1".
- */
- if (!strcmp(value, "")) {
- av_log(NULL, AV_LOG_WARNING, "AMR fmtp attribute %s had "
- "nonstandard empty value\n", attr);
- strcpy(value, "1");
- }
- if (!strcmp(attr, "octet-align"))
- data->octet_align = atoi(value);
- else if (!strcmp(attr, "crc"))
- data->crc = atoi(value);
- else if (!strcmp(attr, "interleaving"))
- data->interleaving = atoi(value);
- else if (!strcmp(attr, "channels"))
- data->channels = atoi(value);
+ /* Some AMR SDP configurations contain "octet-align", without
+ * the trailing =1. Therefore, if the value is empty,
+ * interpret it as "1".
+ */
+ if (!strcmp(value, "")) {
+ av_log(NULL, AV_LOG_WARNING, "AMR fmtp attribute %s had "
+ "nonstandard empty value\n", attr);
+ strcpy(value, "1");
+ }
+ if (!strcmp(attr, "octet-align"))
+ data->octet_align = atoi(value);
+ else if (!strcmp(attr, "crc"))
+ data->crc = atoi(value);
+ else if (!strcmp(attr, "interleaving"))
+ data->interleaving = atoi(value);
+ else if (!strcmp(attr, "channels"))
+ data->channels = atoi(value);
return 0;
}
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = CODEC_ID_AMR_NB,
.parse_sdp_a_line = amr_parse_sdp_line,
- .open = amr_new_context,
- .close = amr_free_context,
+ .alloc = amr_new_context,
+ .free = amr_free_context,
.parse_packet = amr_handle_packet,
};
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = CODEC_ID_AMR_WB,
.parse_sdp_a_line = amr_parse_sdp_line,
- .open = amr_new_context,
- .close = amr_free_context,
+ .alloc = amr_new_context,
+ .free = amr_free_context,
.parse_packet = amr_handle_packet,
};