X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fsnappy.h;h=a65cb3aa1bdcb8910749c3780a5a154014f3fa83;hb=27e61a716c893a6ae67ca8f859c735bc0b0b799a;hp=b283183cb6bb8c2fd53a0bc86230c41053653495;hpb=9e93e544dc2efa76bce51e59c2435414e38b0291;p=ffmpeg diff --git a/libavcodec/snappy.h b/libavcodec/snappy.h index b283183cb6b..a65cb3aa1bd 100644 --- a/libavcodec/snappy.h +++ b/libavcodec/snappy.h @@ -38,14 +38,23 @@ #include "bytestream.h" /** - * Decompress an input buffer using Snappy algorithm. Caller is - * responsible of freeing the memory allocated in buf. + * Get the uncompressed length of an input buffer compressed using the Snappy + * algorithm. The GetByteContext is not advanced. * * @param gb input GetByteContext. - * @param buf output buffer pointer. - * @param size output buffer size. + * @return A positive length on success, AVERROR otherwise. + */ + int64_t ff_snappy_peek_uncompressed_length(GetByteContext *gb); + +/** + * Decompress an input buffer using Snappy algorithm. + * + * @param gb input GetByteContext. + * @param buf input buffer pointer. + * @param size input/output on input, the size of buffer, on output, the size + * of the uncompressed data. * @return 0 if success, AVERROR otherwise. */ -int ff_snappy_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size); +int ff_snappy_uncompress(GetByteContext *gb, uint8_t *buf, int64_t *size); #endif /* AVCODEC_SNAPPY_H */