summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-15 21:26:22 +0200
committerwm4 <wm4@nowhere>2013-04-20 23:28:27 +0200
commitc12b5ffc33f8fb424b821afef1e060d7f6275844 (patch)
treefeeaa2020388f0e41b05f031d37a6f20aeedb7ef /demux/stheader.h
parent331982b99ce3b50b95ac340eb17c6116913480f3 (diff)
downloadmpv-c12b5ffc33f8fb424b821afef1e060d7f6275844.tar.bz2
mpv-c12b5ffc33f8fb424b821afef1e060d7f6275844.tar.xz
demux: get rid of sh_common_t
The only reason this existed was the parsing code. Even though it could have been used for video, it's audio-only, so just move this to sh_audio_t.
Diffstat (limited to 'demux/stheader.h')
-rw-r--r--demux/stheader.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index 47dcf7a207..7cb65b9bcc 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -48,8 +48,6 @@ struct sh_stream {
int stream_index;
// Demuxer specific ID (always set, defaults to tid).
int demuxer_id;
- // Abomination.
- struct sh_common *common_header;
// One of these is non-NULL, the others are NULL, depending on the stream
// type.
struct sh_audio *audio;
@@ -86,20 +84,12 @@ struct sh_stream {
/* number of seconds stream should be delayed \
* (according to dwStart or similar) */ \
float stream_delay; \
- /* things needed for parsing */ \
- bool needs_parsing; \
- struct AVCodecContext *avctx; \
- struct AVCodecParserContext *parser; \
/* audio: last known pts value in output from decoder \
* video: predicted/interpolated PTS of the current frame */ \
double pts; \
/* decoder context */ \
void *context; \
-typedef struct sh_common {
- SH_COMMON
-} sh_common_t;
-
typedef struct sh_audio {
SH_COMMON
// output format:
@@ -129,6 +119,10 @@ typedef struct sh_audio {
unsigned char *codecdata;
int codecdata_len;
int pts_bytes; // bytes output by decoder after last known pts
+ /* things needed for parsing */
+ bool needs_parsing;
+ struct AVCodecContext *avctx;
+ struct AVCodecParserContext *parser;
} sh_audio_t;
typedef struct sh_video {