Mercurial > mplayer.hg
comparison mplayer.c @ 561:36fd71db0d33
spudec_decode() moved from mplayer.c to spudec.c
author | arpi_esp |
---|---|
date | Sat, 21 Apr 2001 17:31:32 +0000 |
parents | 28ae99036574 |
children | 747759a4a28f |
comparison
equal
deleted
inserted
replaced
560:28ae99036574 | 561:36fd71db0d33 |
---|---|
2063 { unsigned char* packet=NULL; | 2063 { unsigned char* packet=NULL; |
2064 int len=ds_get_packet_sub(d_dvdsub,&packet); | 2064 int len=ds_get_packet_sub(d_dvdsub,&packet); |
2065 if(len>=2){ | 2065 if(len>=2){ |
2066 int len2; | 2066 int len2; |
2067 len2=(packet[0]<<8)+packet[1]; | 2067 len2=(packet[0]<<8)+packet[1]; |
2068 printf("\rDVD sub: %d / %d \n",len,len2); | 2068 if(verbose) printf("\rDVD sub: %d / %d \n",len,len2); |
2069 if(len==len2){ | 2069 if(len==len2) |
2070 | 2070 spudec_decode(packet,len); |
2071 //----------------------------------------------------- | 2071 else |
2072 int x0, x1; | 2072 printf("fragmented dvd-subs not yet supported!!!\n"); |
2073 int d1, d2; | |
2074 int lifetime; | |
2075 x0 = (packet[2] << 8) + packet[3]; | |
2076 x1 = (packet[x0+2] << 8) + packet[x0+3]; | |
2077 | |
2078 /* /Another/ sanity check. */ | |
2079 if((packet[x1+2]<<8) + packet[x1+3] != x1) { | |
2080 printf("spudec: Incorrect packet.\n"); | |
2081 return; | |
2082 } | |
2083 lifetime= ((packet[x1]<<8) + packet[x1+1]); | |
2084 printf("lifetime=%d\n",lifetime); | |
2085 | |
2086 d1 = d2 = -1; | |
2087 spudec_process_control(packet + x0 + 2, x1-x0-2, &d1, &d2); | |
2088 // if((d1 != -1) && (d2 != -1)) { | |
2089 // spudec_process_data(packet, x0, d1, d2); | |
2090 // } | |
2091 //----------------------------------------------------- | |
2092 | |
2093 } else printf("fragmented dvd-subs not yet supported!!!\n"); | |
2094 } else if(len>=0) { | 2073 } else if(len>=0) { |
2095 printf("invalud dvd sub\n"); | 2074 printf("invalud dvd sub\n"); |
2096 } | 2075 } |
2097 } | 2076 } |
2098 | 2077 |