Opened 14 years ago

Closed 13 years ago

Last modified 13 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: Analyzed by developer:

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 13 years ago.
quoting for list options
mplayer-1.0rc1-understand_escaped_commas.patch (1.8 KB) - added by heilong@… 13 years ago.
patch allowing to escape commas (\,)

Download all attachments as: .zip

Change History (19)

comment:1 Changed 14 years ago by reimar

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 Changed 14 years ago by heilong@…

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 Changed 14 years ago by reimar

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

comment:4 Changed 14 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 13 years ago by heilong@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 Changed 13 years ago by reimar

  • Version changed from 1.0pre7 to CVS

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 Changed 13 years ago by heilong@…

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

Changed 13 years ago by reimar

quoting for list options

comment:8 Changed 13 years ago by reimar

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

comment:9 Changed 13 years ago by reimar

  • Owner changed from alex@… to Reimar.Doeffinger@…
  • Status changed from reopened to assigned

comment:10 Changed 13 years ago by heilong@…

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 Changed 13 years ago by reimar

  • Cc mplayer@… added

comment:12 Changed 13 years ago by reimar

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

comment:13 Changed 13 years ago by heilong@…

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

comment:14 Changed 13 years ago by reimar

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.

Changed 13 years ago by heilong@…

patch allowing to escape commas (\,)

comment:15 Changed 13 years ago by heilong@…

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 Changed 13 years ago by reimar

  • Resolution set to fixed
  • Status changed from assigned to closed

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

comment:17 Changed 13 years ago by heilong@…

cool! thanks. will be waiting for the next release

Note: See TracTickets for help on using tickets.