Merge commit '863ee8a855b8ce27ffef41479eb66da58763faed'

* commit '863ee8a855b8ce27ffef41479eb66da58763faed':
  lavfi: clean memory on error in ADD_FORMAT()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-21 21:39:26 +01:00
commit 42f3cb419a

View File

@ -320,8 +320,10 @@ do { \
\
fmts = av_realloc((*f)->list, \
sizeof(*(*f)->list) * ((*f)->nb + 1));\
if (!fmts) \
if (!fmts) { \
av_freep(&f); \
return AVERROR(ENOMEM); \
} \
\
(*f)->list = fmts; \
(*f)->list[(*f)->nb++] = fmt; \