Commit 01367b0f authored by Clément Bœsch's avatar Clément Bœsch

lavf/gif: merge gif_write_{packet,video}.

Avoid a pointless split.
parent b7a3f143
...@@ -99,9 +99,9 @@ static int gif_write_header(AVFormatContext *s) ...@@ -99,9 +99,9 @@ static int gif_write_header(AVFormatContext *s)
return 0; return 0;
} }
static int gif_write_video(AVFormatContext *s, AVCodecContext *enc, static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
const uint8_t *buf, int size)
{ {
AVCodecContext *enc = s->streams[pkt->stream_index]->codec;
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
int jiffies; int jiffies;
...@@ -123,17 +123,11 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc, ...@@ -123,17 +123,11 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc,
avio_w8(pb, 0x1f); /* transparent color index */ avio_w8(pb, 0x1f); /* transparent color index */
avio_w8(pb, 0x00); avio_w8(pb, 0x00);
avio_write(pb, buf, size); avio_write(pb, pkt->data, pkt->size);
return 0; return 0;
} }
static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
return gif_write_video(s, codec, pkt->data, pkt->size);
}
static int gif_write_trailer(AVFormatContext *s) static int gif_write_trailer(AVFormatContext *s)
{ {
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment