OSDN Git Service

Merge remote-tracking branch 'qatar/master'
[coroid/ffmpeg_saccubus.git] / libavformat / oggdec.c
index 9722d62..597ea3b 100644 (file)
@@ -201,7 +201,7 @@ static int ogg_read_page(AVFormatContext *s, int *str)
     uint8_t sync[4];
     int sp = 0;
 
-    ret = avio_read (bc, sync, 4);
+    ret = avio_read(bc, sync, 4);
     if (ret < 4)
         return ret < 0 ? ret : AVERROR_EOF;
 
@@ -259,7 +259,7 @@ static int ogg_read_page(AVFormatContext *s, int *str)
     if(os->psize > 0)
         ogg_new_buf(ogg, idx);
 
-    ret = avio_read (bc, os->segments, nsegs);
+    ret = avio_read(bc, os->segments, nsegs);
     if (ret < nsegs)
         return ret < 0 ? ret : AVERROR_EOF;
 
@@ -292,7 +292,7 @@ static int ogg_read_page(AVFormatContext *s, int *str)
         os->buf = nb;
     }
 
-    ret = avio_read (bc, os->buf + os->bufpos, size);
+    ret = avio_read(bc, os->buf + os->bufpos, size);
     if (ret < size)
         return ret < 0 ? ret : AVERROR_EOF;
 
@@ -321,7 +321,7 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
         idx = ogg->curidx;
 
         while (idx < 0){
-            ret = ogg_read_page (s, &idx);
+            ret = ogg_read_page(s, &idx);
             if (ret < 0)
                 return ret;
         }
@@ -437,7 +437,7 @@ static int ogg_get_headers(AVFormatContext *s)
     int ret;
 
     do{
-        ret = ogg_packet (s, NULL, NULL, NULL, NULL);
+        ret = ogg_packet(s, NULL, NULL, NULL, NULL);
         if (ret < 0)
             return ret;
     }while (!ogg->headers);
@@ -501,10 +501,9 @@ static int ogg_read_header(AVFormatContext *s, AVFormatParameters *ap)
     int ret, i;
     ogg->curidx = -1;
     //linear headers seek from start
-    ret = ogg_get_headers (s);
-    if (ret < 0){
+    ret = ogg_get_headers(s);
+    if (ret < 0)
         return ret;
-    }
 
     for (i = 0; i < ogg->nstreams; i++)
         if (ogg->streams[i].header < 0)
@@ -558,7 +557,7 @@ static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt)
     //Get an ogg packet
 retry:
     do{
-        ret = ogg_packet (s, &idx, &pstart, &psize, &fpos);
+        ret = ogg_packet(s, &idx, &pstart, &psize, &fpos);
         if (ret < 0)
             return ret;
     }while (idx < 0 || !s->streams[idx]);
@@ -574,7 +573,7 @@ retry:
     os->keyframe_seek = 0;
 
     //Alloc a pkt
-    ret = av_new_packet (pkt, psize);
+    ret = av_new_packet(pkt, psize);
     if (ret < 0)
         return ret;
     pkt->stream_index = idx;