changeset 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 576724706b75
children e6823a005ab6
files libmpdemux/demux_aac.c libmpdemux/demux_audio.c libmpdemux/demux_avi.c libmpdemux/demux_avs.c libmpdemux/demux_film.c libmpdemux/demux_fli.c libmpdemux/demux_gif.c libmpdemux/demux_lavf.c libmpdemux/demux_lmlm4.c libmpdemux/demux_mf.c libmpdemux/demux_mkv.c libmpdemux/demux_mng.c libmpdemux/demux_mov.c libmpdemux/demux_mpc.c libmpdemux/demux_nemesi.c libmpdemux/demux_nsv.c libmpdemux/demux_nut.c libmpdemux/demux_ogg.c libmpdemux/demux_pva.c libmpdemux/demux_rawaudio.c libmpdemux/demux_rawdv.c libmpdemux/demux_rawvideo.c libmpdemux/demux_real.c libmpdemux/demux_realaud.c libmpdemux/demux_roq.c libmpdemux/demux_rtp_codec.cpp libmpdemux/demux_smjpeg.c libmpdemux/demux_ts.c libmpdemux/demux_ty.c libmpdemux/demux_viv.c libmpdemux/demux_vqf.c libmpdemux/demux_xmms.c libmpdemux/demux_y4m.c
diffstat 33 files changed, 9 insertions(+), 102 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_aac.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_aac.c	Sun Feb 23 18:14:44 2014 +0000
@@ -127,7 +127,6 @@
 	sh_audio_t *sh;
 
 	sh = new_sh_audio(demuxer, 0, NULL);
-	sh->ds = demuxer->audio;
 	sh->format = mmioFOURCC('M', 'P', '4', 'A');
 	demuxer->audio->id = 0;
 	demuxer->audio->sh = sh;
--- a/libmpdemux/demux_audio.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_audio.c	Sun Feb 23 18:14:44 2014 +0000
@@ -625,7 +625,6 @@
   demuxer->priv = priv;
   demuxer->audio->id = 0;
   demuxer->audio->sh = sh_audio;
-  sh_audio->ds = demuxer->audio;
   sh_audio->samplerate = sh_audio->audio.dwRate;
 
   if(stream_tell(s) != demuxer->movi_start)
--- a/libmpdemux/demux_avi.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_avi.c	Sun Feb 23 18:14:44 2014 +0000
@@ -541,14 +541,14 @@
     mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug);
     return NULL;
   }
-  sh_video=d_video->sh;sh_video->ds=d_video;
+  sh_video=d_video->sh;
   if(d_audio->id!=-2){
     mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id);
     if(!priv->audio_streams || !try_ds_fill(demuxer, d_audio)){
       mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream);
       d_audio->sh=sh_audio=NULL;
     } else {
-      sh_audio=d_audio->sh;sh_audio->ds=d_audio;
+      sh_audio=d_audio->sh;
     }
   }
 
--- a/libmpdemux/demux_avs.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_avs.c	Sun Feb 23 18:14:44 2014 +0000
@@ -288,7 +288,6 @@
         if (demuxer->video->id == -1) demuxer->video->id = 0;
         if (demuxer->video->id == 0)
         demuxer->video->sh = sh_video;
-        sh_video->ds = demuxer->video;
 
         sh_video->disp_w = AVS->video_info->width;
         sh_video->disp_h = AVS->video_info->height;
@@ -329,7 +328,6 @@
         if (demuxer->audio->id == -1) demuxer->audio->id = 0;
         if (demuxer->audio->id == 0)
         demuxer->audio->sh = sh_audio;
-        sh_audio->ds = demuxer->audio;
 
         sh_audio->wf = malloc(sizeof(*sh_audio->wf));
         sh_audio->wf->wFormatTag = sh_audio->format =
--- a/libmpdemux/demux_film.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_film.c	Sun Feb 23 18:14:44 2014 +0000
@@ -282,7 +282,6 @@
         sh_video = new_sh_video(demuxer, 0);
         demuxer->video->id = 0;
         demuxer->video->sh = sh_video;
-        sh_video->ds = demuxer->video;
 
         sh_video->format = video_format;
         sh_video->disp_h = stream_read_dword(demuxer->stream);
@@ -316,7 +315,6 @@
           sh_audio = new_sh_audio(demuxer, 0, NULL);
           demuxer->audio->id = 0;
           demuxer->audio->sh = sh_audio;
-          sh_audio->ds = demuxer->audio;
 
           sh_audio->wf = malloc(sizeof(*sh_audio->wf));
 
@@ -348,7 +346,6 @@
         sh_audio = new_sh_audio(demuxer, 0, NULL);
         demuxer->audio->id = 0;
         demuxer->audio->sh = sh_audio;
-        sh_audio->ds = demuxer->audio;
 
         sh_audio->wf = malloc(sizeof(*sh_audio->wf));
 
--- a/libmpdemux/demux_fli.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_fli.c	Sun Feb 23 18:14:44 2014 +0000
@@ -131,11 +131,6 @@
   demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
-  // make sure that the video demuxer stream header knows about its
-  // parent video demuxer stream (this is getting wacky), or else
-  // video_read_properties() will choke
-  sh_video->ds = demuxer->video;
-
   // custom fourcc for internal MPlayer use
   sh_video->format = mmioFOURCC('F', 'L', 'I', 'C');
 
--- a/libmpdemux/demux_gif.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_gif.c	Sun Feb 23 18:14:44 2014 +0000
@@ -300,11 +300,6 @@
   demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
-  // make sure that the video demuxer stream header knows about its
-  // parent video demuxer stream (this is getting wacky), or else
-  // video_read_properties() will choke
-  sh_video->ds = demuxer->video;
-
   sh_video->format = mmioFOURCC(8, 'R', 'G', 'B');
 
   sh_video->fps = 5.0f;
--- a/libmpdemux/demux_lavf.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_lavf.c	Sun Feb 23 18:14:44 2014 +0000
@@ -316,7 +316,6 @@
             sh_audio->audio.dwScale /= g;
             sh_audio->audio.dwRate  /= g;
 //          printf("sca:%d rat:%d fs:%d sr:%d ba:%d\n", sh_audio->audio.dwScale, sh_audio->audio.dwRate, codec->frame_size, codec->sample_rate, codec->block_align);
-            sh_audio->ds= demuxer->audio;
             sh_audio->format= codec->codec_tag;
             sh_audio->channels= codec->channels;
             sh_audio->samplerate= codec->sample_rate;
@@ -411,7 +410,6 @@
                 codec->width, codec->sample_aspect_ratio.num,
                 codec->height, codec->sample_aspect_ratio.den);
 
-            sh_video->ds= demuxer->video;
             if(codec->extradata_size)
                 memcpy(sh_video->bih + 1, codec->extradata, codec->extradata_size);
             if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_video->bih, MSGL_V);
--- a/libmpdemux/demux_lmlm4.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_lmlm4.c	Sun Feb 23 18:14:44 2014 +0000
@@ -294,9 +294,6 @@
 }
 
 static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){
-    sh_audio_t *sh_audio=NULL;
-    sh_video_t *sh_video=NULL;
-
 #if 0
     sh_video_t* sh_video;
     sh_audio_t* sh_audio;
@@ -305,7 +302,6 @@
 
     sh_video = new_sh_video(demuxer, 0);
     demuxer->video->sh = sh_video;
-    sh_video->ds = demuxer->video;
     sh_video->disp_w = 640;
     sh_video->disp_h = 480;
     sh_video->format = mmioFOURCC('D','I','V','X');
@@ -323,7 +319,6 @@
 
     sh_audio = new_sh_audio(demuxer, 0, NULL);
     demuxer->audio->sh = sh_audio;
-    sh_audio->ds = demuxer->audio;
 
     sh_audio->wf = calloc(1, sizeof(*sh_audio->wf));
 
@@ -346,15 +341,11 @@
     if(!ds_fill_buffer(demuxer->video)){
         mp_msg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingVideoStream);
         demuxer->video->sh=NULL;
-    } else {
-        sh_video=demuxer->video->sh;sh_video->ds=demuxer->video;
     }
     if(demuxer->audio->id!=-2) {
         if(!ds_fill_buffer(demuxer->audio)){
             mp_msg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingAudioStream);
             demuxer->audio->sh=NULL;
-        } else {
-            sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio;
         }
     }
 
--- a/libmpdemux/demux_mf.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_mf.c	Sun Feb 23 18:14:44 2014 +0000
@@ -150,11 +150,6 @@
   demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
-  // make sure that the video demuxer stream header knows about its
-  // parent video demuxer stream (this is getting wacky), or else
-  // video_read_properties() will choke
-  sh_video->ds = demuxer->video;
-
   for (i = 0; type2format[i].type; i++)
     if (strcasecmp(mf_type, type2format[i].type) == 0)
       break;
--- a/libmpdemux/demux_mkv.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_mkv.c	Sun Feb 23 18:14:44 2014 +0000
@@ -1652,7 +1652,6 @@
     sh_v->ImageDesc = ImageDesc;
     mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Aspect: %f\n", sh_v->aspect);
 
-    sh_v->ds = demuxer->video;
     return 0;
 }
 
@@ -1668,7 +1667,6 @@
     mkv_d->audio_tracks[mkv_d->last_aid] = track->tnum;
 
     sh_a->default_track = track->default_track;
-    sh_a->ds = demuxer->audio;
     sh_a->wf = malloc(sizeof(*sh_a->wf));
     if (track->ms_compat && (track->private_size >= sizeof(*sh_a->wf))) {
         WAVEFORMATEX *wf = (WAVEFORMATEX *) track->private_data;
--- a/libmpdemux/demux_mng.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_mng.c	Sun Feb 23 18:14:44 2014 +0000
@@ -431,12 +431,6 @@
     demuxer->video->id = 0;
     demuxer->video->sh = sh_video;
 
-    // Make sure that the video demuxer stream header knows about its
-    // parent video demuxer stream (this is getting wacky), or else
-    // video_read_properties() will choke.
-    // (Thanks to demux_gif.c for this.)
-    sh_video->ds = demuxer->video;
-
     // set format of pixels in video packets
     sh_video->format = mmioFOURCC(32, 'B', 'G', 'R');
 
--- a/libmpdemux/demux_mov.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_mov.c	Sun Feb 23 18:14:44 2014 +0000
@@ -944,7 +944,7 @@
 //		if(demuxer->audio->id==-1 || demuxer->audio->id==priv->track_db){
 //		    // (auto)selected audio track:
 //		    demuxer->audio->id=priv->track_db;
-//		    demuxer->audio->sh=sh; sh->ds=demuxer->audio;
+//		    demuxer->audio->sh=sh;
 //		}
     return 1;
 }
@@ -1277,7 +1277,7 @@
 //		if(demuxer->video->id==-1 || demuxer->video->id==priv->track_db){
 //		    // (auto)selected video track:
 //		    demuxer->video->id=priv->track_db;
-//		    demuxer->video->sh=sh; sh->ds=demuxer->video;
+//		    demuxer->video->sh=sh;
 //		}
     return 1;
 }
@@ -1981,7 +1981,7 @@
     if(demuxer->audio->id>=0){
 	sh_audio_t* sh=demuxer->a_streams[demuxer->audio->id];
 	if(sh){
-	    demuxer->audio->sh=sh; sh->ds=demuxer->audio;
+	    demuxer->audio->sh=sh;
 	} else {
 	    mp_msg(MSGT_DEMUX, MSGL_ERR, "MOV: selected audio stream (%d) does not exist\n",demuxer->audio->id);
 	    demuxer->audio->id=-2;
@@ -1990,7 +1990,7 @@
     if(demuxer->video->id>=0){
 	sh_video_t* sh=demuxer->v_streams[demuxer->video->id];
 	if(sh){
-	    demuxer->video->sh=sh; sh->ds=demuxer->video;
+	    demuxer->video->sh=sh;
 	} else {
 	    mp_msg(MSGT_DEMUX, MSGL_ERR, "MOV: selected video stream (%d) does not exist\n",demuxer->video->id);
 	    demuxer->video->id=-2;
--- a/libmpdemux/demux_mpc.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_mpc.c	Sun Feb 23 18:14:44 2014 +0000
@@ -130,7 +130,6 @@
   demuxer->priv = priv;
   demuxer->audio->id = 0;
   demuxer->audio->sh = sh_audio;
-  sh_audio->ds = demuxer->audio;
   sh_audio->samplerate = sh_audio->wf->nSamplesPerSec;
   sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec;
   sh_audio->audio.dwSampleSize = 0;
--- a/libmpdemux/demux_nemesi.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_nemesi.c	Sun Feb 23 18:14:44 2014 +0000
@@ -237,7 +237,6 @@
 
                 sh_audio->wf = wf;
                 d_audio->sh = sh_audio;
-                sh_audio->ds = d_audio;
                 wf->nSamplesPerSec = 0;
 
                 wf->wFormatTag =
@@ -271,7 +270,6 @@
                 sh_video->bih = bih;
                 d_video = demuxer->video;
                 d_video->sh = sh_video;
-                sh_video->ds = d_video;
 
                 if (fps) {
                     sh_video->fps = fps;
--- a/libmpdemux/demux_nsv.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_nsv.c	Sun Feb 23 18:14:44 2014 +0000
@@ -200,7 +200,6 @@
             demuxer->audio->id = 0;
             demuxer->audio->sh = sh_audio;
             sh_audio->format=mmioFOURCC(hdr[8],hdr[9],hdr[10],hdr[11]);
-            sh_audio->ds = demuxer->audio;
             priv->a_format=mmioFOURCC(hdr[8],hdr[9],hdr[10],hdr[11]);
         }
 
@@ -217,12 +216,6 @@
             demuxer->video->id = 0;
             demuxer->video->sh = sh_video;
 
-            /* Make sure that the video demuxer stream header knows about its
-             * parent video demuxer stream (this is getting wacky), or else
-             * video_read_properties() will choke
-             */
-            sh_video->ds = demuxer->video;
-
             //   bytes 4-7  video codec fourcc
             priv->v_format = sh_video->format=mmioFOURCC(hdr[4],hdr[5],hdr[6],hdr[7]);
 
--- a/libmpdemux/demux_nut.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_nut.c	Sun Feb 23 18:14:44 2014 +0000
@@ -117,7 +117,7 @@
 			int j;
 			mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "nut", i);
 
-			sh_audio->wf= wf; sh_audio->ds = demuxer->audio;
+			sh_audio->wf= wf;
 			sh_audio->audio.dwSampleSize = 0; // FIXME
 			sh_audio->audio.dwScale = s[i].time_base.num;
 			sh_audio->audio.dwRate = s[i].time_base.den;
@@ -154,7 +154,6 @@
 			mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "nut", i);
 
 			sh_video->bih = bih;
-			sh_video->ds = demuxer->video;
 			sh_video->disp_w = s[i].width;
 			sh_video->disp_h = s[i].height;
 			sh_video->video.dwScale = s[i].time_base.num;
--- a/libmpdemux/demux_ogg.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_ogg.c	Sun Feb 23 18:14:44 2014 +0000
@@ -1371,7 +1371,6 @@
     od->audio->id = 0;
     od->video->id = -2;
     od->audio->sh = sh_audio;
-    sh_audio->ds     = od->audio;
     sh_audio->format = FOURCC_VORBIS;
     fixup_vorbis_wf(sh_audio, ogg_d);
 
--- a/libmpdemux/demux_pva.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_pva.c	Sun Feb 23 18:14:44 2014 +0000
@@ -172,7 +172,6 @@
 	 */
 
 	sh_video->format=0x10000002;
-	sh_video->ds=demuxer->video;
 
 	/*
 	printf("demuxer->video->id==%d\n",demuxer->video->id);
@@ -182,7 +181,6 @@
 	demuxer->audio->id = 0;
 	demuxer->audio->sh=sh_audio;
 	sh_audio->format=0x50;
-	sh_audio->ds=demuxer->audio;
 
 	demuxer->movi_start=0;
 	demuxer->movi_end=demuxer->stream->end_pos;
--- a/libmpdemux/demux_rawaudio.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_rawaudio.c	Sun Feb 23 18:14:44 2014 +0000
@@ -71,7 +71,6 @@
 
   demuxer->audio->id = 0;
   demuxer->audio->sh = sh_audio;
-  sh_audio->ds = demuxer->audio;
   sh_audio->needs_parsing = 1;
 
   return demuxer;
--- a/libmpdemux/demux_rawdv.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_rawdv.c	Sun Feb 23 18:14:44 2014 +0000
@@ -173,11 +173,6 @@
    demuxer->video->id = 0;
    demuxer->video->sh = sh_video;
 
-   // make sure that the video demuxer stream header knows about its
-   // parent video demuxer stream (this is getting wacky), or else
-   // video_read_properties() will choke
-   sh_video->ds = demuxer->video;
-
    // custom fourcc for internal MPlayer use
 //   sh_video->format = mmioFOURCC('R', 'A', 'D', 'V');
    sh_video->format = mmioFOURCC('D', 'V', 'S', 'D');
@@ -210,7 +205,6 @@
        sh_audio_t *sh_audio =  new_sh_audio(demuxer, 0, NULL);
        demuxer->audio->id = 0;
 	    demuxer->audio->sh = sh_audio;
-	    sh_audio->ds = demuxer->audio;
        mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() chan: %d samplerate: %d\n",dv_decoder->audio->num_channels,dv_decoder->audio->frequency );
        // custom fourcc for internal MPlayer use
        sh_audio->format = mmioFOURCC('R', 'A', 'D', 'V');
--- a/libmpdemux/demux_rawvideo.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_rawvideo.c	Sun Feb 23 18:14:44 2014 +0000
@@ -121,7 +121,6 @@
 
   demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
-  sh_video->ds = demuxer->video;
 
   return demuxer;
 }
--- a/libmpdemux/demux_real.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_real.c	Sun Feb 23 18:14:44 2014 +0000
@@ -1077,7 +1077,6 @@
     if(demuxer->audio->id==-1 && demuxer->a_streams[mp_stream_id]){
 	sh_audio_t *sh = demuxer->a_streams[mp_stream_id];
 	demuxer->audio->id=mp_stream_id;
-	sh->ds=demuxer->audio;
 	demuxer->audio->sh=sh;
 	priv->audio_buf = calloc(priv->sub_packet_h[demuxer->audio->id], priv->audiopk_size[demuxer->audio->id]);
 	priv->audio_timestamp = calloc(priv->sub_packet_h[demuxer->audio->id], sizeof(double));
@@ -1088,7 +1087,6 @@
     if(demuxer->video->id==-1 && demuxer->v_streams[mp_stream_id]){
 	sh_video_t *sh = demuxer->v_streams[mp_stream_id];
 	demuxer->video->id=mp_stream_id;
-	sh->ds=demuxer->video;
 	demuxer->video->sh=sh;
         mp_msg(MSGT_DEMUX,MSGL_V,"Auto-selected RM video ID = %d (rm id %d)\n",mp_stream_id, rm_stream_id);
 	goto got_video;
@@ -1510,7 +1508,6 @@
 		    }
 
 		    if(demuxer->audio->id==stream_id){
-			sh->ds=demuxer->audio;
 			demuxer->audio->sh=sh;
         	priv->audio_buf = calloc(priv->sub_packet_h[demuxer->audio->id], priv->audiopk_size[demuxer->audio->id]);
         	priv->audio_timestamp = calloc(priv->sub_packet_h[demuxer->audio->id], sizeof(double));
@@ -1538,7 +1535,6 @@
 		    sh->wf->wFormatTag = sh->format = mmioFOURCC('a','d','u',0x55);
 
 		    if(demuxer->audio->id==stream_id){
-			    sh->ds=demuxer->audio;
 			    demuxer->audio->sh=sh;
 		    }
 
@@ -1684,7 +1680,6 @@
 		    }
 
 		    if(demuxer->video->id==stream_id){
-			sh->ds=demuxer->video;
 			demuxer->video->sh=sh;
 		    }
 
--- a/libmpdemux/demux_realaud.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_realaud.c	Sun Feb 23 18:14:44 2014 +0000
@@ -174,7 +174,6 @@
 	demuxer->priv = ra_priv;
 	sh = new_sh_audio(demuxer, 0, NULL);
 	demuxer->audio->id = 0;
-	sh->ds=demuxer->audio;
 	demuxer->audio->sh = sh;
 
 	ra_priv->version = stream_read_word(demuxer->stream);
--- a/libmpdemux/demux_roq.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_roq.c	Sun Feb 23 18:14:44 2014 +0000
@@ -138,9 +138,6 @@
         // make sure the demuxer knows about the new stream header
         demuxer->video->id = 0;
         demuxer->video->sh = sh_video;
-        // make sure that the video demuxer stream header knows about its
-        // parent video demuxer stream
-        sh_video->ds = demuxer->video;
 
         sh_video->disp_w = stream_read_word_le(demuxer->stream);
         sh_video->disp_h = stream_read_word_le(demuxer->stream);
@@ -165,9 +162,6 @@
         // make sure the demuxer knows about the new stream header
         demuxer->audio->id = 0;
         demuxer->audio->sh = sh_audio;
-        // make sure that the audio demuxer stream header knows about its
-        // parent audio demuxer stream
-        sh_audio->ds = demuxer->audio;
 
         // go through the bother of making a WAVEFORMATEX structure
         sh_audio->wf = malloc(sizeof(*sh_audio->wf));
--- a/libmpdemux/demux_rtp_codec.cpp	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Sun Feb 23 18:14:44 2014 +0000
@@ -113,7 +113,7 @@
   bih->biSize = sizeof(BITMAPINFOHEADER);
   sh_video->bih = bih;
   demux_stream_t* d_video = demuxer->video;
-  d_video->sh = sh_video; sh_video->ds = d_video;
+  d_video->sh = sh_video;
   d_video->id = 0;
 
   // Map known video MIME types to the BITMAPINFOHEADER parameters
@@ -227,7 +227,7 @@
   WAVEFORMATEX* wf = (WAVEFORMATEX*)calloc(1,sizeof(WAVEFORMATEX));
   sh_audio->wf = wf;
   demux_stream_t* d_audio = demuxer->audio;
-  d_audio->sh = sh_audio; sh_audio->ds = d_audio;
+  d_audio->sh = sh_audio;
   d_audio->id = sh_audio->aid;
 
   wf->nChannels = subsession->numChannels();
--- a/libmpdemux/demux_smjpeg.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_smjpeg.c	Sun Feb 23 18:14:44 2014 +0000
@@ -128,7 +128,6 @@
 	    sh_video = new_sh_video(demuxer, 0);
 	    demuxer->video->id = 0;
 	    demuxer->video->sh = sh_video;
-	    sh_video->ds = demuxer->video;
 
 	    sh_video->bih = calloc(1, sizeof(*sh_video->bih));
 
@@ -152,7 +151,6 @@
 	    sh_audio = new_sh_audio(demuxer, 0, NULL);
 	    demuxer->audio->id = 0;
 	    demuxer->audio->sh = sh_audio;
-	    sh_audio->ds = demuxer->audio;
 
 	    sh_audio->wf = calloc(1, sizeof(*sh_audio->wf));
 
--- a/libmpdemux/demux_ts.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_ts.c	Sun Feb 23 18:14:44 2014 +0000
@@ -355,7 +355,6 @@
 		{
 			sh->needs_parsing = 1;
 			sh->format = IS_AUDIO(es->type) ? es->type : es->subtype;
-			sh->ds = demuxer->audio;
 
 			priv->ts.streams[es->pid].id = priv->last_aid;
 			priv->ts.streams[es->pid].sh = sh;
@@ -378,7 +377,6 @@
 		if(sh)
 		{
 			sh->format = IS_VIDEO(es->type) ? es->type : es->subtype;
-			sh->ds = demuxer->video;
 
 			priv->ts.streams[es->pid].id = priv->last_vid;
 			priv->ts.streams[es->pid].sh = sh;
@@ -1055,7 +1053,6 @@
 		ts_add_stream(demuxer, priv->ts.pids[params.vpid]);
 		sh_video = priv->ts.streams[params.vpid].sh;
 		demuxer->video->id = priv->ts.streams[params.vpid].id;
-		sh_video->ds = demuxer->video;
 		sh_video->format = params.vtype;
 		demuxer->video->sh = sh_video;
 	}
@@ -1068,7 +1065,6 @@
 		ts_add_stream(demuxer, priv->ts.pids[params.apid]);
 		sh_audio = priv->ts.streams[params.apid].sh;
 		demuxer->audio->id = priv->ts.streams[params.apid].id;
-		sh_audio->ds = demuxer->audio;
 		sh_audio->format = params.atype;
 		demuxer->audio->sh = sh_audio;
 	}
--- a/libmpdemux/demux_ty.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_ty.c	Sun Feb 23 18:14:44 2014 +0000
@@ -860,17 +860,10 @@
 
 static demuxer_t* demux_open_ty(demuxer_t* demuxer)
 {
-    sh_audio_t *sh_audio=NULL;
-    sh_video_t *sh_video=NULL;
-
-    sh_video=demuxer->video->sh;sh_video->ds=demuxer->video;
-
     if(demuxer->audio->id!=-2) {
         if(!ds_fill_buffer(demuxer->audio)){
             mp_msg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream);
             demuxer->audio->sh=NULL;
-        } else {
-            sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio;
         }
     }
 
--- a/libmpdemux/demux_viv.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_viv.c	Sun Feb 23 18:14:44 2014 +0000
@@ -629,7 +629,6 @@
 
 		/* insert as stream */
 		demuxer->video->sh=sh;
-		sh->ds=demuxer->video;
 		demuxer->video->id=0;
 
 		/* disable seeking */
@@ -729,7 +728,6 @@
 /*sound_ok:*/
 		/* insert as stream */
 		demuxer->audio->sh=sh;
-		sh->ds=demuxer->audio;
 		demuxer->audio->id=1;
 nosound:
 		return demuxer;
--- a/libmpdemux/demux_vqf.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_vqf.c	Sun Feb 23 18:14:44 2014 +0000
@@ -179,7 +179,6 @@
 
   demuxer->audio->id = 0;
   demuxer->audio->sh = sh_audio;
-  sh_audio->ds = demuxer->audio;
   stream_seek(s,demuxer->movi_start);
   demuxer->seekable=0;
   return demuxer;
--- a/libmpdemux/demux_xmms.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_xmms.c	Sun Feb 23 18:14:44 2014 +0000
@@ -274,7 +274,6 @@
     demuxer->audio->id = 0;
     demuxer->audio->sh = sh_audio;
     demuxer->priv=priv;
-    sh_audio->ds = demuxer->audio;
 
     xmms_output_plugin.init();
     ip->output = &xmms_output_plugin;
--- a/libmpdemux/demux_y4m.c	Sun Feb 23 18:02:21 2014 +0000
+++ b/libmpdemux/demux_y4m.c	Sun Feb 23 18:14:44 2014 +0000
@@ -262,7 +262,6 @@
     sh->bih=calloc(1, sizeof(*sh->bih));
 
     demuxer->video->sh=sh;
-    sh->ds=demuxer->video;
     demuxer->video->id=0;
 
     read_streaminfo(demuxer);