This commit fixes crash when playing audio element.
There is a case that video demuxer stream is used even if it doesn't exist.
So prevent access to invalid demuxer stream.
Reference: https://review.tizen.org/gerrit/280782/
Change-Id: I737793d799f657f4553ca4d3ffe2ea5fc2f6ed7c
Signed-off-by: Koyyani Maheswari <m.koyyani@samsung.com>
}
void MediaPlayerESPlusPlayer::UpdateBufferedDtsDifference() {
+ // Ignore unless audio and video streams are valid.
+ if (!IsValid(DemuxerStream::AUDIO) || !IsValid(DemuxerStream::VIDEO))
+ return;
+
const auto& audio_ts = last_frames_.get<DemuxerStream::AUDIO>().first;
const auto& video_ts = last_frames_.get<DemuxerStream::VIDEO>().first;