snprintf(filename, sizeof(filename), s->path, s->img_number);
if (get_frame_filename(filename, sizeof(filename), s->path, s->img_number) < 0) return -EIO;
static int jpeg_write_packet(AVFormatContext *s1, int stream_index,                            UINT8 *buf, int size){    JpegContext *s = s1->priv_data;    char filename[1024];    ByteIOContext f1, *pb = &f1;    snprintf(filename, sizeof(filename), s->path, s->img_number);    if (url_fopen(pb, filename, URL_WRONLY) < 0)        return -EIO;    put_buffer(pb, buf, size);    put_flush_packet(pb);    url_fclose(pb);    s->img_number++;    return 0;}