[MPlayer-cvslog] r30624 - trunk/libmpdemux/demux_ogg.c
diego
subversion at mplayerhq.hu
Thu Feb 18 00:25:02 CET 2010
Author: diego
Date: Thu Feb 18 00:25:02 2010
New Revision: 30624
Log:
Move up demux_ogg_sub_id, demux_ogg_sub_reverse_id; avoids forward declarations.
Modified:
trunk/libmpdemux/demux_ogg.c
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c Thu Feb 18 00:10:56 2010 (r30623)
+++ trunk/libmpdemux/demux_ogg.c Thu Feb 18 00:25:02 2010 (r30624)
@@ -367,7 +367,31 @@ static int demux_ogg_check_lang(const ch
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(demuxe
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;
More information about the MPlayer-cvslog
mailing list