[FFmpeg-cvslog] avformat/oggdec: remove unused parameter of ogg_restore()
Michael Niedermayer
git at videolan.org
Thu Mar 2 04:13:54 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 28 13:36:29 2017 +0100| [3250d4b39ccf70a9517a708fb6738070ebe83d6a] | committer: Michael Niedermayer
avformat/oggdec: remove unused parameter of ogg_restore()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3250d4b39ccf70a9517a708fb6738070ebe83d6a
---
libavformat/oggdec.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index e1ef213..64a8826 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -61,7 +61,7 @@ static const struct ogg_codec * const ogg_codecs[] = {
static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts);
static int ogg_new_stream(AVFormatContext *s, uint32_t serial);
-static int ogg_restore(AVFormatContext *s, int discard);
+static int ogg_restore(AVFormatContext *s);
//FIXME We could avoid some structure duplication
static int ogg_save(AVFormatContext *s)
@@ -95,12 +95,12 @@ static int ogg_save(AVFormatContext *s)
ogg->state = ost;
if (ret < 0)
- ogg_restore(s, 0);
+ ogg_restore(s);
return ret;
}
-static int ogg_restore(AVFormatContext *s, int discard)
+static int ogg_restore(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
AVIOContext *bc = s->pb;
@@ -112,8 +112,6 @@ static int ogg_restore(AVFormatContext *s, int discard)
ogg->state = ost->next;
- if (!discard) {
-
for (i = 0; i < ogg->nstreams; i++)
av_freep(&ogg->streams[i].buf);
@@ -128,7 +126,6 @@ static int ogg_restore(AVFormatContext *s, int discard)
} else
memcpy(ogg->streams, ost->streams,
ost->nstreams * sizeof(*ogg->streams));
- }
av_free(ost);
@@ -631,7 +628,7 @@ static int ogg_get_length(AVFormatContext *s)
}
}
- ogg_restore(s, 0);
+ ogg_restore(s);
ret = ogg_save(s);
if (ret < 0)
@@ -654,7 +651,7 @@ static int ogg_get_length(AVFormatContext *s)
streams_left--;
}
}
- ogg_restore (s, 0);
+ ogg_restore (s);
return 0;
}
More information about the ffmpeg-cvslog
mailing list