]> git.sesse.net Git - vlc/blobdiff - src/input/input.c
. le d�codeur de sous-titres s'appelle maintenant spu_decoder
[vlc] / src / input / input.c
index 8e872677dfcaf29b35a518d71d08c388b896273f..eca9a82b8ef57e060ad5f2b785e0647d6d9bd56e 100644 (file)
@@ -412,6 +412,10 @@ static void EndThread( input_thread_t * p_input )
         case AC3_AUDIO_ES:
             ac3dec_DestroyThread( (ac3dec_thread_t *)(p_input->pp_selected_es[i_es_loop]->p_dec) );
             break;
+        case DVD_SPU_ES:
+            fprintf(stderr, "input.h : destroying spudec\n");
+            spudec_DestroyThread( (spudec_thread_t *)(p_input->pp_selected_es[i_es_loop]->p_dec) );
+            break;
         case 0:
             /* Special streams for the PSI decoder, PID 0 and 1 */
             break;
@@ -1000,7 +1004,7 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input,
 
                             case SYNCHRO_START:
                                 p_pes->i_pts += p_pcr->delta_pcr;
-                                p_pcr->delta_absolute = mdate() - p_pes->i_pts + 500000;
+                                p_pcr->delta_absolute = mdate() - p_pes->i_pts + INPUT_PTS_DELAY;
                                 p_pes->i_pts += p_pcr->delta_absolute;
                                 p_pcr->i_synchro_state = 0;
                                 break;
@@ -1064,6 +1068,13 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input,
                     p_fifo = &(((ac3dec_thread_t *)(p_es_descriptor->p_dec))->fifo);
                     break;
 
+                case DVD_SPU_ES:
+                    /* we skip 4 bytes at the beginning of the subpicture payload */
+                    p_ts->i_payload_start += 4;
+                    fprintf(stderr, "input.h : launching spudec\n");
+                    p_fifo = &(((spudec_thread_t *)(p_es_descriptor->p_dec))->fifo);
+                    break;
+
                 default:
                     /* This should never happen */
                     intf_DbgMsg("Unknown stream type (%d, %d): PES trashed\n",