Changeset 21a37621e4bf8618698805af3d19baa3b6cbdd98

Show
Ignore:
Timestamp:
26/04/05 09:21:31 (4 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1114500091 +0000
git-parent:

[ec88aa0533f9caca8642199025869b1ec3c0f803]

git-author:
Laurent Aimar <fenrir@videolan.org> 1114500091 +0000
Message:
  • asf, b4s: warning fixes.
  • ts: - set BLOCK_FLAG_CORRUPTED on transport_error_indicator.
    • better support of EIT + VLC_META_NOW_PLAYING.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/asf/libasf.c

    rb06d628 r21a3762  
    905905        { 
    906906            /* This p_sp will be inserted by ReadRoot later */ 
    907             p_esp->p_sp = p_sp; 
     907            p_esp->p_sp = (asf_object_stream_properties_t*)p_sp; 
    908908        } 
    909909    } 
  • modules/demux/playlist/b4s.c

    re2e0f4d r21a3762  
    115115    demux_sys_t *p_sys = p_demux->p_sys; 
    116116    playlist_t *p_playlist; 
    117     playlist_item_t *p_item, *p_current, *p_bitrate, *p_genre; 
     117    playlist_item_t *p_item, *p_current; 
     118    playlist_item_t *p_bitrate = NULL, *p_genre = NULL; 
    118119 
    119120    vlc_bool_t b_play; 
     
    126127    char *psz_mrl = NULL, *psz_name = NULL, *psz_genre = NULL; 
    127128    char *psz_now = NULL, *psz_listeners = NULL, *psz_bitrate = NULL; 
    128          
     129 
    129130 
    130131    b_shoutcast = p_sys->b_shout; 
    131      
     132 
    132133    p_playlist = (playlist_t *) vlc_object_find( p_demux, VLC_OBJECT_PLAYLIST, 
    133134                                                 FIND_PARENT ); 
  • modules/demux/ts.c

    rb559e12 r21a3762  
    2626 *****************************************************************************/ 
    2727#include <stdlib.h>                                      /* malloc(), free() */ 
     28#include <ctype.h> 
    2829 
    2930#include <vlc/vlc.h> 
     
    14031404        msg_Dbg( p_demux, "transport_error_indicator set (pid=%d)", 
    14041405                 pid->i_pid ); 
     1406        if( pid->es->p_pes ) //&& pid->es->fmt.i_cat == VIDEO_ES ) 
     1407            pid->es->p_pes->i_flags |= BLOCK_FLAG_CORRUPTED; 
    14051408    } 
    14061409 
     
    21122115} 
    21132116#endif 
    2114  
     2117static void EITEventFixString( char *psz ) 
     2118
     2119    int i_len; 
     2120    /* Sometimes the first char isn't a normal char but designed 
     2121     * caracters encoding, for now lets skip it */ 
     2122    if( isalnum(psz[0]) ) 
     2123            return; 
     2124    if( ( i_len = strlen( psz ) ) > 0 ) 
     2125        memmove( &psz[0], &psz[1], i_len ); /* Copy the \0 too */ 
     2126
    21152127static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit ) 
    21162128{ 
    21172129    dvbpsi_eit_event_t *p_evt; 
     2130    vlc_meta_t         *p_meta; 
     2131    vlc_bool_t b_event_active = VLC_FALSE; 
    21182132 
    21192133    msg_Dbg( p_demux, "EITCallBack called" ); 
     
    21312145             p_eit->i_segment_last_section_number, p_eit->i_last_table_id ); 
    21322146 
     2147    p_meta = vlc_meta_New(); 
    21332148    for( p_evt = p_eit->p_first_event; p_evt; p_evt = p_evt->p_next ) 
    21342149    { 
    2135         vlc_meta_t          *p_meta = vlc_meta_New(); 
    21362150        dvbpsi_descriptor_t *p_dr; 
    21372151        char                *psz_cat = malloc( strlen("Event")+10 ); 
     
    21772191                    psz_text[pE->i_text_length] = '\0'; 
    21782192 
     2193                    EITEventFixString(psz_name); 
     2194                    EITEventFixString(psz_text); 
    21792195                    msg_Dbg( p_demux, "    - short event lang=%3.3s '%s' : '%s'", 
    21802196                             pE->i_iso_639_code, psz_name, psz_text ); 
     
    21972213                                pE->i_item_description_length[i] ); 
    21982214                        str1[pE->i_item_description_length[i]] = '\0'; 
    2199  
    2200                         memcpy( str1, pE->i_item[i], 
     2215                        EITEventFixString(str1); 
     2216 
     2217                        memcpy( str2, pE->i_item[i], 
    22012218                                pE->i_item_length[i] ); 
    22022219                        str2[pE->i_item_length[i]] = '\0'; 
     2220                        EITEventFixString(str2); 
    22032221 
    22042222                        msg_Dbg( p_demux, "       - desc='%s' item='%s'", str1, str2 ); 
     
    22142232                    memcpy( str1, pE->i_text, pE->i_text_length ); 
    22152233                    str1[pE->i_text_length] = '\0'; 
     2234                    EITEventFixString(str1); 
     2235 
    22162236                    msg_Dbg( p_demux, "       - text='%s'", str1 ); 
    22172237                    psz_extra = realloc( psz_extra, 
     
    22352255        free( psz_value ); 
    22362256 
    2237         es_out_Control( p_demux->out, ES_OUT_SET_GROUP_META, 
    2238                         p_eit->i_service_id, p_meta ); 
    2239         vlc_meta_Delete( p_meta ); 
     2257        if( p_evt->i_running_status == 0x04 ) 
     2258        { 
     2259            vlc_meta_Add( p_meta, VLC_META_NOW_PLAYING, psz_name ); 
     2260            b_event_active = VLC_TRUE; 
     2261        } 
    22402262 
    22412263        free( psz_cat ); 
    22422264        free( psz_extra ); 
    22432265    } 
     2266 
     2267    if( !b_event_active ) 
     2268        vlc_meta_Add( p_meta, VLC_META_NOW_PLAYING, "" ); 
     2269    es_out_Control( p_demux->out, ES_OUT_SET_GROUP_META, 
     2270                    p_eit->i_service_id, p_meta ); 
     2271    vlc_meta_Delete( p_meta ); 
     2272 
    22442273    dvbpsi_DeleteEIT( p_eit ); 
    22452274}