-/* Reads a WebM video frame. Return values:
- * 0 - Success
- * 1 - End of File
- * -1 - Error
- */
-int webm_read_frame(struct WebmInputContext *webm_ctx,
- uint8_t **buffer,
- size_t *bytes_in_buffer,
+// Reads a WebM Video Frame. Memory for the buffer is created, owned and managed
+// by this function. For the first call, |buffer| should be NULL and
+// |*buffer_size| should be 0. Once all the frames are read and used,
+// webm_free() should be called, otherwise there will be a leak.
+// Parameters:
+// webm_ctx - WebmInputContext object
+// buffer - pointer where the frame data will be filled.
+// buffer_size - pointer to buffer size.
+// Return values:
+// 0 - Success
+// 1 - End of Stream
+// -1 - Error
+int webm_read_frame(struct WebmInputContext *webm_ctx, uint8_t **buffer,