From bef7e9ccd1b9dbb7cdd4a95fc03853bdf08b1298 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 21 Aug 2013 11:09:37 -0700 Subject: [PATCH] Add doc precision about demux object keeping pointers to data. Change-Id: I3d2139f975eedcce36606e586e0cbd6fa7d207e6 --- src/webp/demux.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webp/demux.h b/src/webp/demux.h index 670adbe7..63f29919 100644 --- a/src/webp/demux.h +++ b/src/webp/demux.h @@ -94,6 +94,10 @@ static WEBP_INLINE WebPDemuxer* WebPDemux(const WebPData* data) { // If 'state' is non-NULL it will be set to indicate the status of the demuxer. // Returns NULL in case of error or if there isn't enough data to start parsing; // and a WebPDemuxer object on successful parse. +// Note that WebPDemuxer keeps internal pointers to 'data' memory segment. +// If this data is volatile, the demuxer object should be deleted (by calling +// WebPDemuxDelete()) and WebPDemuxPartial() called again on the new data. +// This is usually an inexpensive operation. static WEBP_INLINE WebPDemuxer* WebPDemuxPartial( const WebPData* data, WebPDemuxState* state) { return WebPDemuxInternal(data, 1, state, WEBP_DEMUX_ABI_VERSION);