aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/gif.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-19 12:11:10 +0200
committerClément Bœsch <ubitux@gmail.com>2013-04-19 12:11:10 +0200
commit6189ff3679ab479ebfdafef160ed59cc631e445a (patch)
treed78c5b5507350001a13fa29a0c054d968d98410b /libavformat/gif.c
parenta7c5b7a6764b5170515183716943a7a463161cfc (diff)
downloadffmpeg-6189ff3679ab479ebfdafef160ed59cc631e445a.tar.gz
lavf/gif: avoid forward declaration.
Diffstat (limited to 'libavformat/gif.c')
-rw-r--r--libavformat/gif.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/libavformat/gif.c b/libavformat/gif.c
index ef1ea7582d..594eb6b1d7 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -104,22 +104,6 @@ static int gif_write_header(AVFormatContext *s)
return 0;
}
-/* TODO: move below */
-static int flush_packet(AVFormatContext *s, AVPacket *pkt);
-
-static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
- GIFContext *gif = s->priv_data;
-
- if (!gif->prev_pkt) {
- gif->prev_pkt = av_malloc(sizeof(*gif->prev_pkt));
- if (!gif->prev_pkt)
- return AVERROR(ENOMEM);
- return av_copy_packet(gif->prev_pkt, pkt);
- }
- return flush_packet(s, pkt);
-}
-
static int flush_packet(AVFormatContext *s, AVPacket *new)
{
GIFContext *gif = s->priv_data;
@@ -174,6 +158,19 @@ static int flush_packet(AVFormatContext *s, AVPacket *new)
return 0;
}
+static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
+{
+ GIFContext *gif = s->priv_data;
+
+ if (!gif->prev_pkt) {
+ gif->prev_pkt = av_malloc(sizeof(*gif->prev_pkt));
+ if (!gif->prev_pkt)
+ return AVERROR(ENOMEM);
+ return av_copy_packet(gif->prev_pkt, pkt);
+ }
+ return flush_packet(s, pkt);
+}
+
static int gif_write_trailer(AVFormatContext *s)
{
GIFContext *gif = s->priv_data;