diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-11-16 12:12:09 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-11-16 12:12:09 +0000 |
commit | 5506e8aae5bfc5297b549685c928ffc29046db99 (patch) | |
tree | d6ddae67b19a0016ee5e3cd783a34ea5b667e2b0 | |
parent | 417cec6ec4f580d47a6f7d54aa613e4894cd7f70 (diff) | |
download | xine-lib-5506e8aae5bfc5297b549685c928ffc29046db99.tar.gz xine-lib-5506e8aae5bfc5297b549685c928ffc29046db99.tar.bz2 |
after James explained how the AC3 PTS tagging works, Miguel and I discovered
that the current code does not match that explanation
so since I get occasional passthrough dropouts with the current code, I
revert it to the old behaviour which I have had no problems with
CVS patchset: 5741
CVS date: 2003/11/16 12:12:09
-rw-r--r-- | src/liba52/xine_decoder.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c index ba5e92efe..4c65ee2cc 100644 --- a/src/liba52/xine_decoder.c +++ b/src/liba52/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.61 2003/11/15 13:01:11 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.62 2003/11/16 12:12:09 mroi Exp $ * * stuff needed to turn liba52 into a xine decoder plugin */ @@ -147,10 +147,10 @@ static void a52dec_reset (audio_decoder_t *this_gen) { a52dec_decoder_t *this = (a52dec_decoder_t *) this_gen; - this->syncword = 0; - this->sync_state = 0; - this->pts = 0; - this->pts_list[0] = this->pts_list[1] = this->pts_list[2] = 0; + this->syncword = 0; + this->sync_state = 0; + this->pts = 0; + this->pts_list[0] = 0; this->pts_list_position = 0; } @@ -158,8 +158,8 @@ static void a52dec_discontinuity (audio_decoder_t *this_gen) { a52dec_decoder_t *this = (a52dec_decoder_t *) this_gen; - this->pts = 0; - this->pts_list[0] = this->pts_list[1] = this->pts_list[2] = 0; + this->pts = 0; + this->pts_list[0] = 0; this->pts_list_position = 0; } @@ -202,7 +202,7 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts, int previe #endif if (!this->bypass_mode) { - int a52_output_flags, i,n; + int a52_output_flags, i; sample_t level = this->class->a52_level; audio_buffer_t *buf; int16_t *int_samples; @@ -456,6 +456,7 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { */ + /* FIXME: the code here does not match the explanation above */ if (buf->pts) { int32_t info; info = buf->decoder_info[1]; @@ -571,7 +572,11 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->sync_state = 0; break; } +#if 0 a52dec_decode_frame (this, this->pts_list[0], buf->decoder_flags & BUF_FLAG_PREVIEW); +#else + a52dec_decode_frame (this, this->pts, buf->decoder_flags & BUF_FLAG_PREVIEW); +#endif for(n=0;n<4;n++) { this->pts_list[n] = this->pts_list[n+1]; } @@ -636,12 +641,12 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre /* int i; */ - this->audio_caps = stream->audio_out->get_capabilities(stream->audio_out); - this->syncword = 0; - this->sync_state = 0; - this->output_open = 0; - this->pts = 0; - this->pts_list[0] = this->pts_list[1] = this->pts_list[2] = 0; + this->audio_caps = stream->audio_out->get_capabilities(stream->audio_out); + this->syncword = 0; + this->sync_state = 0; + this->output_open = 0; + this->pts = 0; + this->pts_list[0] = 0; this->pts_list_position = 0; if( !this->a52_state ) |