Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit f9a6a80e06. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
f9a6a80e06