[MPlayer-dev-eng] Re: [TEST PATCH] How to get rid of all sscanf() or new face of config :)

Ivan Szanto szivan at duticai.TWI.TUDelft.NL
Sun Mar 30 01:27:36 CET 2003


Hi Andriy,


On Sat, 29 Mar 2003, Andriy N. Gritsenko wrote:

>
>
>     Argh, it's my fault, sorry. I've tried it on MPlayer-20030310, hardly
> tested it and then moved on MPlayer-20030325 but didn't check it. Only
> now I found some differencies in these versions that I didn't find out
> before. Sorry. Let me fix it now. Patch is in attachment.

Thank you for the patch. This time I got it working. And indeed,
it does what I expected, I'm able to set the list of channels in
the config file like this:

tv:channels=e9-NL1,e11-NL2,28-RTL4,63-RTL5,31-SBS6,21-Yorin,E12-Belga1,SE11-Belga2,E8-ARD,SE9-ZDF,24-BBC

But something isn't clear to me. Is this the result of your patch,
or was this possiblity there even before? I'm afraid it was, since
I get these things even without the patch. These things also include
one inconvenience and one bug.

1. if I set a flag paramater in the config file without an actual
   value, I get a segmentation fault, e.g.

tv:mjpeg

gives SIGSEGV:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 25925)]
0x406c8b09 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x406c8b09 in vfprintf () from /lib/libc.so.6
#1  0x406e44f3 in vsnprintf () from /lib/libc.so.6
#2  0x8070dbb in mp_msg_c (x=2817, format=0x8270b60 "Option %s need a
parameter at line %d\n")
    at mp_msg.c:65
#3  0x8084fcf in m_config_parse_config_file (config=0x83b6008,
    conffile=0x83bd2c0 "/home/szivan/.mplayer/config") at parser-cfg.c:124
#4  0x806a883 in parse_cfgfiles (conf=0x83b6008) at mplayer.c:522
#5  0x806b007 in main (argc=1, argv=0xbffff904) at mplayer.c:751
#6  0x40695baf in __libc_start_main () from /lib/libc.so.6

whereas

tv:mjpeg=1

works as it should.

2. when I append one more item to the list of channels above, it
   makes mplayer exit with the following message:

"too long parameter"

This is an inconvenience, cause I'd like to have more channels,
and I'm able to set them on the command line.

* * *

There's also a difference. I also have in my config file the
following:

vo=mga,xv,jpeg

With your patch, I'm not able to override this setting, and it
always gives me mga (when the mga driver is loaded). This is
something I don't like, because without your patch, it did
work, and I need this functionality.

>     Thank you for your help.

You're welcome. I thank you as well.

>     Best wishes for you!
>     Andriy.

Same to you.

Ivan



More information about the MPlayer-dev-eng mailing list