codecs: GstMpeg2Slice: add field for sc_offset and size
authorDaniel Almeida <daniel.almeida@collabora.com>
Fri, 26 Mar 2021 18:31:51 +0000 (15:31 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 2 Nov 2021 16:16:29 +0000 (16:16 +0000)
commit946be1a85abc035a3adcb950cbdbc1f815ab57a5
tree49c062d1f94794fc38e11b20c0b51a5d6bddbfb3
parent8b932c105f7b76cb507c6a5224f1631c0861bd12
codecs: GstMpeg2Slice: add field for sc_offset and size

Downstream might need the start code offset when decoding.

Previously this computation would be scattered in multiple sites. This
is error prone, so move it to the base class. Subclasses can access
slice->sc_offset directly without computing the address themselves
knowing that the size will also take the start code into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstmpeg2decoder.c
subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstmpeg2picture.h