Commit b4279dc0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

demux: always use DEMUX_GET_(TITLE|SEEKPOINT)

parent a673d2bd
......@@ -218,14 +218,14 @@ enum demux_query_e
/** Read the title number currently playing
*
* Can fail, in which case demux_t.info.i_title is used
* Can fail.
*
* arg1= int * */
DEMUX_GET_TITLE, /* arg1= int* can fail */
/* Read the seekpoint/chapter currently playing
*
* Can fail, in which case demux_t.info.i_seekpoint is used
* Can fail.
*
* arg1= int * */
DEMUX_GET_SEEKPOINT, /* arg1= int* can fail */
......
......@@ -562,18 +562,20 @@ unsigned demux_TestAndClearFlags( demux_t *p_demux, unsigned flags )
int demux_GetTitle( demux_t *p_demux )
{
int i_title;
if ( demux_Control( p_demux, DEMUX_GET_TITLE, &i_title ) == VLC_SUCCESS )
return i_title;
return p_demux->info.i_title;
int title;
if (demux_Control(p_demux, DEMUX_GET_TITLE, &title))
title = 0;
return title;
}
int demux_GetSeekpoint( demux_t *p_demux )
{
int i_seekpoint;
if ( demux_Control( p_demux, DEMUX_GET_SEEKPOINT, &i_seekpoint ) == VLC_SUCCESS )
return i_seekpoint;
return p_demux->info.i_seekpoint;
int seekpoint;
if (demux_Control(p_demux, DEMUX_GET_SEEKPOINT, &seekpoint))
seekpoint = 0;
return seekpoint;
}
static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment