History

lavf/gif: avoid forward declaration.

Clément Bœsch committed 13 years ago

Commit 6189ff31 parent a7c5b7a1 file · +13 −16Browse files

Unified · Split

libavformat/gif.c+13−16
@@ -104,22 +104,6 @@ static int gif_write_header(AVFormatContext *s) · 103 unmodified lines
104104 return 0;
105105 }
106106
107−/* TODO: move below */
108−static int flush_packet(AVFormatContext *s, AVPacket *pkt);
109−
110−static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
111−{
112− GIFContext *gif = s->priv_data;
113−
114− if (!gif->prev_pkt) {
115− gif->prev_pkt = av_malloc(sizeof(*gif->prev_pkt));
116− if (!gif->prev_pkt)
117− return AVERROR(ENOMEM);
118− return av_copy_packet(gif->prev_pkt, pkt);
119− }
120− return flush_packet(s, pkt);
121−}
122−
123107 static int flush_packet(AVFormatContext *s, AVPacket *new)
124108 {
125109 GIFContext *gif = s->priv_data;
@@ -174,6 +158,19 @@ static int flush_packet(AVFormatContext *s, AVPacket *new) · 48 unmodified lines
174158 return 0;
175159 }
176160
161+static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
162+{
163+ GIFContext *gif = s->priv_data;
164+
165+ if (!gif->prev_pkt) {
166+ gif->prev_pkt = av_malloc(sizeof(*gif->prev_pkt));
167+ if (!gif->prev_pkt)
168+ return AVERROR(ENOMEM);
169+ return av_copy_packet(gif->prev_pkt, pkt);
170+ }
171+ return flush_packet(s, pkt);
172+}
173+
177174 static int gif_write_trailer(AVFormatContext *s)
178175 {
179176 GIFContext *gif = s->priv_data;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t