Commit c892cfc9 authored by yhuelf's avatar yhuelf Committed by Jean-Baptiste Kempf
Browse files

Smooth Streaming: fix manifest parsing (FourCC)

This patch fixes playback for this VOD stream:
http://mediadl.microsoft.com/mediadl/IISNET/SmoothMedia/Learn/795/Bill_Staples_Cineform.ism/Manifest

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 91b10ca8
......@@ -276,6 +276,7 @@ static int build_smoo_box( stream_t *s, uint8_t *smoo_box )
{
stream_sys_t *p_sys = s->p_sys;
sms_stream_t *sms = NULL;
uint32_t FourCC;
/* smoo */
memset( smoo_box, 0, SMOO_SIZE );
......@@ -327,7 +328,8 @@ static int build_smoo_box( stream_t *s, uint8_t *smoo_box )
quality_level_t * qlvl = get_qlevel( sms, sms->download_qlvl );
((uint32_t *)stra_box)[16] = bswap32( qlvl->FourCC );
FourCC = qlvl->FourCC ? qlvl->FourCC : sms->default_FourCC;
((uint32_t *)stra_box)[16] = bswap32( FourCC );
((uint32_t *)stra_box)[17] = bswap32( qlvl->Bitrate );
((uint32_t *)stra_box)[18] = bswap32( qlvl->MaxWidth );
((uint32_t *)stra_box)[19] = bswap32( qlvl->MaxHeight );
......
......@@ -203,6 +203,9 @@ static int parse_Manifest( stream_t *s )
stream_name = strdup( value );
if( !strcmp( name, "TimeScale" ) )
sms->timescale = strtoull( value, NULL, 10 );
if( !strcmp( name, "FourCC" ) )
sms->default_FourCC =
VLC_FOURCC( value[0], value[1], value[2], value[3] );
if( !strcmp( name, "Chunks" ) )
{
......
......@@ -73,6 +73,7 @@ typedef struct sms_stream_s
{
vlc_array_t *qlevels; /* list of available Quality Levels */
vlc_array_t *chunks; /* list of chunks */
uint32_t default_FourCC;
unsigned vod_chunks_nb; /* total num of chunks of the VOD stream */
unsigned timescale;
unsigned qlevel_nb; /* number of quality levels */
......
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