summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-21 18:06:14 +0200
committerwm4 <wm4@nowhere>2015-06-21 18:06:14 +0200
commitbe882175d85d8b1ea253dce11494a53264d04148 (patch)
tree9503dcaf5a1f0f858cdaca94f754b0908cba5a33 /demux/stheader.h
parentc66be698cd8136933b80c4e0ef1698158c10316c (diff)
downloadmpv-be882175d85d8b1ea253dce11494a53264d04148.tar.bz2
mpv-be882175d85d8b1ea253dce11494a53264d04148.tar.xz
demux: merge extradata fields
MPlayer traditionally had completely separate sh_ structs for audio/video/subs, without a good way to share fields. This meant that fields shared across all these headers had to be duplicated. This commit deduplicates essentially the last remaining duplicated fields.
Diffstat (limited to 'demux/stheader.h')
-rw-r--r--demux/stheader.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index ae346ee8d0..fdb302713c 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -49,6 +49,9 @@ struct sh_stream {
// Usually a FourCC, exact meaning depends on codec.
unsigned int codec_tag;
+ unsigned char *extradata; // codec specific per-stream header
+ int extradata_size;
+
// Codec specific header data (set by demux_lavf.c only)
struct AVCodecContext *lav_headers;
@@ -73,8 +76,6 @@ typedef struct sh_audio {
int bitrate; // compressed bits/sec
int block_align;
int bits_per_coded_sample;
- unsigned char *codecdata;
- int codecdata_len;
struct replaygain_data *replaygain_data;
} sh_audio_t;
@@ -83,16 +84,12 @@ typedef struct sh_video {
float fps; // frames per second (set only if constant fps)
float aspect; // aspect ratio stored in the file (for prescaling)
int bits_per_coded_sample;
- unsigned char *extradata;
- int extradata_len;
int disp_w, disp_h; // display size
int rotate; // intended display rotation, in degrees, [0, 359]
int stereo_mode; // mp_stereo3d_mode (0 if none/unknown)
} sh_video_t;
typedef struct sh_sub {
- unsigned char *extradata; // extra header data passed from demuxer
- int extradata_len;
double frame_based; // timestamps are frame-based (and this is the
// fallback framerate used for timestamps)
bool is_utf8; // if false, subtitle packet charset is unknown