Changeset 834b64d0f742bf300b015afdfef91a5f3fa7382c

Show
Ignore:
Timestamp:
08/22/06 20:24:57 (2 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1156271097 +0000
git-parent:

[10e3212ea54875dd09bc3ac36bd31b7f795a1cb8]

git-author:
Gildas Bazin <gbazin@videolan.org> 1156271097 +0000
Message:

* modules/packetizer/h264.c: fixed insertion of SPS/PPS.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/packetizer/h264.c

    rcc5aad0 r834b64d  
    8585    int i_idr_pic_id; 
    8686    int i_frame_num; 
     87    int i_frame_type; 
    8788}; 
    8889 
     
    164165    p_sys->i_idr_pic_id = -1; 
    165166    p_sys->i_frame_num = -1; 
     167    p_sys->i_frame_type = 0; 
    166168 
    167169    /* Setup properties */ 
     
    478480        p_pic = block_ChainGather( p_sys->p_frame );          \ 
    479481        p_pic->i_length = 0;    /* FIXME */                   \ 
     482        p_pic->i_flags |= p_sys->i_frame_type;                \ 
    480483                                                              \ 
     484        p_sys->i_frame_type = 0;                              \ 
    481485        p_sys->p_frame = NULL;                                \ 
    482486        p_sys->b_slice = VLC_FALSE;                           \ 
     
    515519    { 
    516520        uint8_t *dec; 
    517         int i_dec, i_first_mb, i_slice_type, i_frame_num, i_pic_flags = 0
     521        int i_dec, i_first_mb, i_slice_type, i_frame_num
    518522        vlc_bool_t b_pic = VLC_FALSE; 
    519523        bs_t s; 
     
    530534        switch( (i_slice_type = bs_read_ue( &s )) ) 
    531535        { 
    532             case 0: case 5: 
    533                 i_pic_flags = BLOCK_FLAG_TYPE_P; 
    534                 break; 
    535             case 1: case 6: 
    536                 i_pic_flags = BLOCK_FLAG_TYPE_B; 
    537                 break; 
    538             case 2: case 7: 
    539                 i_pic_flags = BLOCK_FLAG_TYPE_I; 
    540                 break; 
    541             case 3: case 8: /* SP */ 
    542                 i_pic_flags = BLOCK_FLAG_TYPE_P; 
    543                 break; 
    544             case 4: case 9: 
    545                 i_pic_flags = BLOCK_FLAG_TYPE_I; 
    546                 break; 
    547         } 
    548         p_frag->i_flags |= i_pic_flags; 
     536        case 0: case 5: 
     537            p_sys->i_frame_type = BLOCK_FLAG_TYPE_P; 
     538            break; 
     539        case 1: case 6: 
     540            p_sys->i_frame_type = BLOCK_FLAG_TYPE_B; 
     541            break; 
     542        case 2: case 7: 
     543            p_sys->i_frame_type = BLOCK_FLAG_TYPE_I; 
     544            break; 
     545        case 3: case 8: /* SP */ 
     546            p_sys->i_frame_type = BLOCK_FLAG_TYPE_P; 
     547            break; 
     548        case 4: case 9: 
     549            p_sys->i_frame_type = BLOCK_FLAG_TYPE_I; 
     550            break; 
     551        } 
    549552 
    550553        /* pic_parameter_set_id */