[PROBLEM]
CreateVideoFrame() may fail and return nullptr. This can happen for
example when wrapping native texture is not sucesfull during player
cleanup. Such non-existing frame is used by OnBufferFilled(), leading
to a crash.
[SOLUTION]
Check whether or not frame returned by CreateVideoFrame() exists before
using it.
Bug: https://jira-eu.sec.samsung.net/browse/VDGAME-621
Signed-off-by: Piotr Bałut <p.balut@samsung.com>
Change-Id: I827a8b94a506c91371805c5de31a14a5f9da6bbd
auto video_frame =
ttvd_decoded_frame->CreateVideoFrame(output_data.timestamp);
+ if (!video_frame) {
+ TIZEN_MEDIA_LOG(ERROR) << "Cannot create video frame";
+ return;
+ }
video_frame->metadata().allow_overlay = supports_overlay_;
// In case texturing mode is not supported, mark video frame as HW protected,
// so it's force to use overlay or is rendered as black frame.