summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ff_audio_decoder.c1
-rw-r--r--src/combined/ffmpeg/xine_audio.list1
-rw-r--r--src/combined/xine_ogg_demuxer.c1
-rw-r--r--src/demuxers/demux_matroska.c5
-rw-r--r--src/demuxers/demux_tta.c13
-rw-r--r--src/demuxers/id3.c8
-rw-r--r--src/demuxers/matroska.h1
-rw-r--r--src/xine-engine/buffer_types.c7
8 files changed, 33 insertions, 4 deletions
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c
index b6b5a2075..534a97afb 100644
--- a/src/combined/ffmpeg/ff_audio_decoder.c
+++ b/src/combined/ffmpeg/ff_audio_decoder.c
@@ -284,6 +284,7 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
if (!this->output_open) {
if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) {
+ decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
avcodec_decode_audio2 (this->context,
(int16_t *)this->decode_buffer,
&decode_buffer_size,
diff --git a/src/combined/ffmpeg/xine_audio.list b/src/combined/ffmpeg/xine_audio.list
index b4a7455ea..796917dfe 100644
--- a/src/combined/ffmpeg/xine_audio.list
+++ b/src/combined/ffmpeg/xine_audio.list
@@ -40,6 +40,7 @@ FLVADPCM ADPCM_SWF Flash ADPCM
WAVPACK WAVPACK WavPack
AMR_NB AMR_NB AMR narrow band
AMR_WB AMR_WB AMR wide band
+EAC3 EAC3 E-AC-3
# disabled codecs (ref. configure.ac)
! AAC
diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c
index 6aa89c142..fa6fd10eb 100644
--- a/src/combined/xine_ogg_demuxer.c
+++ b/src/combined/xine_ogg_demuxer.c
@@ -429,6 +429,7 @@ static const struct ogg_meta {
OGG_META (ARTIST, 0),
OGG_META (PUBLISHER, 0),
OGG_META (COPYRIGHT, 0),
+ OGG_META (DISCNUMBER, 0),
OGG_META (LICENSE, 0),
OGG_META (TITLE, 0),
OGG_META_L (TRACKNUMBER, 0, TRACK_NUMBER),
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c
index eddbf67b1..032917ad9 100644
--- a/src/demuxers/demux_matroska.c
+++ b/src/demuxers/demux_matroska.c
@@ -1352,6 +1352,11 @@ static int parse_track_entry(demux_matroska_t *this, matroska_track_t *track) {
track->buf_type = BUF_AUDIO_A52;
init_codec = init_codec_audio;
+ } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_A_EAC3)) {
+ lprintf("MATROSKA_CODEC_ID_A_EAC3\n");
+ track->buf_type = BUF_AUDIO_EAC3;
+ init_codec = init_codec_audio;
+
} else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_A_DTS)) {
lprintf("MATROSKA_CODEC_ID_A_DTS\n");
track->buf_type = BUF_AUDIO_DTS;
diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c
index ada6cab30..d7c2a65cd 100644
--- a/src/demuxers/demux_tta.c
+++ b/src/demuxers/demux_tta.c
@@ -128,7 +128,7 @@ static int demux_tta_send_chunk(demux_plugin_t *this_gen) {
/* Get a buffer */
buf = this->audio_fifo->buffer_pool_alloc(this->audio_fifo);
buf->type = BUF_AUDIO_TTA;
- buf->pts = 0;
+ buf->pts = (int64_t)(FRAME_TIME * this->currentframe) * 90000;
buf->extra_info->total_time = (int)(le2me_32(this->header.tta.data_length) * 1000.0 / le2me_32(this->header.tta.samplerate)); /* milliseconds */
buf->decoder_flags = 0;
@@ -230,6 +230,7 @@ static int demux_tta_seek (demux_plugin_t *this_gen,
demux_tta_t *this = (demux_tta_t *) this_gen;
uint32_t start_frame;
uint32_t frame_index;
+ int64_t pts;
off_t start_off = this->datastart;
/* if thread is not running, initialize demuxer */
@@ -243,10 +244,14 @@ static int demux_tta_seek (demux_plugin_t *this_gen,
} else {
/* Get the starting frame */
- if( start_pos )
+ if( start_pos ) {
+ pts = start_pos * le2me_32(this->header.tta.data_length) * 1000.0 / le2me_32(this->header.tta.samplerate) * 90 / 65535;
start_frame = start_pos * this->totalframes / 65535;
- else
+
+ } else {
+ pts = start_time * 90;
start_frame = (uint32_t)((double)start_time/ 1000.0 / FRAME_TIME);
+ }
/* Now we find the offset */
for( frame_index = 0; frame_index < start_frame; frame_index++ )
@@ -257,7 +262,7 @@ static int demux_tta_seek (demux_plugin_t *this_gen,
_x_demux_flush_engine(this->stream);
this->input->seek(this->input, start_off, SEEK_SET);
this->currentframe = start_frame;
- _x_demux_control_newpts(this->stream, (int)(FRAME_TIME * start_frame) * 90000, BUF_FLAG_SEEK);
+ _x_demux_control_newpts(this->stream, pts, BUF_FLAG_SEEK);
this->status = DEMUX_OK;
}
diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c
index cdd585884..ea28f5666 100644
--- a/src/demuxers/id3.c
+++ b/src/demuxers/id3.c
@@ -511,6 +511,10 @@ static int id3v23_interp_frame(input_plugin_t *input,
_x_meta_info_set(stream, XINE_META_INFO_TRACK_NUMBER, buf + 1);
break;
+ case BE_FOURCC('T', 'P', 'O', 'S'):
+ _x_meta_info_set(stream, XINE_META_INFO_DISCNUMBER, buf + 1);
+ break;
+
default:
lprintf("unhandled frame\n");
}
@@ -761,6 +765,10 @@ static int id3v24_interp_frame(input_plugin_t *input,
_x_meta_info_set(stream, XINE_META_INFO_TRACK_NUMBER, buf + 1);
break;
+ case BE_FOURCC('T', 'P', 'O', 'S'):
+ _x_meta_info_set(stream, XINE_META_INFO_DISCNUMBER, buf + 1);
+ break;
+
default:
lprintf("unhandled frame\n");
}
diff --git a/src/demuxers/matroska.h b/src/demuxers/matroska.h
index 040400e0c..6109ad278 100644
--- a/src/demuxers/matroska.h
+++ b/src/demuxers/matroska.h
@@ -320,6 +320,7 @@ struct matroska_track_s {
#define MATROSKA_CODEC_ID_A_PCM_INT_LE "A_PCM/INT/LIT"
#define MATROSKA_CODEC_ID_A_PCM_FLOAT "A_PCM/FLOAT/IEEE"
#define MATROSKA_CODEC_ID_A_AC3 "A_AC3"
+#define MATROSKA_CODEC_ID_A_EAC3 "A_EAC3"
#define MATROSKA_CODEC_ID_A_DTS "A_DTS"
#define MATROSKA_CODEC_ID_A_VORBIS "A_VORBIS"
#define MATROSKA_CODEC_ID_A_ACM "A_MS/ACM"
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index 413bfb9f0..2f362fa21 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -1178,6 +1178,13 @@ static const audio_db_t audio_db[] = {
BUF_AUDIO_TTA,
"True Audio Lossless"
},
+{
+ {
+ 0
+ },
+ BUF_AUDIO_EAC3,
+ "E-AC-3"
+},
{ { 0 }, 0, "last entry" }
};