Changeset 227121 in webkit


Ignore:
Timestamp:
Jan 17, 2018 9:55:55 PM (6 years ago)
Author:
jer.noble@apple.com
Message:

WebVTT served via HLS never results in cues
https://bugs.webkit.org/show_bug.cgi?id=181773

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/hls/hls-webvtt-tracks.html

Three independant errors conspired to keep in-band WebVTT samples from parsing:

  • The definition of ISOWebVTTCue::boxTypeName() was incorrect.
  • ISOWebVTTCue::parse() didn't call it's superclass's parse() method (leading to an incorrect size and offset).
  • Use String::fromUTF8() rather than String.adopt(StringVector&&).
  • platform/graphics/iso/ISOVTTCue.cpp:

(WebCore::ISOWebVTTCue::parse):

  • platform/graphics/iso/ISOVTTCue.h:

(WebCore::ISOWebVTTCue::boxTypeName):

LayoutTests:

  • http/tests/media/hls/hls-webvtt-tracks-expected.txt: Added.
  • http/tests/media/hls/hls-webvtt-tracks.html: Added.
  • http/tests/media/resources/hls/subtitles/fileSequence0.webvtt: Added.
  • http/tests/media/resources/hls/subtitles/prog_index.m3u8: Added.
  • http/tests/media/resources/hls/test-webvtt.m3u8: Added.
Location:
trunk
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227103 r227121  
     12018-01-17  Jer Noble  <jer.noble@apple.com>
     2
     3        WebVTT served via HLS never results in cues
     4        https://bugs.webkit.org/show_bug.cgi?id=181773
     5
     6        Reviewed by Eric Carlson.
     7
     8        * http/tests/media/hls/hls-webvtt-tracks-expected.txt: Added.
     9        * http/tests/media/hls/hls-webvtt-tracks.html: Added.
     10        * http/tests/media/resources/hls/subtitles/fileSequence0.webvtt: Added.
     11        * http/tests/media/resources/hls/subtitles/prog_index.m3u8: Added.
     12        * http/tests/media/resources/hls/test-webvtt.m3u8: Added.
     13
    1142018-01-17  John Wilander  <wilander@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r227103 r227121  
     12018-01-17  Jer Noble  <jer.noble@apple.com>
     2
     3        WebVTT served via HLS never results in cues
     4        https://bugs.webkit.org/show_bug.cgi?id=181773
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: http/tests/media/hls/hls-webvtt-tracks.html
     9
     10        Three independant errors conspired to keep in-band WebVTT samples from parsing:
     11
     12        - The definition of ISOWebVTTCue::boxTypeName() was incorrect.
     13        - ISOWebVTTCue::parse() didn't call it's superclass's parse() method (leading to an incorrect size and offset).
     14        - Use String::fromUTF8() rather than String.adopt(StringVector&&).
     15
     16        * platform/graphics/iso/ISOVTTCue.cpp:
     17        (WebCore::ISOWebVTTCue::parse):
     18        * platform/graphics/iso/ISOVTTCue.h:
     19        (WebCore::ISOWebVTTCue::boxTypeName):
     20
    1212018-01-17  John Wilander  <wilander@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp

    r225764 r227121  
    5959        }
    6060
    61         StringVector<LChar> characters;
     61        Vector<LChar> characters;
    6262        characters.reserveInitialCapacity((size_t)characterCount);
    6363        while (characterCount--) {
     
    6868        }
    6969
    70         m_contents.adopt(WTFMove(characters));
     70        m_contents = String::fromUTF8(characters);
    7171        offset = localOffset;
    7272        return true;
     
    8989bool ISOWebVTTCue::parse(DataView& view, unsigned& offset)
    9090{
     91    if (!ISOBox::parse(view, offset))
     92        return false;
     93
    9194    ISOStringBox stringBox;
    9295
  • trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.h

    r225764 r227121  
    4343    ISOWebVTTCue(const MediaTime& presentationTime, const MediaTime& duration);
    4444
    45     static FourCC boxTypeName() { return "vtcc"; }
     45    static FourCC boxTypeName() { return "vttc"; }
    4646
    4747    const MediaTime& presentationTime() const { return m_presentationTime; }
Note: See TracChangeset for help on using the changeset viewer.