Commit f103d383 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: libmp4: handle ASF atom

parent 88ac075f
......@@ -1539,6 +1539,21 @@ static void MP4_FreeBox_strf( MP4_Box_t *p_box )
FREENULL( p_box->data.p_strf->p_extra );
}
static int MP4_ReadBox_ASF( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_READBOX_ENTER( MP4_Box_data_ASF_t );
MP4_Box_data_ASF_t *p_asf = p_box->data.p_asf;
if (i_read != 8)
MP4_READBOX_EXIT( 0 );
MP4_GET1BYTE( p_asf->i_stream_number );
/* remaining is unknown */
MP4_READBOX_EXIT( 1 );
}
static int MP4_ReadBox_stsdext_chan( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_READBOX_ENTER( MP4_Box_data_chan_t );
......@@ -3607,6 +3622,8 @@ static const struct
{ ATOM_yuv2, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, 0 },
{ ATOM_strf, MP4_ReadBox_strf, MP4_FreeBox_strf, ATOM_WMV3 }, /* flip4mac */
{ ATOM_ASF , MP4_ReadBox_ASF, MP4_FreeBox_Common, ATOM_WMV3 }, /* flip4mac */
{ ATOM_ASF , MP4_ReadBox_ASF, MP4_FreeBox_Common, ATOM_wave }, /* flip4mac */
{ ATOM_mp4s, MP4_ReadBox_sample_mp4s, MP4_FreeBox_Common, 0 },
......
......@@ -214,6 +214,7 @@
#define ATOM_drmi VLC_FOURCC( 'd', 'r', 'm', 'i' )
#define ATOM_frma VLC_FOURCC( 'f', 'r', 'm', 'a' )
#define ATOM_skcr VLC_FOURCC( 's', 'k', 'c', 'r' )
#define ATOM_ASF VLC_FOURCC( 'A', 'S', 'F', ' ' )
#define ATOM_text VLC_FOURCC( 't', 'e', 'x', 't' )
#define ATOM_tx3g VLC_FOURCC( 't', 'x', '3', 'g' )
......@@ -1061,6 +1062,11 @@ typedef struct
char *p_extra;
} MP4_Box_data_strf_t;
typedef struct
{
uint8_t i_stream_number;
} MP4_Box_data_ASF_t;
/* According to Apple's CoreAudio/CoreAudioTypes.h */
#define MP4_CHAN_USE_CHANNELS_DESC 0
#define MP4_CHAN_USE_CHANNELS_BITMAP (1<<16)
......@@ -1380,6 +1386,7 @@ typedef union MP4_Box_data_s
MP4_Box_data_hvcC_t *p_hvcC;
MP4_Box_data_WMA2_t *p_WMA2; /* flip4mac Little endian audio config */
MP4_Box_data_strf_t *p_strf; /* flip4mac Little endian video config */
MP4_Box_data_ASF_t *p_asf; /* flip4mac asf streams indicator */
MP4_Box_data_data_t *p_data;
......
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