diff mbox series

[FFmpeg-devel,13/25] avformat/av1: Document actual behaviour of ff_av1_filter_obus()

Message ID AM7PR03MB6660C65E9D30E47DA3555D4A8F569@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 5f973193e56ef0a8506dc2ff2784a25948154a69
Headers show
Series [FFmpeg-devel,01/25] avformat/matroskaenc: Fix potential overflow | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 16, 2022, 11:03 p.m. UTC
Document that it can be used with a NULL AVIOContext to
get the output size in a first pass.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/av1.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/av1.h b/libavformat/av1.h
index dd5b47dc25..f57dabe986 100644
--- a/libavformat/av1.h
+++ b/libavformat/av1.h
@@ -46,12 +46,14 @@  typedef struct AV1SequenceParameters {
  * the resulting bitstream to the provided AVIOContext.
  *
  * @param pb pointer to the AVIOContext where the filtered bitstream shall be
- *           written
+ *           written; may be NULL, in which case nothing is written.
  * @param buf input data buffer
  * @param size size of the input data buffer
  *
- * @return the amount of bytes written in case of success, a negative AVERROR
+ * @return the amount of bytes written (or would have been written in case
+ *         pb had been supplied) in case of success, a negative AVERROR
  *         code in case of failure
+ * @note   One can use NULL for pb to just get the output size.
  */
 int ff_av1_filter_obus(AVIOContext *pb, const uint8_t *buf, int size);