Possible inconsistency in mediacontrol_set_rate

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
vlad2vlc
New Cone
New Cone
Posts: 1
Joined: 01 Sep 2008 10:51

Possible inconsistency in mediacontrol_set_rate

Postby vlad2vlc » 01 Sep 2008 12:01

I am using VLC built from source vlc_0.9.0-git20080726-1.tar.gz on
Elive Linux, Intel Core2 6400 @2.13GHz, 2GB RAM.

While trying a simple program compiled against libvlc, I came across
the following problem.

The function mediacontrol_set_rate as defined in
mediacontrol_audio_video.c, line 304, accepts an integer argument
rate, representing the playback rate in percent. It then calls
libvlc_media_player_set_rate with this value multiplied by 10:

libvlc_media_player_set_rate( self->p_media_player, rate * 10, &ex );

Unfortunately, libvlc_media_player_set_rate expects a float rate, as
defined in media_player.c, line 916.

Using directly libvlc_media_player_set_rate with float rate works fine.

A simple change in mediacontrol_audio_video.c:

313c313
< libvlc_media_player_set_rate( self->p_media_player, rate * 10, &ex );
---
> libvlc_media_player_set_rate( self->p_media_player, rate * 0.01, &ex );

fixes the problem for me.

I checked vlc-snapshot-branch-0.9.1-git-20080901.tar.gz and this
inconsistency is still there. I could not find anything relevant
searching in the forums and the tickets.

Saluto.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Possible inconsistency in mediacontrol_set_rate

Postby dionoea » 01 Sep 2008 14:48

Please file a bug report on http://trac.videolan.org/vlc .
Cheers,
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 59 guests