all: got rid of MP4_Stream

parent efc525bf
...@@ -574,9 +574,9 @@ static int Open( vlc_object_t * p_this ) ...@@ -574,9 +574,9 @@ static int Open( vlc_object_t * p_this )
else if( !strcmp( tk.psz_codec, "V_QUICKTIME" ) ) else if( !strcmp( tk.psz_codec, "V_QUICKTIME" ) )
{ {
MP4_Box_t *p_box = (MP4_Box_t*)malloc( sizeof( MP4_Box_t ) ); MP4_Box_t *p_box = (MP4_Box_t*)malloc( sizeof( MP4_Box_t ) );
MP4_Stream_t *p_mp4_stream = MP4_MemoryStream( p_demux->s, stream_t *p_mp4_stream = stream_MemoryNew( VLC_OBJECT(p_demux),
tk.i_extra_data, tk.p_extra_data,
tk.p_extra_data ); tk.i_extra_data );
MP4_ReadBoxCommon( p_mp4_stream, p_box ); MP4_ReadBoxCommon( p_mp4_stream, p_box );
MP4_ReadBox_sample_vide( p_mp4_stream, p_box ); MP4_ReadBox_sample_vide( p_mp4_stream, p_box );
tk.fmt.i_codec = p_box->i_type; tk.fmt.i_codec = p_box->i_type;
...@@ -586,8 +586,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -586,8 +586,7 @@ static int Open( vlc_object_t * p_this )
tk.fmt.p_extra = malloc( tk.fmt.i_extra ); tk.fmt.p_extra = malloc( tk.fmt.i_extra );
memcpy( tk.fmt.p_extra, p_box->data.p_sample_vide->p_qt_image_description, tk.fmt.i_extra ); memcpy( tk.fmt.p_extra, p_box->data.p_sample_vide->p_qt_image_description, tk.fmt.i_extra );
MP4_FreeBox_sample_vide( p_box ); MP4_FreeBox_sample_vide( p_box );
free( p_box ); stream_MemoryDelete( p_mp4_stream, VLC_TRUE );
free( p_mp4_stream );
} }
else if( !strcmp( tk.psz_codec, "A_MS/ACM" ) ) else if( !strcmp( tk.psz_codec, "A_MS/ACM" ) )
{ {
......
This diff is collapsed.
...@@ -203,19 +203,6 @@ ...@@ -203,19 +203,6 @@
/* Do you want some debug information on all read boxes ? */ /* Do you want some debug information on all read boxes ? */
#define MP4_VERBOSE 1 #define MP4_VERBOSE 1
/* memory stream and file stream object */
typedef struct MP4_Stream_s
{
int b_memory; /* do we uses a memory buffer */
stream_t *s;
off_t i_start; /* in the buffer position for memory stream */
off_t i_stop;
uint8_t *p_buffer;
} MP4_Stream_t;
struct MP4_Box_s; struct MP4_Box_s;
...@@ -927,8 +914,6 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... ); ...@@ -927,8 +914,6 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... );
*****************************************************************************/ *****************************************************************************/
int MP4_BoxCount( MP4_Box_t *p_box, char *psz_fmt, ... ); int MP4_BoxCount( MP4_Box_t *p_box, char *psz_fmt, ... );
MP4_Stream_t *MP4_MemoryStream( stream_t *s, int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box );
int i_size, uint8_t *p_buffer ); int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box );
int MP4_ReadBoxCommon( MP4_Stream_t *p_stream, MP4_Box_t *p_box );
int MP4_ReadBox_sample_vide( MP4_Stream_t *p_stream, MP4_Box_t *p_box );
void MP4_FreeBox_sample_vide( MP4_Box_t *p_box ); void MP4_FreeBox_sample_vide( MP4_Box_t *p_box );
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