mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
lavf/gif: avoid forward declaration.
This commit is contained in:
parent
a7c5b7a676
commit
6189ff3679
@ -104,22 +104,6 @@ static int gif_write_header(AVFormatContext *s)
|
|||||||
return 0;
|
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)
|
static int flush_packet(AVFormatContext *s, AVPacket *new)
|
||||||
{
|
{
|
||||||
GIFContext *gif = s->priv_data;
|
GIFContext *gif = s->priv_data;
|
||||||
@ -174,6 +158,19 @@ static int flush_packet(AVFormatContext *s, AVPacket *new)
|
|||||||
return 0;
|
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)
|
static int gif_write_trailer(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
GIFContext *gif = s->priv_data;
|
GIFContext *gif = s->priv_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user