+
+ for( unsigned i = 0; i < i_count; i++ )
+ free( pp_data[i] );
+ }
+ else if( p_stream->i_fourcc == VLC_CODEC_DIRAC )
+ {
+ op.packet = p_input->p_fmt->p_extra;
+ op.bytes = p_input->p_fmt->i_extra;
+ op.b_o_s = 1;
+ 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 );
+ }
+ else if( p_stream->i_fourcc == VLC_CODEC_FLAC )
+ {
+ /* flac stream marker (yeah, only that in the 1st packet) */
+ op.packet = (unsigned char *)"fLaC";
+ op.bytes = 4;
+ op.b_o_s = 1;
+ 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 );
+ }
+ else if( p_stream->p_oggds_header )
+ {
+ /* ds header */
+ op.packet = (uint8_t*)p_stream->p_oggds_header;
+ op.bytes = p_stream->p_oggds_header->i_size + 1;
+ op.b_o_s = 1;
+ 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 );