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
104 return 0;104 return 0;
105}105}
106 106
107/* TODO: move below */
108static int flush_packet(AVFormatContext *s, AVPacket *pkt);
109
110static 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
123static int flush_packet(AVFormatContext *s, AVPacket *new)107static int flush_packet(AVFormatContext *s, AVPacket *new)
124{108{
125 GIFContext *gif = s->priv_data;109 GIFContext *gif = s->priv_data;
@@ -174,6 +158,19 @@ static int flush_packet(AVFormatContext *s, AVPacket *new) · 48 unmodified lines
174 return 0;158 return 0;
175}159}
176 160
161static 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
177static int gif_write_trailer(AVFormatContext *s)174static int gif_write_trailer(AVFormatContext *s)
178{175{
179 GIFContext *gif = s->priv_data;176 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