[MPlayer-dev-eng] [PATCH] [RFC] Demuxer cleanup
Nico Sabbi
nsabbi at tiscali.it
Tue Jul 26 08:57:16 CEST 2005
Roberto Togni wrote:
>Hi all.
>
>This patch replaces the big switch statements in demuxer.c with a
>modularized structure, like the one already used for codecs and streams.
>
>Now to add a demuxer you only have to add a new DEMUXER_TYPE_ define,
>add a pointer to a demuxer description structure to the list at the top
>of demuxer.c, and add the demuxer_desc_t structure in your code.
>
>This is a big patch, but most of the changes are very simple:
>- demuxer.c: almost all changes are here
>- demuxer_*.c: some functions made static, added description structures,
>created open_ and check_ functions to host code moved from demuxer.c
>(where needed)
>- mplayer.c: added code for -demuxer help
>- cfg-common.h: -demuxer now takes a string as parameter
>
>As a bonus you get:
>- -demuxer help
>- demuxer selection by name
>
>
>Please test. If you can please test also external audiofile and tv
>(this is untested, i don't have a tv card).
>
>If someone is missing in author field of a demuxer please report.
>
>I'd like to apply it soon if there are no objections (this weekend?),
>unless you think it's better to delay it after pre9 (when?)
>
>Ciao,
> Roberto
>
>
>
>
Hi,
I really love this patch :) , thanks.
Every format I tested played fine: mpeg*, avi, ogg, audio formats, mf://.
tv:// works fine, too.
The only segfault I encountered is when using -audiofile (the unpatched
version works fine):
$ gdb mplayer
# run monte.avi -audiofile file.mp2
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223775360 (LWP 13712)]
0x0816e1af in demux_seek (demuxer=0x881a2a8, rel_seek_secs=0, flags=0)
at demuxer.c:834
834 if (demuxer->desc->seek)
(gdb) bt
#0 0x0816e1af in demux_seek (demuxer=0x881a2a8, rel_seek_secs=0,
flags=0) at demuxer.c:834
#1 0x080a8df5 in main (argc=4, argv=0xbf958494) at mplayer.c:3881
(gdb)
More information about the MPlayer-dev-eng
mailing list