[FFmpeg-devel] exposing public API for chromium ffmpeg_demuxer.cc code

Paweł Hajdan phajdan at google.com
Thu Sep 15 19:23:51 EEST 2016

I've been working on making chromium work with system (unmodified and
installed) ffmpeg, and there is some code currently using internal-only
API, which is not available in that case:


Do you have suggestions what could be done to do what above code is doing
without need to access the internal parts?

For convenience, I'm also pasting the snippet of code below:

  const AVFormatInternal* internal = format_context->internal;
  if (internal && internal->packet_buffer &&
      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
    struct AVPacketList* packet_buffer = internal->packet_buffer;
    while (packet_buffer != internal->packet_buffer_end) {
      const AVStream* stream =
      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
        const base::TimeDelta packet_pts =
            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
        if (packet_pts < start_time_estimates[stream->index])
          start_time_estimates[stream->index] = packet_pts;
      packet_buffer = packet_buffer->next;



Paweł Hajdan, Jr. |  Software Engineer |  phajdan at google.com
Google Poland sp. z o.o.
ul. Emilii Plater 53, 00-113 Warszawa
Sąd Rejonowy dla m. st. Warszawy w Warszawie,
XII Wydział Gospodarczy Krajowego Rejestru Sądowego, KRS 0000240611.
NIP: 525-23-44-078, Kapitał zakładowy Spółki 400 000, 00 zł.

More information about the ffmpeg-devel mailing list