Skip to content

Commit

Permalink
fix(HLSStream): fix crash when webvtt no X-TIMESTAMP-MAP
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Feb 24, 2020
1 parent 8bc4386 commit ed5e311
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/demuxer/play_list/HLSStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,11 @@ namespace Cicada {
* does not say so)
*/
char *hls_timestamp_map = strstr(reinterpret_cast<char *>(mBuffer), "\nX-TIMESTAMP-MAP=");

if (hls_timestamp_map == nullptr) {
return mMapPTS;
}

char *native_str = strstr(hls_timestamp_map, "LOCAL:");
char *mpegts_str = strstr(hls_timestamp_map, "MPEGTS:");

Expand Down

0 comments on commit ed5e311

Please sign in to comment.