Mercurial > mplayer.hg
comparison libmpdemux/demux_ts.c @ 36811:92dd1764392a
demuxers: remove pointless sh->ds assignments.
The new_sh_* functions have been fixed a long time
ago to do this.
author | reimar |
---|---|
date | Sun, 23 Feb 2014 18:14:44 +0000 |
parents | 323fb622da7e |
children | a0a13230b8d1 |
comparison
equal
deleted
inserted
replaced
36810:576724706b75 | 36811:92dd1764392a |
---|---|
353 sh_audio_t *sh = new_sh_audio_aid(demuxer, priv->last_aid, es->pid, pid_lang_from_pmt(priv, es->pid)); | 353 sh_audio_t *sh = new_sh_audio_aid(demuxer, priv->last_aid, es->pid, pid_lang_from_pmt(priv, es->pid)); |
354 if(sh) | 354 if(sh) |
355 { | 355 { |
356 sh->needs_parsing = 1; | 356 sh->needs_parsing = 1; |
357 sh->format = IS_AUDIO(es->type) ? es->type : es->subtype; | 357 sh->format = IS_AUDIO(es->type) ? es->type : es->subtype; |
358 sh->ds = demuxer->audio; | |
359 | 358 |
360 priv->ts.streams[es->pid].id = priv->last_aid; | 359 priv->ts.streams[es->pid].id = priv->last_aid; |
361 priv->ts.streams[es->pid].sh = sh; | 360 priv->ts.streams[es->pid].sh = sh; |
362 priv->ts.streams[es->pid].type = TYPE_AUDIO; | 361 priv->ts.streams[es->pid].type = TYPE_AUDIO; |
363 mp_msg(MSGT_DEMUX, MSGL_V, "\r\nADDED AUDIO PID %d, type: %x stream n. %d\r\n", es->pid, sh->format, priv->last_aid); | 362 mp_msg(MSGT_DEMUX, MSGL_V, "\r\nADDED AUDIO PID %d, type: %x stream n. %d\r\n", es->pid, sh->format, priv->last_aid); |
376 { | 375 { |
377 sh_video_t *sh = new_sh_video_vid(demuxer, priv->last_vid, es->pid); | 376 sh_video_t *sh = new_sh_video_vid(demuxer, priv->last_vid, es->pid); |
378 if(sh) | 377 if(sh) |
379 { | 378 { |
380 sh->format = IS_VIDEO(es->type) ? es->type : es->subtype; | 379 sh->format = IS_VIDEO(es->type) ? es->type : es->subtype; |
381 sh->ds = demuxer->video; | |
382 | 380 |
383 priv->ts.streams[es->pid].id = priv->last_vid; | 381 priv->ts.streams[es->pid].id = priv->last_vid; |
384 priv->ts.streams[es->pid].sh = sh; | 382 priv->ts.streams[es->pid].sh = sh; |
385 priv->ts.streams[es->pid].type = TYPE_VIDEO; | 383 priv->ts.streams[es->pid].type = TYPE_VIDEO; |
386 mp_msg(MSGT_DEMUX, MSGL_V, "\r\nADDED VIDEO PID %d, type: %x stream n. %d\r\n", es->pid, sh->format, priv->last_vid); | 384 mp_msg(MSGT_DEMUX, MSGL_V, "\r\nADDED VIDEO PID %d, type: %x stream n. %d\r\n", es->pid, sh->format, priv->last_vid); |
1053 if(params.vtype != UNKNOWN) | 1051 if(params.vtype != UNKNOWN) |
1054 { | 1052 { |
1055 ts_add_stream(demuxer, priv->ts.pids[params.vpid]); | 1053 ts_add_stream(demuxer, priv->ts.pids[params.vpid]); |
1056 sh_video = priv->ts.streams[params.vpid].sh; | 1054 sh_video = priv->ts.streams[params.vpid].sh; |
1057 demuxer->video->id = priv->ts.streams[params.vpid].id; | 1055 demuxer->video->id = priv->ts.streams[params.vpid].id; |
1058 sh_video->ds = demuxer->video; | |
1059 sh_video->format = params.vtype; | 1056 sh_video->format = params.vtype; |
1060 demuxer->video->sh = sh_video; | 1057 demuxer->video->sh = sh_video; |
1061 } | 1058 } |
1062 | 1059 |
1063 if(params.atype != UNKNOWN) | 1060 if(params.atype != UNKNOWN) |
1066 | 1063 |
1067 if(!IS_AUDIO(es->type) && !IS_AUDIO(es->subtype) && IS_AUDIO(params.atype)) es->subtype = params.atype; | 1064 if(!IS_AUDIO(es->type) && !IS_AUDIO(es->subtype) && IS_AUDIO(params.atype)) es->subtype = params.atype; |
1068 ts_add_stream(demuxer, priv->ts.pids[params.apid]); | 1065 ts_add_stream(demuxer, priv->ts.pids[params.apid]); |
1069 sh_audio = priv->ts.streams[params.apid].sh; | 1066 sh_audio = priv->ts.streams[params.apid].sh; |
1070 demuxer->audio->id = priv->ts.streams[params.apid].id; | 1067 demuxer->audio->id = priv->ts.streams[params.apid].id; |
1071 sh_audio->ds = demuxer->audio; | |
1072 sh_audio->format = params.atype; | 1068 sh_audio->format = params.atype; |
1073 demuxer->audio->sh = sh_audio; | 1069 demuxer->audio->sh = sh_audio; |
1074 } | 1070 } |
1075 | 1071 |
1076 | 1072 |