diff options
Diffstat (limited to 'src/liba52/xine_decoder.c')
-rw-r--r-- | src/liba52/xine_decoder.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c index 8f6c55afc..58b1cbf8a 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.14 2001/12/10 12:31:08 jkeil Exp $ + * $Id: xine_decoder.c,v 1.15 2001/12/11 15:30:05 miguelfreitas Exp $ * * stuff needed to turn liba52 into a xine decoder plugin */ @@ -134,6 +134,16 @@ int a52dec_can_handle (audio_decoder_t *this_gen, int buf_type) { return ((buf_type & 0xFFFF0000) == BUF_AUDIO_A52) ; } +void a52dec_reset (audio_decoder_t *this_gen) { + + a52dec_decoder_t *this = (a52dec_decoder_t *) this_gen; + + this->syncword = 0; + this->sync_todo = 7; + this->pts = 0; + this->last_pts = 0; + +} void a52dec_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) { @@ -547,7 +557,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t * a52dec_decoder_t *this ; - if (iface_version != 3) { + if (iface_version != 4) { printf( "liba52: plugin doesn't support plugin API version %d.\n" "liba52: this means there's a version mismatch between xine and this " "liba52: decoder plugin.\nInstalling current plugins should help.\n", @@ -558,10 +568,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t * this = (a52dec_decoder_t *) malloc (sizeof (a52dec_decoder_t)); memset(this, 0, sizeof (a52dec_decoder_t)); - this->audio_decoder.interface_version = 3; + this->audio_decoder.interface_version = iface_version; this->audio_decoder.can_handle = a52dec_can_handle; this->audio_decoder.init = a52dec_init; this->audio_decoder.decode_data = a52dec_decode_data; + this->audio_decoder.reset = a52dec_reset; this->audio_decoder.close = a52dec_close; this->audio_decoder.get_identifier = a52dec_get_id; this->audio_decoder.priority = 2; |