Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8096534

[media] Long mp4 files (duration > 12hrs) are rejected by the media player.

    XMLWordPrintable

    Details

      Description

      Long mp4 files (duration > 12hrs) are rejected by the media player.


      Found the following check in the gstreamer (qtdemux.c:5382):

        if (stream->n_samples >=
            QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample)) {
          GST_WARNING_OBJECT (qtdemux, "not allocating index of %d samples, would "
              "be larger than %uMB (broken file?)", stream->n_samples,
              QTDEMUX_MAX_SAMPLE_INDEX_SIZE >> 20);

      That means the gstreamer rejects streams which have more than QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample) = 50 * 1024 * 1024 / 32 = 1638400 samples.
      The file supplied 1861369 samples, that's why it couldn't be loaded.

      Thus we have unreasonable file length limitation: even if there is enough memory to allocate for a sample table gstreamer rejects such media assuming that the 'file is broken'.

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              Assignee:
              anashaty Anton Nashatyrev (Inactive)
              Reporter:
              anashaty Anton Nashatyrev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: