[MPlayer-cvslog] r33088 - trunk/gui/interface.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Mar 21 18:36:51 CET 2011


On Mon, Mar 21, 2011 at 01:35:38PM +0100, ib wrote:
> Author: ib
> Date: Mon Mar 21 13:35:38 2011
> New Revision: 33088
> 
> Log:
> Replace vcd_seek_to_track() by stream_control().
> 
> The call with variable vcd_track is pointless and has been removed.

Hm, what is the purpose of the vcd_track variable then?
How does the Gui switch vcd tracks? I'd expect that won't work
anymore like that.

> @@ -698,23 +696,11 @@ int guiGetEvent(int type, void *arg)
>  
>  #ifdef CONFIG_VCD
>          case STREAMTYPE_VCD:
> -        {
> -            int i;
> -
> -            if (!stream->priv) {
> +            if (!stream->priv)
>                  guiIntfStruct.VCDTracks = 0;
> -                break;
> -            }
> -
> -            for (i = 1; i < 100; i++)
> -                if (vcd_seek_to_track(stream->priv, i) < 0)
> -                    break;
> -
> -            vcd_seek_to_track(stream->priv, vcd_track);
> -            guiIntfStruct.VCDTracks = --i;
> -
> +            else
> +                stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiIntfStruct.VCDTracks);

First, the check for stream->priv is now unnecessary.
Second, since there's no check for stream_control failing, you should always
initialize guiIntfStruct.VCDTracks to 0 beforehand.
(or alternatively check for failure and set it to 0 on failure).


More information about the MPlayer-cvslog mailing list