[MPlayer-dev-eng] Re: [PATCH] wishlist accept dvd://9-12 command line
Roberto Togni
r_togni at tiscali.it
Sun Jun 6 19:22:38 CEST 2004
On 2004.06.05 16:35, adland wrote:
[...]
> > btw the patch does not support dvd://2- or similar syntax. is it
> > intended?
>
> I had purposefully neglected to implement this since I had not
> read the dvd to get actual end title number.
> we are only at the parsing the command line stage in the code.
ok
[...]
> can patch be considered.
I see one small problem, can you please check it?
@@ -196,7 +198,41 @@
{
play_tree_t* entry = play_tree_new(); <------
mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]);
+ // if required expand DVD filename entries like dvd://1-3 into
[...]
+ if (dvd_range(start_title) && dvd_range(end_title) &&
(start_title<end_title))
+ {
+ for (j=start_title;j<=end_title;j++)
+ {
+ entry=play_tree_new(); <------
+ snprintf(entbuf,9,"dvd://%d",j);
[...]
Looks like the playlist entry allocated at the beginning is lost when
entering the for cycle. Probably you should skip allocation for the
first element, to avoid a memleak.
Ciao,
Roberto
More information about the MPlayer-dev-eng
mailing list