Commit bf8bfc6a authored by Clément Bœsch's avatar Clément Bœsch

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.
parent 6fa2532d
...@@ -475,22 +475,6 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize, ...@@ -475,22 +475,6 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
return 0; 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) static int ogg_get_length(AVFormatContext *s)
{ {
struct ogg *ogg = s->priv_data; struct ogg *ogg = s->priv_data;
...@@ -556,11 +540,16 @@ static int ogg_read_header(AVFormatContext *s) ...@@ -556,11 +540,16 @@ static int ogg_read_header(AVFormatContext *s)
{ {
struct ogg *ogg = s->priv_data; struct ogg *ogg = s->priv_data;
int ret, i; int ret, i;
ogg->curidx = -1; ogg->curidx = -1;
//linear headers seek from start //linear headers seek from start
ret = ogg_get_headers(s); do {
if (ret < 0) ret = ogg_packet(s, NULL, NULL, NULL, NULL);
return ret; if (ret < 0)
return ret;
} while (!ogg->headers);
av_dlog(s, "found headers\n");
for (i = 0; i < ogg->nstreams; i++) for (i = 0; i < ogg->nstreams; i++)
if (ogg->streams[i].header < 0) if (ogg->streams[i].header < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment