shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
236 stars 63 forks source link

Player crash when playing some HLS streams #127

Closed Megubit closed 4 years ago

Megubit commented 4 years ago

Managed to reproduce the crash in sample project. Playing: Shaka Player History (live, HLS): https://storage.googleapis.com/shaka-live-assets/player-source.m3u8 Custom stream: https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths-hls/hls.m3u8

The crash points to av_media_track.mm

AvMediaTrack::AvMediaTrack(AVPlayerItem *item, AVMediaSelectionGroup *group,
                           AVMediaSelectionOption *option)
    : MediaTrack(MediaTrackKind::Unknown, [option.displayName UTF8String],
                 [option.extendedLanguageTag UTF8String], GetId()),
      item_(item),
      group_(group),
      option_(option) {}

I assume it's GetId() as the last info is about the crash points to std::__1::char_traits<char>::length(char const*)