return gif_write_video(s, codec, buf, size);
return gif_write_video(s, codec, pkt->data, pkt->size);
static int gif_write_packet(AVFormatContext *s, int stream_index,                             const uint8_t *buf, int size, int64_t pts){    AVCodecContext *codec = &s->streams[stream_index]->codec;    if (codec->codec_type == CODEC_TYPE_AUDIO)        return 0; /* just ignore audio */    else        return gif_write_video(s, codec, buf, size);}