vlc_module_begin();
set_description( N_("Real demuxer" ) );
- set_capability( "demux", 15 );
+ set_capability( "demux", 0 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
set_callbacks( Open, Close );
p_sys->i_data_packets++;
- if( i_size == 0 ) return 0;
+ if( i_size == 0 )
+ {
+ msg_Err( p_demux, "Got a NUKK size to read. (Invalid format?)" );
+ return 1;
+ }
if( i_size > sizeof(p_sys->buffer) )
{
- msg_Err( p_demux, "Got a size to read bigger than our buffer. Ignoring current frame." );
- return 0;
+ msg_Err( p_demux, "Got a size to read bigger than our buffer. (Invalid format?)" );
+ return 1;
}
stream_Read( p_demux->s, p_sys->buffer, i_size );
msg_Dbg(p_demux, "Seek in real rtsp stream!");
p_sys->i_pcr = (int64_t)1000 * ( p_sys->i_our_duration * f );
- es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
p_sys->b_seek = 1;
return stream_Seek( p_demux->s, p_sys->i_pcr );
p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
- es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
-
return stream_Seek( p_demux->s, i64 );
}
case DEMUX_SET_TIME:
}
p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
- es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
return stream_Seek( p_demux->s, i64 );
msg_Dbg( p_demux, " - extra data=%d", fmt.i_extra );
tk = malloc( sizeof( real_track_t ) );
+ if( !tk )
+ return VLC_ENOMEM;
tk->i_id = i_num;
tk->fmt = fmt;
tk->i_frame = 0;
}
/* Check if the calloc went correctly */
- if( tk->p_subpackets == NULL )
+ if( !tk->p_subpackets && !tk->p_subpackets_timecode)
{
- tk->i_subpackets = 0;
+ free( tk->p_subpackets_timecode );
+ free( tk->p_subpackets );
+ free( tk );
msg_Err( p_demux, "Can't alloc subpacket" );
return VLC_EGENERIC;
}