Commit cf9cdcac authored by Laurent Aimar's avatar Laurent Aimar

* ts: proper fix for both.

parent 7598e76c
......@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: ts.c,v 1.26 2003/05/31 16:15:33 fenrir Exp $
* $Id: ts.c,v 1.27 2003/05/31 21:49:12 fenrir Exp $
*
* Authors: Henri Fallon <henri@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr>
......@@ -1532,8 +1532,8 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
if( p_dr && p_dr->i_length >= 8 )
{
int i_bih_size;
/* i_fourcc = VLC_FOURCC( p_dr->p_data[0], p_dr->p_data[1], p_dr->p_data[2], p_dr->p_data[3] ); */
i_fourcc = (p_dr->p_data[0] << 24)|(p_dr->p_data[1]<<16)|(p_dr->p_data[2]<<8)|p_dr->p_data[3];
/* i_fourcc = (p_dr->p_data[0] << 24)|(p_dr->p_data[1]<<16)|(p_dr->p_data[2]<<8)|p_dr->p_data[3]; */
i_fourcc = VLC_FOURCC( p_dr->p_data[0], p_dr->p_data[1], p_dr->p_data[2], p_dr->p_data[3] );
i_bih_size = (p_dr->p_data[8] << 8) | p_dr->p_data[9];
i_size = sizeof( BITMAPINFOHEADER ) + i_bih_size;
......
......@@ -2,7 +2,7 @@
* ts.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ts.c,v 1.19 2003/05/31 00:10:11 fenrir Exp $
* $Id: ts.c,v 1.20 2003/05/31 21:49:12 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
......@@ -1032,11 +1032,17 @@ static int GetPMT( sout_mux_t *p_mux,
else if( p_stream->i_stream_id == 0xa0 )
{
uint8_t data[512];
uint8_t fcc[4];
bits_buffer_t bits;
memcpy( fcc, &p_stream->i_bih_codec, 4 );
/* private DIV3 descripor */
bits_initwrite( &bits, 512, data );
bits_write( &bits, 32, p_stream->i_bih_codec );
bits_write( &bits, 8, fcc[0]);
bits_write( &bits, 8, fcc[1]);
bits_write( &bits, 8, fcc[2]);
bits_write( &bits, 8, fcc[3]);
bits_write( &bits, 16, p_stream->i_bih_width );
bits_write( &bits, 16, p_stream->i_bih_height );
bits_write( &bits, 16, p_stream->i_decoder_specific_info_len );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment