summaryrefslogtreecommitdiff
path: root/audio/faad2/patches/patch-aq
diff options
context:
space:
mode:
Diffstat (limited to 'audio/faad2/patches/patch-aq')
-rw-r--r--audio/faad2/patches/patch-aq74
1 files changed, 74 insertions, 0 deletions
diff --git a/audio/faad2/patches/patch-aq b/audio/faad2/patches/patch-aq
new file mode 100644
index 00000000000..5e49edbd68c
--- /dev/null
+++ b/audio/faad2/patches/patch-aq
@@ -0,0 +1,74 @@
+$NetBSD: patch-aq,v 1.1 2006/05/30 20:28:34 tron Exp $
+
+--- plugins/mpeg4ip/faad2.cpp.orig 2004-01-05 14:05:12.000000000 +0000
++++ plugins/mpeg4ip/faad2.cpp 2006-05-30 16:04:22.000000000 +0100
+@@ -35,7 +35,9 @@
+ /*
+ * Create CAACodec class
+ */
+-static codec_data_t *aac_codec_create (const char *compressor,
++static codec_data_t *aac_codec_create (
++ const char* /*stream_type*/,
++ const char* /*compressor*/,
+ int type,
+ int profile,
+ format_list_t *media_fmt,
+@@ -148,7 +150,7 @@
+ * Decode task call for FAAC
+ */
+ static int aac_decode (codec_data_t *ptr,
+- uint64_t ts,
++ frame_timestamp_t* ts,
+ int from_rtp,
+ int *sync_frame,
+ uint8_t *buffer,
+@@ -163,15 +165,15 @@
+ if (aac->m_record_sync_time) {
+ aac->m_current_frame = 0;
+ aac->m_record_sync_time = 0;
+- aac->m_current_time = ts;
+- aac->m_last_rtp_ts = ts;
++ aac->m_current_time = ts->msec_timestamp;
++ aac->m_last_rtp_ts = ts->msec_timestamp;
+ } else {
+- if (aac->m_last_rtp_ts == ts) {
++ if (aac->m_last_rtp_ts == ts->msec_timestamp) {
+ aac->m_current_time += aac->m_msec_per_frame;
+ aac->m_current_frame++;
+ } else {
+- aac->m_last_rtp_ts = ts;
+- aac->m_current_time = ts;
++ aac->m_last_rtp_ts = ts->msec_timestamp;
++ aac->m_current_time = ts->msec_timestamp;
+ aac->m_current_frame = 0;
+ }
+
+@@ -237,9 +239,9 @@
+ aac->m_vft->audio_configure(aac->m_ifptr,
+ aac->m_freq,
+ aac->m_chans,
+- AUDIO_S16SYS,
++ AUDIO_FMT_S16,
+ aac->m_output_frame_size);
+- uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr);
++ uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, aac->m_freq, aac->m_current_time);
+ aac->m_audio_inited = 1;
+ }
+ /*
+@@ -281,6 +283,7 @@
+ };
+
+ static int aac_codec_check (lib_message_func_t message,
++ const char *stream_type,
+ const char *compressor,
+ int type,
+ int profile,
+@@ -322,7 +325,7 @@
+ }
+ if (userdata != NULL) {
+ mpeg4_audio_config_t audio_config;
+- decode_mpeg4_audio_config(userdata, userdata_size, &audio_config);
++ decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, false);
+ message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type);
+ if (fmtp != NULL) free_fmtp_parse(fmtp);
+