[FFmpeg-trac] #7847(avformat:new): Mkv customIO wrong cluster

FFmpeg trac at avcodec.org
Wed Apr 17 00:00:53 EEST 2019


#7847: Mkv customIO wrong cluster
-------------------------------------+-------------------------------------
             Reporter:  lunatichai   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:  git-
             Keywords:  mkv cluster  |  master
  avio_alloc_context                 |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: when transcode mkv->webm with custom write with
 "avio_alloc_context" the result file is different from default avio.
 I found that the difference is in MATROSKA_ID_CLUSTER. In customIO bytes:
 1F 43 B6 75 01 FF FF FF FF FF FF FF E7. In default avio (for example): 1F
 43 B6 75 01 00 00 00 00 06 32 D8 E7.

 My simple code to create io:
 {{{
     uint8_t *avio_ctx_buffer = nullptr;
     const size_t avio_ctx_buffer_size = 4096;
     avio_ctx_buffer = (uint8_t*)av_malloc(avio_ctx_buffer_size);
     if (!avio_ctx_buffer) return;
     bufferData = new BufferData();
     avio_ctx = avio_alloc_context(avio_ctx_buffer,
                                   avio_ctx_buffer_size,
                                   1, bufferData, NULL,
                                   &write_packet_to_buffer, NULL);
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7847>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list