mov: Fix handling of zero-length metadata values
Since 3cec81f4, a zero-length metadata value would try to allocate 2*0 bytes, where av_malloc() returns NULL. Always add one to the allocated length, to allow space for a null terminator in the zero-length case. Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler bug seems to mess up the mov muxer to the point that it writes the wrong sort of metadata. Previously this bug was undetected, but since 3cec81f4 such mov files started returning AVERROR(ENOMEM) in the mov demuxer. Signed-off-by: Martin Storsjö <martin@martin.st>
Showing
Please
register
or
sign in
to comment