lavf/gif: merge gif_write_{packet,video}.
Avoid a pointless split.
This commit is contained in:
parent
b7a3f14360
commit
01367b0fca
@ -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,
|
|||||||
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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user