mirror of https://code.videolan.org/videolan/vlc
demux: nuv: bring the vlc_stream_Read(NULL) check on one line
No functional changes. Just makes it easier to refactor the code if needed.
This commit is contained in:
parent
2172376dfe
commit
01100e13f7
|
@ -259,8 +259,7 @@ static int Open( vlc_object_t * p_this )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg_Warn( p_demux, "unsupported 'D' frame (c=%c)", fh.i_compression );
|
msg_Warn( p_demux, "unsupported 'D' frame (c=%c)", fh.i_compression );
|
||||||
if( vlc_stream_Read( p_demux->s, NULL,
|
if( vlc_stream_Read( p_demux->s, NULL, fh.i_length ) != fh.i_length )
|
||||||
fh.i_length ) != fh.i_length )
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -380,8 +379,7 @@ static int Demux( demux_t *p_demux )
|
||||||
|
|
||||||
if( fh.i_type != 'R' && fh.i_length > 0 )
|
if( fh.i_type != 'R' && fh.i_length > 0 )
|
||||||
{
|
{
|
||||||
if( vlc_stream_Read( p_demux->s, NULL,
|
if( vlc_stream_Read( p_demux->s, NULL, fh.i_length ) != fh.i_length )
|
||||||
fh.i_length ) != fh.i_length )
|
|
||||||
return VLC_DEMUXER_EGENERIC;
|
return VLC_DEMUXER_EGENERIC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -609,8 +607,7 @@ static int ControlSetPosition(demux_t *p_demux, uint64_t offset, bool b_guess)
|
||||||
|
|
||||||
if( fh.i_type != 'R' && fh.i_length > 0 )
|
if( fh.i_type != 'R' && fh.i_length > 0 )
|
||||||
{
|
{
|
||||||
if( vlc_stream_Read( p_demux->s, NULL,
|
if( vlc_stream_Read( p_demux->s, NULL, fh.i_length ) != fh.i_length )
|
||||||
fh.i_length ) != fh.i_length )
|
|
||||||
return VLC_EGENERIC;
|
return VLC_EGENERIC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue