[Ffmpeg-devel] [PATCH] avcodec_open Doxygen docs

Panagiotis Issaris takis.issaris
Thu Feb 22 15:33:32 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Michael Niedermayer schreef:
> Hi
> 
> On Thu, Feb 22, 2007 at 03:02:49AM +0100, Panagiotis Issaris wrote:
>>> [...]
>> I'm not sure actually about the (w+128)*(uint64_t)(h+128) < INT_MAX/4) 
>> part of the
>> check: For 64-bit machines, couldn't this check be too strict? IOW isn't 
>> INT_MAX
>> still somewhere near 2^31 on 64-bit machines?
> 
> INT_MAX can be INT64_MAX depending on compiler but more important is that
> the whole code needs to be audited if INT_MAX where changed to LONG_MAX
I see.

>> or:
>> 2578  * Checks if the given dimension of a picture is valid, meaning 
>> that width and
>> 2579  * height are sane and the total picture size is addressable.
>>
>> or:
>> 2578  * Checks if the given dimension of a picture is valid, meaning 
>> that width and
>> 2579  * height and total picture size are sane.
>>
>> And preference? Or a better suggestion maybe?
> 
> maybe somethng like
> 
> Checks if the given dimension of a picture is valid, meaning that all
> bytes of the picture can be addressed with a signed int
Thanks. Fixed.

> [...]
>>>  
>>>> + * @warning The end of the input buffer \p buf should be set to 0 to 
>>>> ensure that
>>>> + * no overreading happens for damaged MPEG streams.
>>>>    
>>> this trick is limited to video i _think_ though of course it does no harm
>>> for audio
>>>  
>> Ah, apiexample.c used it for audio decoding too, which is why I added 
>> it. Attached patch removes it in case anyone
>> confirms to be 100% sure it does no harm to remove it.
> 
> apply it
Applied the little patch.


Attached you'll find an updated patch with your comments addressed and
one other "Initialize ..." changed to "Initializes ...".

 avcodec.h |  211
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 utils.c   |   69 --------------------
 2 files changed, 199 insertions(+), 81 deletions(-)

With friendly regards,
Takis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3am89kOxLuzz4CkRAiYpAJ9NlIS4eCb5uEuYqHxnGA0ZPA6lKACeLlD5
lH6OKYPn29EJDI0vVnN5POE=
=nPJD
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070222T152702-ffmpeg-avcodec_dox5.diff
Type: text/x-patch
Size: 17080 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070222/61f7baec/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070222T152702-ffmpeg-avcodec_dox5.diff.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070222/61f7baec/attachment.obj>



More information about the ffmpeg-devel mailing list