aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-09-14 23:05:57 +0200
committerClément Bœsch <ubitux@gmail.com>2012-09-16 16:52:06 +0200
commitbf8bfc6a1135ff0e7ae410f3468154bfe23fc1b6 (patch)
tree9839b8ead49fed580fbd152c93fa5bf6fabd68dc /libavformat/oggdec.c
parent6fa2532dd36f30312038e9fd29917c56f68dda7c (diff)
downloadffmpeg-bf8bfc6a1135ff0e7ae410f3468154bfe23fc1b6.tar.gz
lavf/oggdec: inline ogg_get_headers().
There is no point in a distant definition of a small function like this used only once. Additional spacing to distinguish better the block.
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 26aeb28d7e..9bb63c36da 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -475,22 +475,6 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
return 0;
}
-static int ogg_get_headers(AVFormatContext *s)
-{
- struct ogg *ogg = s->priv_data;
- int ret;
-
- do{
- ret = ogg_packet(s, NULL, NULL, NULL, NULL);
- if (ret < 0)
- return ret;
- }while (!ogg->headers);
-
- av_dlog(s, "found headers\n");
-
- return 0;
-}
-
static int ogg_get_length(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
@@ -556,11 +540,16 @@ static int ogg_read_header(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
int ret, i;
+
ogg->curidx = -1;
+
//linear headers seek from start
- ret = ogg_get_headers(s);
- if (ret < 0)
- return ret;
+ do {
+ ret = ogg_packet(s, NULL, NULL, NULL, NULL);
+ if (ret < 0)
+ return ret;
+ } while (!ogg->headers);
+ av_dlog(s, "found headers\n");
for (i = 0; i < ogg->nstreams; i++)
if (ogg->streams[i].header < 0)