[vlc-devel] commit: sout: allow duplicate outputs to be merged ( Rafaël Carré )
Rémi Denis-Courmont
remi at remlab.net
Sun Jan 17 11:49:18 CET 2010
% ./vlc -I dummy /dev/null --sout '#duplicate'VLC media player 1.1.0-git The
Luggage
[0x8dce908] dummy interface: using the dummy interface module...
[0x8dd08c8] stream_out_duplicate stream out error: no destination given
*** glibc detected *** ./vlc: double free or corruption (fasttop): 0x08dd0830
***
...
Aborted
% valgrind ./vlc -I dummy /dev/null --sout '#duplicate'
==2386== Memcheck, a memory error detector
==2386== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==2386== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright
info
==2386== Command: ./vlc -I dummy /dev/null --sout #duplicate
==2386==
VLC media player 1.1.0-git The Luggage
==2386==
==2386== HEAP SUMMARY:
==2386== in use at exit: 0 bytes in 0 blocks
==2386== total heap usage: 32 allocs, 32 frees, 2,393 bytes allocated
==2386==
==2386== All heap blocks were freed -- no leaks are possible
==2386==
==2386== For counts of detected and suppressed errors, rerun with: -v
==2386== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 6)
[0x46196d8] dummy interface: using the dummy interface module...
[0x46504c0] stream_out_duplicate stream out error: no destination given
==2386== Thread 4:
==2386== Invalid free() / delete / delete[]
==2386== at 0x4024866: free (vg_replace_malloc.c:325)
==2386== by 0x40F0FED: sout_StreamChainNew (stream_output.c:947)
==2386== by 0x40F1416: __sout_NewInstance (stream_output.c:120)
==2386== by 0x4098559: input_resource_RequestSout (resource.c:125)
==2386== by 0x4092D6F: Init (input.c:880)
==2386== by 0x409622F: Run (input.c:529)
==2386== by 0x40D5115: thread_entry (threads.c:58)
==2386== by 0x4136584: start_thread (pthread_create.c:300)
==2386== by 0x421826D: clone (clone.S:130)
==2386== Address 0x4415d68 is 0 bytes inside a block of size 10 free'd
==2386== at 0x4024866: free (vg_replace_malloc.c:325)
==2386== by 0x40EFB38: sout_StreamDelete (stream_output.c:804)
==2386== by 0x40F0E64: sout_StreamChainNew (stream_output.c:862)
==2386== by 0x40F1416: __sout_NewInstance (stream_output.c:120)
==2386== by 0x4098559: input_resource_RequestSout (resource.c:125)
==2386== by 0x4092D6F: Init (input.c:880)
==2386== by 0x409622F: Run (input.c:529)
==2386== by 0x40D5115: thread_entry (threads.c:58)
==2386== by 0x4136584: start_thread (pthread_create.c:300)
==2386== by 0x421826D: clone (clone.S:130)
1743aae3ec2b5e8b02c3bad36dcd50914ac09d8a is the first bad commit
commit 1743aae3ec2b5e8b02c3bad36dcd50914ac09d8a
Author: Rafaël Carré <rafael.carre at gmail.com>
Date: Sun Jan 17 07:37:33 2010 +0100
sout: allow duplicate outputs to be merged
The stream_out_t chain creation is modified: all modules are created by
the core (or by stream_out_duplicate) instead of being created by the
previous module.
sout_StreamChain{New,Delete} replace sout_Stream{New,Delete} to handle
modules chains instead of individual modules
sout_Stream{New,Delete} are still used by those new functions but made
static inside stream_output.c
Remove now unneeded psz_chain from struct sout_instance_t
Replace pointer to chain of next module by pointer to next module in
struct sout_stream_t
Example use:
vlc --sout-all input.mp4 --sout
"#duplicate{dst=transcode{vcodec=mp2v},select=es=0,dst=transcode,select=es=1}:std{...}"
(dst=transcode without acodec/vcodec is a hack to pass the encoded stream
to
stream_out_standard without transcoding)
:040000 040000 3112b3cf903c2c52ac44a5504bde9e06edbea373
ee87b444dafcc05bbdb431573f60f476cb087562 M include
:040000 040000 b65f52a03753fa3d6c31f30d18d60329b23ac570
1c2b847923ed01d6206972dbcf672674df98f92d M modules
:040000 040000 a7f8b79bd97cdc52e4f3c0a8057cf7db7ca62c80
124342fba8da4561701791e673fe231e48b94ef3 M src
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list