⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 264299 in webkit


Ignore:
Timestamp:
Jul 13, 2020, 6:03:22 AM (6 years ago)
Author:
aboya@igalia.com
Message:

[MSE][GStreamer] Discard PTS-less samples
​https://bugs.webkit.org/show_bug.cgi?id=214252

Reviewed by Philippe Normand.

In some cases GStreamer demuxers emit PTS-less samples with metadata
at the beginning of the container. These are fortunately not necessary
for playback, and in fact incompatible with the way MSE works, where
you should be able to start playing a stream from the middle.

This patch skips these frames in the AppendPipeline so they don't
pollute other parts of the MSE codebase.

Since these frames were not necessary and were later overwritten,
this patch is just a cleanup introducing no notable behavior changes.

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::appsinkNewSample):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r264298 r264299  
     12020-07-13  Alicia Boya García  <aboya@igalia.com>
     2
     3        [MSE][GStreamer] Discard PTS-less samples
     4        https://bugs.webkit.org/show_bug.cgi?id=214252
     5
     6        Reviewed by Philippe Normand.
     7
     8        In some cases GStreamer demuxers emit PTS-less samples with metadata
     9        at the beginning of the container. These are fortunately not necessary
     10        for playback, and in fact incompatible with the way MSE works, where
     11        you should be able to start playing a stream from the middle.
     12
     13        This patch skips these frames in the AppendPipeline so they don't
     14        pollute other parts of the MSE codebase.
     15
     16        Since these frames were not necessary and were later overwritten,
     17        this patch is just a cleanup introducing no notable behavior changes.
     18
     19        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
     20        (WebCore::AppendPipeline::appsinkNewSample):
     21
    1222020-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
    223
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp

    r264211 r264299  
    461461    }
    462462
     463    if (!GST_BUFFER_PTS_IS_VALID(gst_sample_get_buffer(sample.get()))) {
     464        // When demuxing Vorbis, matroskademux creates several PTS-less frames with header information. We don't need those.
     465        GST_DEBUG("Ignoring sample without PTS: %" GST_PTR_FORMAT, gst_sample_get_buffer(sample.get()));
     466        return;
     467    }
     468
    463469    auto mediaSample = WebCore::MediaSampleGStreamer::create(WTFMove(sample), m_presentationSize, trackId());
    464470
Note: See TracChangeset for help on using the changeset viewer.