mpeg2: fix memory leak of empty packets.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 9 Oct 2012 13:40:49 +0000 (15:40 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 9 Oct 2012 16:05:48 +0000 (18:05 +0200)
commit91da4fcb18dc83e8e03caf8905a5ee09c564444b
tree8f2f15cf9cb84995869b6682f09b5baa00bf1b40
parent8f7d19f010a7a8a525fb7bb2c36c75f9ca4c94b6
mpeg2: fix memory leak of empty packets.

Fix memory leakage of empty packets, i.e. packets that only contain
the start code prefix. In particular, free empty user-data packets.

Besides, the codec parser will already fail gracefully if the packet
to parse does not have the minimum required size. So, we can also
completely drop the block of code that used to handle packets of size 4
(including the start code).
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c