summaryrefslogtreecommitdiffstats
path: root/demux/demux_mpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux_mpg.c')
-rw-r--r--demux/demux_mpg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_mpg.c b/demux/demux_mpg.c
index 4223a33c92..458ed9f926 100644
--- a/demux/demux_mpg.c
+++ b/demux/demux_mpg.c
@@ -282,6 +282,7 @@ static void new_audio_stream(demuxer_t *demux, int aid){
if((aid & 0xC0) == 0xC0) sh_a->format=0x2000;
else if(aid >= 0x98 && aid <= 0x9f) sh_a->format=0x2001;
if (mpg_d) mpg_d->a_stream_ids[mpg_d->num_a_streams++] = aid;
+ mp_set_audio_codec_from_tag(sh_a);
}
if(demux->audio->id==-1) demux->audio->id=aid;
}
@@ -487,6 +488,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
if(priv && ds->sh) {
sh_video_t *sh = (sh_video_t *)ds->sh;
sh->format = mmioFOURCC('W', 'V', 'C', '1');
+ mp_set_video_codec_from_tag(sh);
}
}
}
@@ -604,6 +606,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
sh->format = priv->es_map[id - 0x1B0];
mp_dbg(MSGT_DEMUX,MSGL_DBG2,"ASSIGNED TO STREAM %d CODEC %x\n", id, priv->es_map[id - 0x1B0]);
dvdpcm_header(sh);
+ mp_set_audio_codec_from_tag(sh);
}
}
} else
@@ -619,6 +622,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
sh_video_t *sh = (sh_video_t *)ds->sh;
if(priv->es_map[id - 0x1B0]) {
sh->format = priv->es_map[id - 0x1B0];
+ mp_set_video_codec_from_tag(sh);
mp_dbg(MSGT_DEMUX,MSGL_DBG2,"ASSIGNED TO STREAM %d CODEC %x\n", id, priv->es_map[id - 0x1B0]);
}
}
@@ -1186,6 +1190,7 @@ static demuxer_t* demux_mpg_ps_open(demuxer_t* demuxer)
num_elementary_packets1B6==0)
sh_video->format = 0x10000005;
else sh_video->format = 0x10000002;
+ mp_set_video_codec_from_tag(sh_video);
}
return demuxer;