[FFmpeg-cvslog] r22455 - in trunk/libavformat: oggdec.c oggdec.h
conrad
subversion
Thu Mar 11 08:17:33 CET 2010
Author: conrad
Date: Thu Mar 11 08:17:33 2010
New Revision: 22455
Log:
oggdec: Move ogg_find_stream and ogg_gptopts to oggdec.h
(skeleton will need them)
Modified:
trunk/libavformat/oggdec.c
trunk/libavformat/oggdec.h
Modified: trunk/libavformat/oggdec.c
==============================================================================
--- trunk/libavformat/oggdec.c Thu Mar 11 08:17:29 2010 (r22454)
+++ trunk/libavformat/oggdec.c Thu Mar 11 08:17:33 2010 (r22455)
@@ -146,18 +146,6 @@ ogg_find_codec (uint8_t * buf, int size)
}
static int
-ogg_find_stream (struct ogg * ogg, int serial)
-{
- int i;
-
- for (i = 0; i < ogg->nstreams; i++)
- if (ogg->streams[i].serial == serial)
- return i;
-
- return -1;
-}
-
-static int
ogg_new_stream (AVFormatContext * s, uint32_t serial)
{
@@ -440,25 +428,6 @@ ogg_get_headers (AVFormatContext * s)
return 0;
}
-static uint64_t
-ogg_gptopts (AVFormatContext * s, int i, uint64_t gp, int64_t *dts)
-{
- struct ogg *ogg = s->priv_data;
- struct ogg_stream *os = ogg->streams + i;
- uint64_t pts = AV_NOPTS_VALUE;
-
- if(os->codec->gptopts){
- pts = os->codec->gptopts(s, i, gp, dts);
- } else {
- pts = gp;
- if (dts)
- *dts = pts;
- }
-
- return pts;
-}
-
-
static int
ogg_get_length (AVFormatContext * s)
{
Modified: trunk/libavformat/oggdec.h
==============================================================================
--- trunk/libavformat/oggdec.h Thu Mar 11 08:17:29 2010 (r22454)
+++ trunk/libavformat/oggdec.h Thu Mar 11 08:17:33 2010 (r22455)
@@ -115,4 +115,34 @@ extern const AVMetadataConv ff_vorbiscom
int vorbis_comment(AVFormatContext *ms, uint8_t *buf, int size);
+static inline int
+ogg_find_stream (struct ogg * ogg, int serial)
+{
+ int i;
+
+ for (i = 0; i < ogg->nstreams; i++)
+ if (ogg->streams[i].serial == serial)
+ return i;
+
+ return -1;
+}
+
+static inline uint64_t
+ogg_gptopts (AVFormatContext * s, int i, uint64_t gp, int64_t *dts)
+{
+ struct ogg *ogg = s->priv_data;
+ struct ogg_stream *os = ogg->streams + i;
+ uint64_t pts = AV_NOPTS_VALUE;
+
+ if(os->codec->gptopts){
+ pts = os->codec->gptopts(s, i, gp, dts);
+ } else {
+ pts = gp;
+ if (dts)
+ *dts = pts;
+ }
+
+ return pts;
+}
+
#endif /* AVFORMAT_OGGDEC_H */
More information about the ffmpeg-cvslog
mailing list