Commit 23445cd5 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: asf: reject DRM'ed files

Keep #8241 open ???
parent 5606132e
...@@ -755,6 +755,17 @@ static int DemuxInit( demux_t *p_demux ) ...@@ -755,6 +755,17 @@ static int DemuxInit( demux_t *p_demux )
goto error; goto error;
} }
if ( ASF_FindObject( p_sys->p_root->p_hdr,
&asf_object_content_encryption_guid, 0 ) != NULL
|| ASF_FindObject( p_sys->p_root->p_hdr,
&asf_object_extended_content_encryption_guid, 0 ) != NULL
|| ASF_FindObject( p_sys->p_root->p_hdr,
&asf_object_advanced_content_encryption_guid, 0 ) != NULL )
{
msg_Warn( p_demux, "ASF plugin discarded (DRM encumbered content)" );
goto error;
}
p_sys->i_track = ASF_CountObject( p_sys->p_root->p_hdr, p_sys->i_track = ASF_CountObject( p_sys->p_root->p_hdr,
&asf_object_stream_properties_guid ); &asf_object_stream_properties_guid );
if( p_sys->i_track <= 0 ) if( p_sys->i_track <= 0 )
......
...@@ -1241,6 +1241,13 @@ static void ASF_FreeObject_marker( asf_object_t *p_obj) ...@@ -1241,6 +1241,13 @@ static void ASF_FreeObject_marker( asf_object_t *p_obj)
FREENULL( p_mk->name ); FREENULL( p_mk->name );
} }
static int ASF_ReadObject_Raw(stream_t *s, asf_object_t *p_obj)
{
VLC_UNUSED(s);
VLC_UNUSED(p_obj);
return VLC_SUCCESS;
}
#if 0 #if 0
static int ASF_ReadObject_XXX(stream_t *s, asf_object_t *p_obj) static int ASF_ReadObject_XXX(stream_t *s, asf_object_t *p_obj)
{ {
...@@ -1318,6 +1325,12 @@ static const struct ...@@ -1318,6 +1325,12 @@ static const struct
{ &asf_object_extended_content_description, ASF_OBJECT_OTHER, { &asf_object_extended_content_description, ASF_OBJECT_OTHER,
ASF_ReadObject_extended_content_description, ASF_ReadObject_extended_content_description,
ASF_FreeObject_extended_content_description }, ASF_FreeObject_extended_content_description },
{ &asf_object_content_encryption_guid, ASF_OBJECT_OTHER,
ASF_ReadObject_Raw, ASF_FreeObject_Null },
{ &asf_object_advanced_content_encryption_guid, ASF_OBJECT_OTHER,
ASF_ReadObject_Raw, ASF_FreeObject_Null },
{ &asf_object_extended_content_encryption_guid, ASF_OBJECT_OTHER,
ASF_ReadObject_Raw, ASF_FreeObject_Null },
{ &asf_object_null_guid, 0, NULL, NULL } { &asf_object_null_guid, 0, NULL, NULL }
}; };
...@@ -1468,6 +1481,9 @@ static const struct ...@@ -1468,6 +1481,9 @@ static const struct
{ &asf_object_advanced_mutual_exclusion, "Advanced Mutual Exclusion" }, { &asf_object_advanced_mutual_exclusion, "Advanced Mutual Exclusion" },
{ &asf_object_stream_prioritization, "Stream Prioritization" }, { &asf_object_stream_prioritization, "Stream Prioritization" },
{ &asf_object_extended_content_description, "Extended content description"}, { &asf_object_extended_content_description, "Extended content description"},
{ &asf_object_content_encryption_guid, "Content Encryption"},
{ &asf_object_advanced_content_encryption_guid, "Advanced Content Encryption"},
{ &asf_object_extended_content_encryption_guid, "Entended Content Encryption"},
{ NULL, "Unknown" }, { NULL, "Unknown" },
}; };
......
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