avformat/matroskadec: use refcounted buffers in EbmlBin
authorJames Almer <jamrial@gmail.com>
Wed, 4 Apr 2018 17:12:54 +0000 (14:12 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 7 Apr 2018 00:14:49 +0000 (21:14 -0300)
commita61886650b598c98b7f8b44b3c186e33873913cd
tree8a26bea47b27c49c5181c64ce94322ff0bb2bb43
parent647fd4b8292e3bfae30b1086aa842a5ee47ee868
avformat/matroskadec: use refcounted buffers in EbmlBin

Data in EbmlBin objects is never changed after being read from the
input file (save for two specific cases with encoded CodePrivate), so
using AVBufferRef we can prevent unnecessary copy of data by instead
creating new references to said constant data.

Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/matroskadec.c