For EME case, in SubmitEsPacket, if using tz_handle, the
data of DecoderBuffer should be null, or else crash could
happen in esplusplayer_submit_trust_zone_packet, because it will try to
copy this memory if it's non-null..
When convert media::mojom::DecoderBufferPtr to media::DecoderBuffer,
"new media::DecoderBuffer(0)" will make data of DecoderBuffer non-null,
let's check the input size and don't invoke Initialize() of DecoderBuffer
if size is 0.
Change-Id: I6df4a5cdcc504ac68bf1fd94c198bc0df3b9a22d
Signed-off-by: zhishun.zhou <zhishun.zhou@samsung.com>
default;
DecoderBuffer::DecoderBuffer(size_t size) : size_(size), is_key_frame_(false) {
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (0 == size) {
+ return;
+ }
+#endif
+
Initialize();
}