Changeset 626d8bea9aeafbef8933bf7ea1cf64b9078a3fea

Show
Ignore:
Timestamp:
25/02/03 18:17:43 (6 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1046193463 +0000
git-parent:

[08a2b6bac021bad835616e833ab17584dcca3df1]

git-author:
Laurent Aimar <fenrir@videolan.org> 1046193463 +0000
Message:
  • stream_output.* : added a flags variable to sout_buffer_t, allowing to

mark headers.

  • httpd : added a way to use stream header, and changed the way that

stream data are stored (allow better client handling).

  • http : use stream header, and add mime type detection by looking

at file extention (could be improved).

  • ogg: fixed a segfault when removing a stream, mark header.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/httpd.h

    r84aaa85 r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001-2003 VideoLAN 
    5  * $Id: httpd.h,v 1.1 2003/02/23 19:05:22 fenrir Exp $ 
     5 * $Id: httpd.h,v 1.2 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    5858                                              httpd_stream_t *, 
    5959                                              uint8_t *, int ); 
     60    int             (*pf_header_stream)     ( httpd_t *, 
     61                                              httpd_stream_t *, 
     62                                              uint8_t *, int ); 
    6063    void            (*pf_unregister_stream) ( httpd_t *, httpd_stream_t * ); 
    6164}; 
  • include/stream_output.h

    r7def704 r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: stream_output.h,v 1.7 2003/02/24 11:00:54 fenrir Exp $ 
     5 * $Id: stream_output.h,v 1.8 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    3737 * 
    3838 */ 
     39#define SOUT_BUFFER_FLAGS_HEADER    0x0001 
    3940struct sout_buffer_t 
    4041{ 
     
    5152    mtime_t                 i_pts; 
    5253 
     54    uint32_t                i_flags; 
    5355    int                     i_bitrate; 
    5456 
  • modules/access_output/http.c

    r84aaa85 r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001-2003 VideoLAN 
    5  * $Id: http.c,v 1.1 2003/02/23 19:05:22 fenrir Exp $ 
     5 * $Id: http.c,v 1.2 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    6767    /* stream */ 
    6868    httpd_stream_t      *p_httpd_stream; 
     69 
     70    /* gather header from stream */ 
     71    int                 i_header_allocated; 
     72    int                 i_header_size; 
     73    uint8_t             *p_header; 
     74    vlc_bool_t          b_header_complete; 
    6975}; 
    7076 
     77static struct 
     78{ 
     79    char *psz_ext; 
     80    char *psz_mime; 
     81} http_mime[] = 
     82{ 
     83    { ".avi",   "video/avi" }, 
     84    { ".asf",   "video/x-ms-asf" }, 
     85    { ".m1a",   "audio/mpeg" }, 
     86    { ".m2a",   "audio/mpeg" }, 
     87    { ".m1v",   "video/mpeg" }, 
     88    { ".m2v",   "video/mpeg" }, 
     89    { ".mp2",   "audio/mpeg" }, 
     90    { ".mp3",   "audio/mpeg" }, 
     91    { ".mpa",   "audio/mpeg" }, 
     92    { ".mpg",   "video/mpeg" }, 
     93    { ".mpeg",  "video/mpeg" }, 
     94    { ".mpe",   "video/mpeg" }, 
     95    { ".mov",   "video/quicktime" }, 
     96    { ".moov",  "video/quicktime" }, 
     97    { ".ogg",   "application/ogg" }, 
     98    { ".ogm",   "application/ogg" }, 
     99    { ".wav",   "audio/wav" }, 
     100    { NULL,     NULL } 
     101}; 
     102 
     103static char *GetMime( char *psz_name ) 
     104{ 
     105    char *psz_ext; 
     106 
     107    psz_ext = strrchr( psz_name, '.' ); 
     108    if( psz_ext ) 
     109    { 
     110        int i; 
     111 
     112        for( i = 0; http_mime[i].psz_ext != NULL ; i++ ) 
     113        { 
     114            if( !strcmp( http_mime[i].psz_ext, psz_ext ) ) 
     115            { 
     116                return( http_mime[i].psz_mime ); 
     117            } 
     118        } 
     119    } 
     120    return( "application/octet-stream" ); 
     121} 
    71122/***************************************************************************** 
    72123 * Open: open the file 
     
    166217    p_sys->p_httpd_stream = 
    167218        p_sys->p_httpd->pf_register_stream( p_sys->p_httpd, 
    168                                             psz_file_name, "application/x-octet_stream", 
     219                                            psz_file_name, 
     220                                            GetMime( psz_file_name ), 
    169221                                            NULL, NULL ); 
    170222 
     
    182234    } 
    183235 
     236    p_sys->i_header_allocated = 1024; 
     237    p_sys->i_header_size      = 0; 
     238    p_sys->p_header           = malloc( p_sys->i_header_allocated ); 
     239    p_sys->b_header_complete  = VLC_FALSE; 
     240 
    184241    p_access->pf_write       = Write; 
    185242    p_access->pf_seek        = Seek; 
     
    201258    httpd_Release( p_sys->p_httpd ); 
    202259 
     260    FREE( p_sys->p_header ); 
     261 
    203262    msg_Info( p_access, "Close" ); 
    204263 
     
    218277        sout_buffer_t *p_next; 
    219278 
     279        if( p_buffer->i_flags & SOUT_BUFFER_FLAGS_HEADER ) 
     280        { 
     281            /* gather header */ 
     282            if( p_sys->b_header_complete ) 
     283            { 
     284                /* free previously gathered header */ 
     285                p_sys->i_header_size = 0; 
     286                p_sys->b_header_complete = VLC_FALSE; 
     287            } 
     288            if( p_buffer->i_size + p_sys->i_header_size > p_sys->i_header_allocated ) 
     289            { 
     290                p_sys->i_header_allocated = p_buffer->i_size + p_sys->i_header_size + 1024; 
     291                p_sys->p_header = realloc( p_sys->p_header, p_sys->i_header_allocated ); 
     292            } 
     293            memcpy( &p_sys->p_header[p_sys->i_header_size], 
     294                    p_buffer->p_buffer, 
     295                    p_buffer->i_size ); 
     296            p_sys->i_header_size += p_buffer->i_size; 
     297        } 
     298        else if( !p_sys->b_header_complete ) 
     299        { 
     300            p_sys->b_header_complete = VLC_TRUE; 
     301 
     302            p_sys->p_httpd->pf_header_stream( p_sys->p_httpd, 
     303                                              p_sys->p_httpd_stream, 
     304                                              p_sys->p_header, p_sys->i_header_size ); 
     305        } 
     306            /* send data */ 
    220307        i_err = p_sys->p_httpd->pf_send_stream( p_sys->p_httpd, p_sys->p_httpd_stream, 
    221308                                                p_buffer->p_buffer, p_buffer->i_size ); 
     
    230317        } 
    231318    } 
     319 
    232320    if( i_err < 0 ) 
    233321    { 
  • modules/misc/httpd.c

    r3755de8 r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001-2003 VideoLAN 
    5  * $Id: httpd.c,v 1.2 2003/02/24 11:14:16 gbazin Exp $ 
     5 * $Id: httpd.c,v 1.3 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    9797 * Prototypes 
    9898 *****************************************************************************/ 
    99 static httpd_host_t     *RegisterHost( httpd_t *, char *, int ); 
    100 static void             UnregisterHost( httpd_t *, httpd_host_t * ); 
    101  
    102 static httpd_file_t     *RegisterFile( httpd_t *, 
    103                                        char *psz_file, char *psz_mime, 
    104                                        char *psz_user, char *psz_password, 
    105                                        httpd_file_callback pf_fill, 
    106                                        httpd_file_callback_args_t *p_args ); 
    107 static void             UnregisterFile( httpd_t *, httpd_file_t * ); 
     99static httpd_host_t     *RegisterHost   ( httpd_t *, char *, int ); 
     100static void             UnregisterHost  ( httpd_t *, httpd_host_t * ); 
     101 
     102static httpd_file_t     *RegisterFile   ( httpd_t *, 
     103                                          char *psz_file, char *psz_mime, 
     104                                          char *psz_user, char *psz_password, 
     105                                          httpd_file_callback pf_fill, 
     106                                          httpd_file_callback_args_t *p_args ); 
     107static void             UnregisterFile  ( httpd_t *, httpd_file_t * ); 
    108108 
    109109//#define httpd_stream_t              httpd_file_t 
    110 static httpd_stream_t   *RegisterStream( httpd_t *, 
     110static httpd_stream_t   *RegisterStream ( httpd_t *, 
    111111                                         char *psz_file, char *psz_mime, 
    112112                                         char *psz_user, char *psz_password ); 
    113 static int              SendStream( httpd_t *, httpd_stream_t *, uint8_t *, int ); 
     113static int              SendStream      ( httpd_t *, httpd_stream_t *, uint8_t *, int ); 
     114static int              HeaderStream    ( httpd_t *, httpd_stream_t *, uint8_t *, int ); 
    114115static void             UnregisterStream( httpd_t *, httpd_stream_t* ); 
    115116 
     
    152153 
    153154    /* private */ 
    154     int         i_buffer_size;  /* buffer size */ 
    155     uint8_t     *p_buffer;      /* buffer */ 
    156     int         i_buffer;       /* reading pointer */ 
    157     int         i_buffer_valid; /* valid data from 0 */ 
    158  
     155 
     156    /* circular buffer for stream only */ 
     157    int         i_buffer_size;      /* buffer size, can't be reallocated smaller */ 
     158    uint8_t     *p_buffer;          /* buffer */ 
     159    int64_t     i_buffer_pos;       /* absolute position from begining */ 
     160    int         i_buffer_last_pos;  /* a new connection will start with that */ 
     161 
     162    /* data to be send at connection time (if any) */ 
     163    int         i_header_size; 
     164    uint8_t     *p_header; 
    159165}; 
    160166 
     
    182188    httpd_file_t    *p_file; 
    183189 
     190    /* used while sending header and file */ 
    184191    int     i_buffer_size; 
    185192    uint8_t *p_buffer; 
    186     int     i_buffer;                   /* private */ 
     193    int     i_buffer;            /* private */ 
     194 
     195    /* used for stream */ 
     196    int64_t i_stream_pos;   /* absolute pos in stream */ 
    187197} httpd_connection_t; 
    188198 
     
    265275    p_httpd->pf_unregister_file = UnregisterFile; 
    266276    p_httpd->pf_register_stream = RegisterStream; 
     277    p_httpd->pf_header_stream   = HeaderStream; 
    267278    p_httpd->pf_send_stream     = SendStream; 
    268279    p_httpd->pf_unregister_stream=UnregisterStream; 
     
    634645    } 
    635646 
    636     p_file->b_stream        = VLC_FALSE; 
    637     p_file->p_sys           = p_args; 
    638     p_file->pf_fill         = pf_fill; 
    639  
    640     p_file->i_buffer_size   = 0; 
    641     p_file->i_buffer_valid  = 0; 
    642     p_file->i_buffer        = 0; 
    643     p_file->p_buffer        = NULL; 
     647    p_file->b_stream          = VLC_FALSE; 
     648    p_file->p_sys             = p_args; 
     649    p_file->pf_fill           = pf_fill; 
     650 
     651    p_file->i_buffer_size     = 0; 
     652    p_file->i_buffer_last_pos = 0; 
     653    p_file->i_buffer_pos      = 0; 
     654    p_file->p_buffer          = NULL; 
     655 
     656    p_file->i_header_size     = 0; 
     657    p_file->p_header          = NULL; 
    644658 
    645659    __RegisterFile( p_httpt, p_file ); 
     
    678692    { 
    679693        vlc_mutex_unlock( &p_httpt->file_lock ); 
    680         msg_Err( p_httpt, "%s already registeret", psz_file ); 
     694        msg_Err( p_httpt, "%s already registered", psz_file ); 
    681695        return NULL; 
    682696    } 
     
    702716    p_stream->p_sys           = NULL; 
    703717    p_stream->pf_fill         = NULL; 
    704     p_stream->i_buffer_size   = 1024*1024; 
    705     p_stream->i_buffer_valid  = 0; 
    706     p_stream->i_buffer        = 0; 
     718 
     719    p_stream->i_buffer_size   = 1024*1024*10; 
     720    p_stream->i_buffer_pos      = 0; 
     721    p_stream->i_buffer_last_pos = 0; 
    707722    p_stream->p_buffer        = malloc( p_stream->i_buffer_size ); 
     723 
     724    p_stream->i_header_size   = 0; 
     725    p_stream->p_header        = NULL; 
    708726 
    709727    __RegisterFile( p_httpt, p_stream ); 
     
    769787    } 
    770788    FREE( p_file->p_buffer ); 
     789    FREE( p_file->p_header ); 
    771790 
    772791    FREE( p_file ); 
     
    807826static int             _SendStream( httpd_sys_t *p_httpt, httpd_stream_t *p_stream, uint8_t *p_data, int i_data ) 
    808827{ 
    809     if( i_data <= 0 ) 
     828    int i_count; 
     829    int i_pos; 
     830 
     831    if( i_data <= 0 || p_data == NULL ) 
    810832    { 
    811833        return( VLC_SUCCESS ); 
    812834    } 
     835    //fprintf( stderr, "## i_data=%d pos=%lld\n", i_data, p_stream->i_buffer_pos ); 
    813836 
    814837    vlc_mutex_lock( &p_httpt->file_lock ); 
    815     if( p_stream->i_buffer_size < p_stream->i_buffer_valid + i_data ) 
    816     { 
    817         /* not enough room */ 
    818         if( p_stream->i_buffer < p_stream->i_buffer_valid ) 
    819         { 
    820             memmove( p_stream->p_buffer, 
    821                      p_stream->p_buffer + p_stream->i_buffer, 
    822                      p_stream->i_buffer_valid - p_stream->i_buffer ); 
    823         } 
    824         p_stream->i_buffer_valid -= p_stream->i_buffer; 
    825  
    826         p_stream->i_buffer = 0; 
    827     } 
    828     i_data = __MIN( i_data, p_stream->i_buffer_size - p_stream->i_buffer_valid ); 
    829     memcpy( p_stream->p_buffer + p_stream->i_buffer_valid, p_data, i_data ); 
    830     p_stream->i_buffer_valid += i_data; 
    831  
     838 
     839    /* save this pointer (to be used by new connection) */ 
     840    p_stream->i_buffer_last_pos = p_stream->i_buffer_pos; 
     841 
     842    i_pos = p_stream->i_buffer_pos % p_stream->i_buffer_size; 
     843    i_count = i_data; 
     844    while( i_count > 0) 
     845    { 
     846        int i_copy; 
     847 
     848        i_copy = __MIN( i_data, p_stream->i_buffer_size - i_pos ); 
     849 
     850        memcpy( &p_stream->p_buffer[i_pos], 
     851                p_data, 
     852                i_copy ); 
     853 
     854        i_pos = ( i_pos + i_copy ) % p_stream->i_buffer_size; 
     855        i_count -= i_copy; 
     856        p_data += i_copy; 
     857    } 
     858 
     859    p_stream->i_buffer_pos += i_data; 
    832860    vlc_mutex_unlock( &p_httpt->file_lock ); 
    833861 
     
    837865{ 
    838866    return( _SendStream( p_httpd->p_sys, p_stream, p_data, i_data ) ); 
     867} 
     868 
     869static int             HeaderStream( httpd_t *p_httpd, httpd_stream_t *p_stream, uint8_t *p_data, int i_data ) 
     870{ 
     871    httpd_sys_t *p_httpt = p_httpd->p_sys; 
     872 
     873    vlc_mutex_lock( &p_httpt->file_lock ); 
     874 
     875    FREE( p_stream->p_header ); 
     876    if( p_data == NULL || i_data <= 0 ) 
     877    { 
     878        p_stream->i_header_size = 0; 
     879    } 
     880    else 
     881    { 
     882        p_stream->i_header_size = i_data; 
     883        p_stream->p_header = malloc( i_data ); 
     884        memcpy( p_stream->p_header, 
     885                p_data, 
     886                i_data ); 
     887    } 
     888    vlc_mutex_unlock( &p_httpt->file_lock ); 
     889 
     890    return( VLC_SUCCESS ); 
    839891} 
    840892 
     
    10131065    p_con->p_buffer = malloc( p_con->i_buffer_size ); 
    10141066 
     1067    p_con->i_stream_pos = 0; // updated by httpd_thread */ 
    10151068    p_con->p_next = NULL; 
    10161069 
     
    13111364    p_con->i_state = HTTPD_CONNECTION_SENDING_HEADER; 
    13121365 
     1366    /* we send stream header with this one */ 
     1367    if( p_con->i_http_error == 200 && p_con->p_file->b_stream ) 
     1368    { 
     1369        p_con->i_buffer_size = 4096 + p_con->p_file->i_header_size; 
     1370    } 
     1371 
    13131372    p_con->i_buffer_size = 4096; 
    13141373    p_con->i_buffer = 0; 
     
    13231382    p += sprintf( p, "\r\n" ); 
    13241383 
    1325     p_con->i_buffer_size = strlen( p_con->p_buffer ) + 1; 
     1384    p_con->i_buffer_size = strlen( p_con->p_buffer );// + 1; 
     1385 
     1386    if( p_con->i_http_error == 200 && p_con->p_file->b_stream && p_con->p_file->i_header_size > 0 ) 
     1387    { 
     1388        /* add stream header */ 
     1389        memcpy( &p_con->p_buffer[p_con->i_buffer_size], 
     1390                p_con->p_file->p_header, 
     1391                p_con->p_file->i_header_size ); 
     1392        p_con->i_buffer_size += p_con->p_file->i_header_size; 
     1393    } 
    13261394 
    13271395    //msg_Dbg( p_httpt, "answer=\n%s", p_con->p_buffer ); 
    13281396} 
    1329 #define HTTPD_STREAM_PACKET 1300 
     1397#define HTTPD_STREAM_PACKET 10000 
    13301398static void httpd_Thread( httpd_sys_t *p_httpt ) 
    13311399{ 
     
    14781546                            { 
    14791547                                p_con->i_state = HTTPD_CONNECTION_SENDING_STREAM; 
     1548                                p_con->i_stream_pos = p_con->p_file->i_buffer_last_pos; 
    14801549                            } 
    14811550                            p_con = p_con->p_next; 
     
    15021571            else if( p_con->i_state == HTTPD_CONNECTION_SENDING_STREAM ) 
    15031572            { 
    1504                 httpd_file_t *p_file = p_con->p_file; 
    1505                 int i_len
    1506  
    1507                 //msg_Dbg( p_httpt, "buffer=%d buffer_size=%d", p_file->i_buffer, p_file->i_buffer_size ); 
    1508                 if( p_file->i_buffer < p_file->i_buffer_valid
     1573                httpd_stream_t *p_stream = p_con->p_file; 
     1574                int i_send
     1575                int i_write; 
     1576 
     1577                if( p_con->i_stream_pos < p_stream->i_buffer_pos
    15091578                { 
    1510                     int i_write; 
    1511                     /* write data */ 
    1512                     i_write = __MIN( p_file->i_buffer_valid - p_file->i_buffer, HTTPD_STREAM_PACKET ); 
    1513                     i_len = send( p_con->fd, p_file->p_buffer + p_file->i_buffer, i_write, 0 ); 
    1514  
    1515                     if( ( i_len < 0 && errno != EAGAIN && errno != EINTR )|| 
    1516                         ( i_len == 0 ) ) 
     1579                    int i_pos; 
     1580                    /* check if this p_con aren't to late */ 
     1581                    if( p_con->i_stream_pos + p_stream->i_buffer_size < p_stream->i_buffer_pos ) 
     1582                    { 
     1583                        fprintf(stderr, "fixing i_stream_pos (old=%lld i_buffer_pos=%lld\n", p_con->i_stream_pos, p_stream->i_buffer_pos  ); 
     1584                        p_con->i_stream_pos = p_stream->i_buffer_last_pos; 
     1585                    } 
     1586 
     1587                    i_pos = p_con->i_stream_pos % p_stream->i_buffer_size; 
     1588                    /* size until end of buffer */ 
     1589                    i_write = p_stream->i_buffer_size - i_pos; 
     1590                    /* is it more than valid data */ 
     1591                    if( i_write >= p_stream->i_buffer_pos - p_con->i_stream_pos ) 
     1592                    { 
     1593                        i_write = p_stream->i_buffer_pos - p_con->i_stream_pos; 
     1594                    } 
     1595                    /* limit to HTTPD_STREAM_PACKET */ 
     1596                    if( i_write > HTTPD_STREAM_PACKET ) 
     1597                    { 
     1598                        i_write = HTTPD_STREAM_PACKET; 
     1599                    } 
     1600                    i_send = send( p_con->fd, &p_stream->p_buffer[i_pos], i_write, 0 ); 
     1601 
     1602                    if( ( i_send < 0 && errno != EAGAIN && errno != EINTR )|| ( i_send == 0 ) ) 
    15171603                    { 
    15181604                        httpd_connection_t *p_next = p_con->p_next; 
     
    15201606                        httpd_ConnnectionClose( p_httpt, p_con ); 
    15211607                        p_con = p_next; 
     1608                        continue; 
    15221609                    } 
    1523                     else 
     1610                    else if( i_send > 0 ) 
    15241611                    { 
    1525                         p_con = p_con->p_next
     1612                        p_con->i_stream_pos += i_send
    15261613                    } 
    15271614                } 
    1528                 else 
    1529                 { 
    1530                     p_con = p_con->p_next; 
    1531                 } 
     1615                p_con = p_con->p_next; 
    15321616                continue;   /* just for clarity */ 
    15331617            } 
     
    15391623        }   /* for over connection */ 
    15401624 
    1541  
     1625#if 0 
    15421626        b_wait = VLC_TRUE; 
    15431627        /* update position for stream based file */ 
     
    15551639            } 
    15561640        } 
     1641#endif 
    15571642        vlc_mutex_unlock( &p_httpt->file_lock ); 
    1558         if( b_wait ) msleep( 100 ); 
     1643        /*if( b_wait )*/ msleep( 10 ); 
    15591644    } 
    15601645    msg_Info( p_httpt, "httpd stopped" ); 
  • modules/mux/ogg.c

    rc11203a r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: ogg.c,v 1.1 2003/02/24 23:27:20 fenrir Exp $ 
     5 * $Id: ogg.c,v 1.2 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    328328 
    329329    p_og = OggStreamFlush( p_sout, &p_stream->os, 0 ); 
    330     OggSetDate( p_og, p_stream->i_dts, p_stream->i_length ); 
    331  
    332     sout_AccessOutWrite( p_sout->p_access, p_og ); 
     330    if( p_og ) 
     331    { 
     332        OggSetDate( p_og, p_stream->i_dts, p_stream->i_length ); 
     333 
     334        sout_AccessOutWrite( p_sout->p_access, p_og ); 
     335    } 
    333336 
    334337    ogg_stream_clear( &p_stream->os ); 
     
    510513    } 
    511514 
     515    /* set HEADER flag */ 
     516    for( p_og = p_hdr; p_og != NULL; p_og = p_og->p_next ) 
     517    { 
     518        p_og->i_flags |= SOUT_BUFFER_FLAGS_HEADER; 
     519    } 
    512520    return( p_hdr ); 
    513521} 
  • src/stream_output/stream_output.c

    r75292af r626d8be  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: stream_output.c,v 1.15 2003/02/24 23:28:18 fenrir Exp $ 
     5 * $Id: stream_output.c,v 1.16 2003/02/25 17:17:43 fenrir Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    635635    p_buffer->i_buffer_size = i_size; 
    636636 
    637     p_buffer->i_size = i_size; 
    638     p_buffer->i_length = 0; 
    639     p_buffer->i_dts = 0; 
    640     p_buffer->i_pts = 0; 
     637    p_buffer->i_size    = i_size; 
     638    p_buffer->i_length = 0; 
     639    p_buffer->i_dts     = 0; 
     640    p_buffer->i_pts     = 0; 
    641641    p_buffer->i_bitrate = 0; 
     642    p_buffer->i_flags   = 0x0000; 
    642643    p_buffer->p_next = NULL; 
    643644 
     
    716717    p_dup->i_pts    = p_buffer->i_pts; 
    717718    p_dup->i_length = p_buffer->i_length; 
     719    p_dup->i_flags  = p_buffer->i_flags; 
    718720    p_sout->p_vlc->pf_memcpy( p_dup->p_buffer, p_buffer->p_buffer, p_buffer->i_size ); 
    719721