]> git.sesse.net Git - ffmpeg/commit
avcodec/utils: fix sizeof(AVFrame) dependence in avcodec_encode_audio2()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 17 Mar 2014 23:07:53 +0000 (00:07 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Mar 2014 01:03:30 +0000 (02:03 +0100)
commit8ab80707841a73ca7708e1e1aa97f3513fff3d35
tree4ee837326989f9e832a153927a0e2861d062a3ac
parentaa1f38015cb0d04a5c50a8957dd7aba79f0d8882
avcodec/utils: fix sizeof(AVFrame) dependence in  avcodec_encode_audio2()

This is a bit tricky, we allocate a correctly sized AVFrame but then only
copy the compile time AVFrame size, this is to ensure that user applications
which do not use the correct av frame API dont end with out of array reads.
Note, applications using the correct API have set extended_data and the
changed code will never be executed for them.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c