|
|
|
@ -27,6 +27,7 @@ |
|
|
|
|
|
|
|
#include <vlc_common.h> |
|
|
|
#include <vlc_rand.h> |
|
|
|
#include <vlc_codecs.h> |
|
|
|
|
|
|
|
#include "asf.h" |
|
|
|
#include "buffer.h" |
|
|
|
@ -59,7 +60,7 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
var_buffer_initread( &buffer, p_header, i_header ); |
|
|
|
var_buffer_getguid( &buffer, &guid ); |
|
|
|
|
|
|
|
if( !CmpGUID( &guid, &asf_object_header_guid ) ) |
|
|
|
if( !guidcmp( &guid, &asf_object_header_guid ) ) |
|
|
|
{ |
|
|
|
/* ERROR: */ |
|
|
|
} |
|
|
|
@ -70,7 +71,7 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
var_buffer_getguid( &buffer, &guid ); |
|
|
|
i_size = var_buffer_get64( &buffer ); |
|
|
|
|
|
|
|
if( CmpGUID( &guid, &asf_object_file_properties_guid ) ) |
|
|
|
if( guidcmp( &guid, &asf_object_file_properties_guid ) ) |
|
|
|
{ |
|
|
|
var_buffer_getmemory( &buffer, NULL, 16 ); |
|
|
|
hdr->i_file_size = var_buffer_get64( &buffer ); |
|
|
|
@ -81,12 +82,12 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
|
|
|
|
var_buffer_getmemory( &buffer, NULL, i_size - 24 - 16 - 8 - 8 - 8 - 8-8-8-4 - 4); |
|
|
|
} |
|
|
|
else if( CmpGUID( &guid, &asf_object_header_extension_guid ) ) |
|
|
|
else if( guidcmp( &guid, &asf_object_header_extension_guid ) ) |
|
|
|
{ |
|
|
|
/* Enter it */ |
|
|
|
var_buffer_getmemory( &buffer, NULL, 46 - 24 ); |
|
|
|
} |
|
|
|
else if( CmpGUID( &guid, &asf_object_extended_stream_properties_guid ) ) |
|
|
|
else if( guidcmp( &guid, &asf_object_extended_stream_properties_guid ) ) |
|
|
|
{ |
|
|
|
/* Grrrrrr */ |
|
|
|
int16_t i_count1, i_count2; |
|
|
|
@ -126,7 +127,7 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
/* It's a hack we just skip the first part of the object until
|
|
|
|
* the embed stream properties if any (ugly, but whose fault ?) */ |
|
|
|
} |
|
|
|
else if( CmpGUID( &guid, &asf_object_stream_properties_guid ) ) |
|
|
|
else if( guidcmp( &guid, &asf_object_stream_properties_guid ) ) |
|
|
|
{ |
|
|
|
int i_stream_id; |
|
|
|
guid_t stream_type; |
|
|
|
@ -137,11 +138,11 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
i_stream_id = var_buffer_get8( &buffer ) & 0x7f; |
|
|
|
var_buffer_getmemory( &buffer, NULL, i_size - 24 - 32 - 16 - 1); |
|
|
|
|
|
|
|
if( CmpGUID( &stream_type, &asf_object_stream_type_video ) ) |
|
|
|
if( guidcmp( &stream_type, &asf_object_stream_type_video ) ) |
|
|
|
{ |
|
|
|
hdr->stream[i_stream_id].i_cat = ASF_STREAM_VIDEO; |
|
|
|
} |
|
|
|
else if( CmpGUID( &stream_type, &asf_object_stream_type_audio ) ) |
|
|
|
else if( guidcmp( &stream_type, &asf_object_stream_type_audio ) ) |
|
|
|
{ |
|
|
|
hdr->stream[i_stream_id].i_cat = ASF_STREAM_AUDIO; |
|
|
|
} |
|
|
|
@ -150,7 +151,7 @@ void asf_HeaderParse ( asf_header_t *hdr, |
|
|
|
hdr->stream[i_stream_id].i_cat = ASF_STREAM_UNKNOWN; |
|
|
|
} |
|
|
|
} |
|
|
|
else if ( CmpGUID( &guid, &asf_object_stream_bitrate_properties ) ) |
|
|
|
else if ( guidcmp( &guid, &asf_object_stream_bitrate_properties ) ) |
|
|
|
{ |
|
|
|
int i_count; |
|
|
|
uint8_t i_stream_id; |
|
|
|
|