summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-23 21:37:56 +0100
committerwm4 <wm4@nowhere>2013-11-23 21:37:56 +0100
commit904c73d2d214c729fbeedc13c8b47afab91e296b (patch)
tree0b903a73ac8f0c3239f5cb52459f203dce866b16 /stream
parent639e672bd153e06cfc01ced6c2a48b45870e8f31 (diff)
downloadmpv-904c73d2d214c729fbeedc13c8b47afab91e296b.tar.bz2
mpv-904c73d2d214c729fbeedc13c8b47afab91e296b.tar.xz
demux: remove gsh field from sh_audio/sh_video/sh_sub
This used to be needed to access the generic stream header from the specific headers, which in turn was needed because the decoders had access only to the specific headers. This is not the case anymore, so this can finally be removed again. Also move the "format" field from the specific headers to sh_stream.
Diffstat (limited to 'stream')
-rw-r--r--stream/tv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/tv.c b/stream/tv.c
index 8ca4dc9092..1bed93ef67 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -724,10 +724,10 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
int fourcc;
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FORMAT, &fourcc);
if (fourcc == MP_FOURCC_MJPEG) {
- sh_video->gsh->codec = "mjpeg";
+ sh_v->codec = "mjpeg";
} else {
- sh_video->gsh->codec = "rawvideo";
- sh_video->format = fourcc;
+ sh_v->codec = "rawvideo";
+ sh_v->format = fourcc;
}
/* set FPS and FRAMETIME */
@@ -799,8 +799,8 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
&nchannels);
mp_chmap_from_channels(&sh_audio->channels, nchannels);
- sh_audio->gsh->codec = "mp-pcm";
- sh_audio->format = audio_format;
+ sh_a->codec = "mp-pcm";
+ sh_a->format = audio_format;
int samplesize = af_fmt2bits(audio_format) / 8;
@@ -809,7 +809,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
// emulate WF for win32 codecs:
sh_audio->wf = talloc_zero(sh_audio, MP_WAVEFORMATEX);
- sh_audio->wf->wFormatTag = sh_audio->format;
+ sh_audio->wf->wFormatTag = sh_a->format;
sh_audio->wf->nChannels = sh_audio->channels.num;
sh_audio->wf->wBitsPerSample = samplesize * 8;
sh_audio->wf->nSamplesPerSec = sh_audio->samplerate;