diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-16 05:00:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:41:05 +0300 |
commit | d3d12332d647d2e9281220b84050518bc3f0cb03 (patch) | |
tree | e29595a243a7f2e9911db08605a9d20c4ce29f19 | |
parent | 732ee3474ac23a16f0ed7e791c0a5f8160a11ebd (diff) | |
download | mpv-d3d12332d647d2e9281220b84050518bc3f0cb03.tar.bz2 mpv-d3d12332d647d2e9281220b84050518bc3f0cb03.tar.xz |
Declare demuxer *_streams fields with proper types
Give sh_audio_t, sh_video_t and sh_sub_t which before had typedef
names only a matching struct name (without _t) too.
Change the a_streams, v_streams and s_streams demuxer fields from
void * to struct sh_audio *, struct sh_video * and struct sh_sub *.
Remove a now unnecessary cast from mplayer.c.
-rw-r--r-- | libmpdemux/demuxer.h | 6 | ||||
-rw-r--r-- | libmpdemux/stheader.h | 6 | ||||
-rw-r--r-- | mplayer.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index ce7f872db7..a72e3f8a45 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -211,9 +211,9 @@ typedef struct demuxer_st { demux_stream_t *sub; // dvd subtitle buffer/demuxer // stream headers: - void* a_streams[MAX_A_STREAMS]; // audio streams (sh_audio_t) - void* v_streams[MAX_V_STREAMS]; // video sterams (sh_video_t) - void *s_streams[MAX_S_STREAMS]; // dvd subtitles (flag) + struct sh_audio *a_streams[MAX_A_STREAMS]; + struct sh_video *v_streams[MAX_V_STREAMS]; + struct sh_sub *s_streams[MAX_S_STREAMS]; demux_chapter_t* chapters; int num_chapters; diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h index 7e761e6879..2ccd7fa4d0 100644 --- a/libmpdemux/stheader.h +++ b/libmpdemux/stheader.h @@ -7,7 +7,7 @@ // Stream headers: -typedef struct { +typedef struct sh_audio { int aid; demux_stream_t *ds; struct codecs_st *codec; @@ -54,7 +54,7 @@ typedef struct { int default_track; } sh_audio_t; -typedef struct { +typedef struct sh_video { int vid; demux_stream_t *ds; struct codecs_st *codec; @@ -94,7 +94,7 @@ typedef struct { void* context; // codec-specific stuff (usually HANDLE or struct pointer) } sh_video_t; -typedef struct { +typedef struct sh_sub { int sid; char type; // t = text, v = VobSub, a = SSA/ASS int has_palette; // If we have a valid palette @@ -3307,7 +3307,7 @@ if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_D mpctx->global_sub_indices[SUB_SOURCE_DEMUX] = mpctx->global_sub_size; // the global # of the first demux-specific sub. for (i = 0; i < MAX_S_STREAMS; i++) if (mpctx->demuxer->s_streams[i]) - maxid = FFMAX(maxid, ((sh_sub_t *)mpctx->demuxer->s_streams[i])->sid); + maxid = FFMAX(maxid, mpctx->demuxer->s_streams[i]->sid); mpctx->global_sub_size += maxid + 1; } // Make dvdsub_id always selectable if set. |