avviddec: Double check if AV_CODEC_FLAG_COPY_OPAQUE port is safe for our scenario
!5186 (merged) introduced AV_CODEC_FLAG_COPY_OPAQUE
usage in video decoder.
If the flag is set, ffmpeg will copy AVPacket.opaque
and AVPacket.opaque_ref
to corresponding AVFrame
.
That seems to be fine if gst_ffmpegviddec_get_buffer2()
is called only once per frame but we have code
in the function to handle multiple gst_ffmpegviddec_get_buffer2()
call per frame.
I'm not sure that could actually happen though, if that can happen, AV_CODEC_FLAG_COPY_OPAQUE
might cause bad things.