]> git.sesse.net Git - vlc/commitdiff
* modules/mux/ogg.c: send the mp4v VOL data in one of the header ogg packets.
authorGildas Bazin <gbazin@videolan.org>
Fri, 21 Nov 2003 13:01:05 +0000 (13:01 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 21 Nov 2003 13:01:05 +0000 (13:01 +0000)
modules/mux/ogg.c

index 55c80d9b76baa3030dd1dc590f400a8288a19583..e4e9211e8a754f6767e93bf91eeb02edb35a0a99 100644 (file)
@@ -2,7 +2,7 @@
  * ogg.c: ogg muxer module for vlc
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ogg.c,v 1.19 2003/10/22 17:12:30 gbazin Exp $
+ * $Id: ogg.c,v 1.20 2003/11/21 13:01:05 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -707,6 +707,22 @@ static sout_buffer_t *OggCreateHeader( sout_mux_t *p_mux, mtime_t i_dts )
             p_og = OggStreamFlush( p_mux, &p_stream->os, 0 );
             sout_BufferChain( &p_hdr, p_og );
         }
+
+        /* Special case for mp4v */
+        if( p_stream->i_fourcc == VLC_FOURCC( 'm', 'p', '4', 'v' ) &&
+            p_mux->pp_inputs[i]->p_fmt->i_extra_data )
+        {
+            /* Send a packet with the VOL data */
+            op.bytes  = p_mux->pp_inputs[i]->p_fmt->i_extra_data;
+            op.packet = p_mux->pp_inputs[i]->p_fmt->p_extra_data;
+            op.b_o_s  = 0;
+            op.e_o_s  = 0;
+            op.granulepos = 0;
+            op.packetno = p_stream->i_packet_no++;
+            ogg_stream_packetin( &p_stream->os, &op );
+            p_og = OggStreamFlush( p_mux, &p_stream->os, 0 );
+            sout_BufferChain( &p_hdr, p_og );
+        }
     }
 
     /* set HEADER flag */