[FFmpeg-devel] Patch review: av_dict: add support for empty values

Michael Niedermayer michaelni at gmx.at
Wed Mar 4 14:24:58 CET 2015


On Wed, Mar 04, 2015 at 02:11:42PM +0100, Michael Niedermayer wrote:
> On Tue, Mar 03, 2015 at 10:51:01PM -0400, Peter Cordes wrote:
> [...]
> > Anyway, the av_dict change is the one that requires the most review, so
> > I'll make this email focus on that set of changes.
> > https://github.com/FFmpeg/FFmpeg/pull/118
> 
> pull req #3, patch #1 review
> 
> > -    char *ret     = out, *end = out;
> > +    char *ret     = out, *end_quote = out;
> 
> why ?
> also cosmetical changes should, if they are done, be in seperate
> patches
> 
> 
> > -    while (*p && !strspn(p, term)) {
> > +    while (*p && !strchr(term, *p)) {
> 
> this should be in a seperate patch
> 
> 

> > +    ret = av_realloc(ret, out - ret + 2);
> > +    // if realloc fails to shrink, we're hosed anyway; just leak the old buffer
> >     return ret;
> 
> if realloc fails to shrink, the original unshrunk array should be
> returned to avoid the leak and failure

ahh, i see you fix this in a later commit, this should be stashed
with the patch that would add the bug if it was pushed

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150304/a3478550/attachment.asc>


More information about the ffmpeg-devel mailing list