Opened 19 years ago

Closed 17 years ago

Last modified 17 years ago

#378 closed defect (fixed)

-ao pcm:file=filename splits commas from filename!

Reported by: heilong@… Owned by: reimar
Priority: normal Component: ao
Version: HEAD Severity: normal
Keywords: Cc: mplayer@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

the new syntax for specifying pcm output file (compared to the old -aofile
filename) doesn't support the full range of characters in filename. i
batch-convert my mp3s to wave files with a shell script that does mplayer
FILENAME.mp3 -ao pcm:file=FILENAME.wav. now it doesn't work for files that have
a ',' in the filename; the output file is then set to the part before the comma.

Attachments (2)

list_esc.diff (876 bytes ) - added by reimar 18 years ago.
quoting for list options
mplayer-1.0rc1-understand_escaped_commas.patch (1.8 KB ) - added by heilong@… 17 years ago.
patch allowing to escape commas (\,)

Download all attachments as: .zip

Change History (19)

comment:1 by reimar, 19 years ago

You can use the %lenght%string syntax described in the man page here. A patch to
allow escaping via "" has not yet been applied...

comment:2 by heilong@…, 19 years ago

i've been able to find it on the mailinglist discussion, but there's nothing in
the manual (version 1.0pre7try2). is the "" patch going to make it in?

comment:3 by reimar, 19 years ago

It is in by now (i.e. CVS).

comment:4 by reimar, 19 years ago

Resolution: fixed
Status: newclosed

Oops, forgot: I guess that means this bug is actually fixed.

comment:5 by heilong@…, 18 years ago

Resolution: fixed
Status: closedreopened

it's been a while, but no escaping works as of mplayer
dev-CVS-060409-01:31-3.4.6 (latest gentoo ebuild). maybe i'm missing smth? pls
tell me how to use this

comment:6 by reimar, 18 years ago

Version: 1.0pre7CVS

Right, it doesn't work. The fix only works for files with a ':' in the name, at
least in the -ao pcm:file=... case.

comment:7 by heilong@…, 18 years ago

So, will it be ever fixed? Please...

by reimar, 18 years ago

Attachment: list_esc.diff added

quoting for list options

comment:8 by reimar, 18 years ago

Try this, worked for me with the following syntax: mplayer -ao '"pcm:file=a,c"'

comment:9 by reimar, 18 years ago

Owner: changed from alex@… to Reimar.Doeffinger@…
Status: reopenedassigned

comment:10 by heilong@…, 18 years ago

while this works, isn't the comma (IIRC) supposed to separate pcm options, i.e.
it should look like this mplayer ... -ao
pcm:file='"a,b"',something_else(dunno_what_it_is_actually)

may be mistaken...
anyway, smth as simple as this should be applied asap. thanks

comment:11 by reimar, 17 years ago

Cc: mplayer@… added

comment:12 by reimar, 17 years ago

* Bug 411 has been marked as a duplicate of this bug. *

comment:13 by heilong@…, 17 years ago

Reimar, do you think this will be resolved any time soon?

comment:14 by reimar, 17 years ago

A patch to allow using , (by writing \,) in -vf parameters was applied
recently, unfortunately it does not seem to help for this case.
It will be resolved when someone writes a proper patch for it. Sorry, but I
have no way to predict when this will be, I personally am too busy with other
things ATM.

by heilong@…, 17 years ago

patch allowing to escape commas (\,)

comment:15 by heilong@…, 17 years ago

I guess if I want smth, I just gotta do it myself.
It turned out not to be that hard (although I really do hate coding string manipulation in C - so much hassle). Here's the patch against MPlayer-1.0rc1 that changes the parse_str_list function to ignore LIST_SEPARATOR (',') if it's escaped with '\'. The backslashes are then stripped. What do you think? Seems to work fine and not break anything.

comment:16 by reimar, 17 years ago

Resolution: fixed
Status: assignedclosed

Sorry, forgot to say a simpler patch that also reuses the escaping code that is already there was applied recently.

comment:17 by heilong@…, 17 years ago

cool! thanks. will be waiting for the next release

Note: See TracTickets for help on using tickets.