summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
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 /demux/stheader.h
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 'demux/stheader.h')
-rw-r--r--demux/stheader.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index 1c151cda3d..17090fc8e9 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -52,6 +52,9 @@ struct sh_stream {
// E.g. "h264" (usually corresponds to AVCodecDescriptor.name)
const char *codec;
+ // Usually a FourCC, exact meaning depends on codec.
+ unsigned int format;
+
// Codec specific header data (set by demux_lavf.c)
// Other demuxers use sh_audio->wf and sh_video->bih instead.
struct AVCodecContext *lav_headers;
@@ -68,9 +71,6 @@ struct sh_stream {
};
typedef struct sh_audio {
- struct sh_stream *gsh;
- /* usually a FourCC, exact meaning depends on gsh->codec */
- unsigned int format;
int samplerate;
struct mp_chmap channels;
int i_bps; // == bitrate (compressed bytes/sec)
@@ -82,9 +82,6 @@ typedef struct sh_audio {
} sh_audio_t;
typedef struct sh_video {
- struct sh_stream *gsh;
- /* usually a FourCC, exact meaning depends on gsh->codec */
- unsigned int format;
float fps; // frames per second (set only if constant fps)
float aspect; // aspect ratio stored in the file (for prescaling)
int i_bps; // == bitrate (compressed bytes/sec)
@@ -93,7 +90,6 @@ typedef struct sh_video {
} sh_video_t;
typedef struct sh_sub {
- struct sh_stream *gsh;
unsigned char *extradata; // extra header data passed from demuxer
int extradata_len;
int frame_based; // timestamps are frame-based