mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 23:07:02 +00:00
Move up demux_ogg_sub_id, demux_ogg_sub_reverse_id; avoids forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30624 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
965f604636
commit
a37c279d27
@ -367,7 +367,31 @@ static int demux_ogg_check_lang(const char *clang, const char *langlist)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id);
|
||||
/** \brief Change the current subtitle stream and return its ID.
|
||||
|
||||
\param demuxer The demuxer whose subtitle stream will be changed.
|
||||
\param new_num The number of the new subtitle track. The number must be
|
||||
between 0 and ogg_d->n_text - 1.
|
||||
|
||||
\returns The Ogg stream number ( = page serial number) of the newly selected
|
||||
track.
|
||||
*/
|
||||
int demux_ogg_sub_id(demuxer_t *demuxer, int index) {
|
||||
ogg_demuxer_t *ogg_d = demuxer->priv;
|
||||
return (index < 0) ? index : (index >= ogg_d->n_text) ? -1 : ogg_d->text_ids[index];
|
||||
}
|
||||
|
||||
/** \brief Translate the ogg track number into the subtitle number.
|
||||
* \param demuxer The demuxer about whose subtitles we are inquiring.
|
||||
* \param id The ogg track number of the subtitle track.
|
||||
*/
|
||||
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id) {
|
||||
ogg_demuxer_t *ogg_d = demuxer->priv;
|
||||
int i;
|
||||
for (i = 0; i < ogg_d->n_text; i++)
|
||||
if (ogg_d->text_ids[i] == id) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// Try to print out comments and also check for LANGUAGE= tag
|
||||
static void demux_ogg_check_comments(demuxer_t *d, ogg_stream_t *os, int id, vorbis_comment *vc)
|
||||
@ -641,34 +665,6 @@ static void demux_ogg_scan_stream(demuxer_t *demuxer)
|
||||
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
|
||||
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
|
||||
|
||||
/** \brief Change the current subtitle stream and return its ID.
|
||||
|
||||
\param demuxer The demuxer whose subtitle stream will be changed.
|
||||
\param new_num The number of the new subtitle track. The number must be
|
||||
between 0 and ogg_d->n_text - 1.
|
||||
|
||||
\returns The Ogg stream number ( = page serial number) of the newly selected
|
||||
track.
|
||||
*/
|
||||
int demux_ogg_sub_id(demuxer_t *demuxer, int index) {
|
||||
ogg_demuxer_t *ogg_d = demuxer->priv;
|
||||
return (index < 0) ? index : (index >= ogg_d->n_text) ? -1 : ogg_d->text_ids[index];
|
||||
}
|
||||
|
||||
/** \brief Translate the ogg track number into the subtitle number.
|
||||
* \param demuxer The demuxer about whose subtitles we are inquiring.
|
||||
* \param id The ogg track number of the subtitle track.
|
||||
*/
|
||||
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id) {
|
||||
ogg_demuxer_t *ogg_d = demuxer->priv;
|
||||
int i;
|
||||
for (i = 0; i < ogg_d->n_text; i++)
|
||||
if (ogg_d->text_ids[i] == id) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void demux_close_ogg(demuxer_t* demuxer);
|
||||
|
||||
static void fixup_vorbis_wf(sh_audio_t *sh, ogg_demuxer_t *od)
|
||||
{
|
||||
int i, offset;
|
||||
|
Loading…
Reference in New Issue
Block a user