unsigned int i_idxposc; /* numero of chunk */
unsigned int i_idxposb; /* byte in the current chunk */
- /* extra information given to the decoder */
- void *p_extra;
-
/* For VBR audio only */
unsigned int i_blockno;
unsigned int i_blocksize;
fmt.i_extra = __MIN( p_auds->p_wf->cbSize,
p_auds->i_chunk_size - sizeof(WAVEFORMATEX) );
- fmt.p_extra = tk->p_extra = malloc( fmt.i_extra );
+ fmt.p_extra = malloc( fmt.i_extra );
if( !fmt.p_extra ) goto error;
memcpy( fmt.p_extra, &p_auds->p_wf[1], fmt.i_extra );
uint8_t *p_out = malloc( i_headers_size );
if( !p_out ) goto error;
free( fmt.p_extra );
- fmt.p_extra = tk->p_extra = p_out;
+ fmt.p_extra = p_out;
fmt.i_extra = i_headers_size;
#define copy_packet( len ) \
*p_out++ = len >> 8; \
if( tk->p_out_muxed == NULL )
tk->p_es = es_out_Add( p_demux->out, &fmt );
TAB_APPEND( p_sys->i_track, p_sys->track, tk );
+ es_format_Clean( &fmt );
}
if( p_sys->i_track <= 0 )
if( p_sys->track[i]->p_out_muxed )
stream_Delete( p_sys->track[i]->p_out_muxed );
free( p_sys->track[i]->p_index );
- free( p_sys->track[i]->p_extra );
free( p_sys->track[i] );
}
}
break;
}
__Parse_indx( p_demux, i_stream, &ck_sub.indx );
+ AVI_ChunkFree( p_demux->s, &ck_sub );
}
}
else
p, i_payload );
if( p_attachment )
TAB_APPEND( p_sys->i_attachment, p_sys->attachment, p_attachment );
+ free( psz_name );
free( psz_description );
exit:
msg_Dbg( p_demux, "Loaded an embed subtitle" );
else
msg_Warn( p_demux, "Failed to load an embed subtitle" );
+
+ if( p_indx == &ck.indx )
+ AVI_ChunkFree( p_demux->s, &ck );
}
/*****************************************************************************
* Stream management
return VLC_FOURCC( p_buff[0], p_buff[1], p_buff[2], p_buff[3] );
}
-#define AVI_ChunkFree( a, b ) _AVI_ChunkFree( (a), (avi_chunk_t*)(b) )
-void _AVI_ChunkFree( stream_t *, avi_chunk_t *p_chk );
-
/****************************************************************************
*
* Basics functions to manipulates chunks
int _AVI_ChunkRead( stream_t *,
avi_chunk_t *p_chk,
avi_chunk_t *p_father );
+void _AVI_ChunkFree( stream_t *, avi_chunk_t * );
int _AVI_ChunkCount( avi_chunk_t *, vlc_fourcc_t );
void *_AVI_ChunkFind ( avi_chunk_t *, vlc_fourcc_t, int );
_AVI_ChunkCount( (avi_chunk_t*)p_chk, i_fourcc )
#define AVI_ChunkFind( p_chk, i_fourcc, i_number ) \
_AVI_ChunkFind( (avi_chunk_t*)p_chk, i_fourcc, i_number )
+#define AVI_ChunkFree( a, b ) \
+ _AVI_ChunkFree( (a), (avi_chunk_t*)(b) )
/* *** avi stuff *** */