avviddec: Enforce allocate new AVFrame per input frame
authorSeungha Yang <seungha.yang@navercorp.com>
Wed, 23 Oct 2019 15:25:28 +0000 (00:25 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Wed, 23 Oct 2019 15:25:28 +0000 (00:25 +0900)
commit80c8c05457d1a7ba37a15b7150e6797dd4dac8e1
treedf1a2cab0230ff1fe7d9a1c883bb01c9ce7059f2
parentca478e7546c059574e0f134125deb38c8cbc9111
avviddec: Enforce allocate new AVFrame per input frame

... if ffmpeg would reuse the allocated AVBuffer. Reused AVFrame by
the ffmpeg seems to break our decoding flow since the reused AVFrame
holds the initial opaque data (GstVideoCodecFrame in this case), so
we couldn't trace the our in/out frames.
To enforce get_buffer() call per output frame, hold another reference
to the AVBuffer in order to mark the AVBuffer as not writable.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/62
ext/libav/gstavviddec.c