[FFmpeg-devel] [PATCH] WIP: lavf/segment: provide a virtual AVIOContext representing all the segments

Michael Niedermayer michael at niedermayer.cc
Thu Oct 22 18:22:33 CEST 2015


On Thu, Oct 22, 2015 at 04:50:00AM -0500, Rodger Combs wrote:
> This allows the use of muxers like matroska, which attempt to seek even
> when an AVIOContext doesn't set `seekable`, without concern for a rouge
> seek leading the muxer to overwrite the wrong data in a later segment.
> ---
>  doc/muxers.texi       |  17 ++++
>  libavformat/segment.c | 262 ++++++++++++++++++++++++++++++++++++++------------
>  2 files changed, 215 insertions(+), 64 deletions(-)

ffmpeg -i matrixbench_mpeg2.mpg -vcodec mpeg2video -f segment  /tmp/out-%4d.mpg
results in (at the end)
*** glibc detected *** ffmpeg/ffmpeg: corrupted double-linked list: 0x0000000003b10ab0 ***

==29669== Invalid free() / delete / delete[] / realloc()rate=N/A
==29669==    at 0x4C2B5D9: free (vg_replace_malloc.c:446)
==29669==    by 0x691D68: seg_write_trailer (in ffmpeg/ffmpeg_g)
==29669==    by 0x63E0A9: av_write_trailer (in ffmpeg/ffmpeg_g)
==29669==    by 0x4B64CC: transcode (in ffmpeg/ffmpeg_g)
==29669==    by 0x498A05: main (in ffmpeg/ffmpeg_g)
==29669==  Address 0x19b24280 is 0 bytes inside a block of size 13 free'd
==29669==    at 0x4C2B5D9: free (vg_replace_malloc.c:446)
==29669==    by 0x691D37: seg_write_trailer (in ffmpeg/ffmpeg_g)
==29669==    by 0x63E0A9: av_write_trailer (in ffmpeg/ffmpeg_g)
==29669==    by 0x4B64CC: transcode (in ffmpeg/ffmpeg_g)
==29669==    by 0x498A05: main (in ffmpeg/ffmpeg_g)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151022/2bb89fa6/attachment.sig>


More information about the ffmpeg-devel mailing list