summaryrefslogtreecommitdiff
path: root/src/libspudec/xine_decoder.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-11-26 16:05:00 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-11-26 16:05:00 +0000
commitdf308d6eac8943344bb3fe491ee0453340a487b3 (patch)
tree40eba921b3f44378aec42c154269e158f94d8a1d /src/libspudec/xine_decoder.c
parent02ee4b255312a7646f718cbe887701087402ff7c (diff)
downloadxine-lib-df308d6eac8943344bb3fe491ee0453340a487b3.tar.gz
xine-lib-df308d6eac8943344bb3fe491ee0453340a487b3.tar.bz2
* remove what appears to be debug code messing up colors for some SPUs
(thanks to James Slorach for providing the fix) * implement a draft of a reset() function that will hopefully bring the spu decoder into a safe state * handle broken SPUs more gracefully CVS patchset: 3377 CVS date: 2002/11/26 16:05:00
Diffstat (limited to 'src/libspudec/xine_decoder.c')
-rw-r--r--src/libspudec/xine_decoder.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 756582dfc..1b863e13f 100644
--- a/src/libspudec/xine_decoder.c
+++ b/src/libspudec/xine_decoder.c
@@ -19,7 +19,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.88 2002/11/20 11:57:45 mroi Exp $
+ * $Id: xine_decoder.c,v 1.89 2002/11/26 16:05:00 mroi Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -136,11 +136,32 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
buf->content,
buf->size);
if(this->spudec_stream_state[stream_id].ra_seq.complete == 1) {
- spudec_process(this,stream_id);
+ if(this->spudec_stream_state[stream_id].ra_seq.broken) {
+ printf("libspudec: dropping broken SPU\n");
+ this->spudec_stream_state[stream_id].ra_seq.broken = 0;
+ } else
+ spudec_process(this,stream_id);
}
}
static void spudec_reset (spu_decoder_t *this_gen) {
+ spudec_decoder_t *this = (spudec_decoder_t *) this_gen;
+ video_overlay_instance_t *ovl_instance = this->vo_out->get_overlay_instance (this->vo_out);
+ int i;
+
+ if( this->menu_handle >= 0 )
+ ovl_instance->free_handle(ovl_instance,
+ this->menu_handle);
+ this->menu_handle = -1;
+
+ for (i=0; i < MAX_STREAMS; i++) {
+ if( this->spudec_stream_state[i].overlay_handle >= 0 )
+ ovl_instance->free_handle(ovl_instance,
+ this->spudec_stream_state[i].overlay_handle);
+ this->spudec_stream_state[i].overlay_handle = -1;
+ this->spudec_stream_state[i].ra_seq.complete = 1;
+ this->spudec_stream_state[i].ra_seq.broken = 0;
+ }
}
static void spudec_discontinuity (spu_decoder_t *this_gen) {