Commit 006fd55e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

VLM: fix aliasing

(cherry picked from commit f3c14e26)
parent 8e70853a
...@@ -546,17 +546,19 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media ) ...@@ -546,17 +546,19 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
{ {
input_item_t item; input_item_t item;
es_format_t es, *p_es = &es; es_format_t es, *p_es = &es;
char fourcc[5]; union { char text[5]; uint32_t value; } fourcc;
sprintf( fourcc, "%4.4s", p_cfg->vod.psz_mux ); sprintf( fourcc.text, "%4.4s", p_cfg->vod.psz_mux );
fourcc[0] = tolower(fourcc[0]); fourcc[1] = tolower(fourcc[1]); fourcc.text[0] = tolower(fourcc.text[0]);
fourcc[2] = tolower(fourcc[2]); fourcc[3] = tolower(fourcc[3]); fourcc.text[1] = tolower(fourcc.text[1]);
fourcc.text[2] = tolower(fourcc.text[2]);
fourcc.text[3] = tolower(fourcc.text[3]);
/* XXX: Don't do it that way, but properly use a new input item ref. */ /* XXX: Don't do it that way, but properly use a new input item ref. */
item = *p_media->vod.p_item; item = *p_media->vod.p_item;
item.i_es = 1; item.i_es = 1;
item.es = &p_es; item.es = &p_es;
es_format_Init( &es, VIDEO_ES, *((int *)fourcc) ); es_format_Init( &es, VIDEO_ES, fourcc.value );
p_media->vod.p_media = p_media->vod.p_media =
p_vlm->p_vod->pf_media_new( p_vlm->p_vod, p_cfg->psz_name, &item ); p_vlm->p_vod->pf_media_new( p_vlm->p_vod, p_cfg->psz_name, &item );
......
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