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

Avoid a pointless split.
pull/15/head
Clément Bœsch 12 years ago
parent b7a3f14360
commit 01367b0fca
  1. 12
      libavformat/gif.c

@ -99,9 +99,9 @@ static int gif_write_header(AVFormatContext *s)
return 0;
}
static int gif_write_video(AVFormatContext *s, AVCodecContext *enc,
const uint8_t *buf, int size)
static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVCodecContext *enc = s->streams[pkt->stream_index]->codec;
AVIOContext *pb = s->pb;
int jiffies;
@ -123,17 +123,11 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc,
avio_w8(pb, 0x1f); /* transparent color index */
avio_w8(pb, 0x00);
avio_write(pb, buf, size);
avio_write(pb, pkt->data, pkt->size);
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)
{
AVIOContext *pb = s->pb;

Loading…
Cancel
Save