Skip to content
Snippets Groups Projects
utils.c 86.8 KiB
Newer Older
  • Learn to ignore specific revisions
  •         pos = url_ftell(pb);
            pd->buf_size = get_buffer(pb, buf, PROBE_BUF_SIZE);
            url_fseek(pb, pos, SEEK_SET);
            fmt = av_probe_image_format(pd);
        }
        if (!fmt)
            return AVERROR_NOFMT;
        ret = fmt->img_read(pb, alloc_cb, opaque);
        return ret;
    }
    
    /**
     * Write an image to a stream.
     * @param pb byte stream for the image output
     * @param fmt image format
     * @param img image data and informations
     */
    int av_write_image(ByteIOContext *pb, AVImageFormat *fmt, AVImageInfo *img)
    {
        return fmt->img_write(pb, img);
    }