Thanks and another one:
avio_alloc_context() parameter buffer must be allocated with av_malloc and
it's friends, so document it.

On Sat, May 14, 2011 at 5:50 PM, Luca Barbato <[email protected]> wrote:

> On 5/14/11 11:48 AM, Can Wu wrote:
>
>> just memory failure check in avio_alloc_context()
>>
>> Best Regards
>>
>
> Good catch, patch looks fine.
>
> lu
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
>



-- 
wucan
From 7f77b235c85c4ee763c2049d2d25a1e4fb0726be Mon Sep 17 00:00:00 2001
From: Can Wu <[email protected]>
Date: Sat, 14 May 2011 17:34:28 +0800
Subject: avio: document buffer must created with av_malloc() and it's friends

Else a later buffer resize in ffio_set_buf_size() will ABORT.
---
 libavformat/avio.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index b98137b..48d2360 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -373,6 +373,7 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void));
  * freed with av_free().
  *
  * @param buffer Memory block for input/output operations via AVIOContext.
+ *        The buffer must be allocated with av_malloc() and it's friends.
  * @param buffer_size The buffer size is very important for performance.
  *        For protocols with fixed blocksize it should be set to this blocksize.
  *        For others a typical size is a cache page, e.g. 4kb.
-- 
1.7.3.2.168.gd6b63

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to