mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
cosmetics: Remove pointless parentheses from return statements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26790 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
bc0058c63e
commit
c4f6f66f9e
@ -132,15 +132,15 @@ static inline AVS_Value avs_new_value_array(AVS_Value * v0, int size)
|
||||
static inline int avs_is_error(AVS_Value v) { return v.type == 'e'; }
|
||||
static inline int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
|
||||
static inline int avs_is_string(AVS_Value v) { return v.type == 's'; }
|
||||
static inline int avs_has_video(const AVS_VideoInfo * p) { return (p->width!=0); }
|
||||
static inline int avs_has_audio(const AVS_VideoInfo * p) { return (p->audio_samples_per_second!=0); }
|
||||
static inline int avs_has_video(const AVS_VideoInfo * p) { return p->width != 0; }
|
||||
static inline int avs_has_audio(const AVS_VideoInfo * p) { return p->audio_samples_per_second != 0; }
|
||||
|
||||
static inline const char * avs_as_string(AVS_Value v)
|
||||
{ return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
|
||||
|
||||
/* Color spaces */
|
||||
static inline int avs_is_rgb(const AVS_VideoInfo * p)
|
||||
{ return (p->pixel_type&AVS_CS_BGR); }
|
||||
{ return p->pixel_type & AVS_CS_BGR; }
|
||||
|
||||
static inline int avs_is_rgb24(const AVS_VideoInfo * p)
|
||||
{ return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
|
||||
@ -149,7 +149,7 @@ static inline int avs_is_rgb32(const AVS_VideoInfo * p)
|
||||
{ return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
|
||||
|
||||
static inline int avs_is_yuy(const AVS_VideoInfo * p)
|
||||
{ return (p->pixel_type&AVS_CS_YUV ); }
|
||||
{ return p->pixel_type & AVS_CS_YUV; }
|
||||
|
||||
static inline int avs_is_yuy2(const AVS_VideoInfo * p)
|
||||
{ return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }
|
||||
|
@ -238,7 +238,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
|
||||
{
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "Not a FILM file\n");
|
||||
free(film_data);
|
||||
return(NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// get the header size, which implicitly points past the header and
|
||||
@ -428,7 +428,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
|
||||
default:
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "Unrecognized FILM header chunk: %08X\n",
|
||||
chunk_type);
|
||||
return(NULL);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ static demuxer_t* demux_open_fli(demuxer_t* demuxer){
|
||||
magic_number);
|
||||
free(header);
|
||||
free(frames);
|
||||
return(NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// fetch the number of frames
|
||||
|
@ -75,8 +75,8 @@ static void disk_flush(int time) {
|
||||
}
|
||||
|
||||
static int disk_free(void) { // vqf plugin sends more than it should
|
||||
return (XMMS_PACKETSIZE-xmms_audiopos<XMMS_PACKETSIZE/4 ?
|
||||
0:XMMS_PACKETSIZE-xmms_audiopos-XMMS_PACKETSIZE/4);
|
||||
return XMMS_PACKETSIZE - xmms_audiopos < XMMS_PACKETSIZE / 4 ?
|
||||
0 : XMMS_PACKETSIZE - xmms_audiopos - XMMS_PACKETSIZE / 4;
|
||||
}
|
||||
|
||||
static int disk_playing(void) {
|
||||
|
@ -1236,7 +1236,7 @@ int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, int mode, float *seek_
|
||||
}
|
||||
}
|
||||
|
||||
return (ris != STREAM_UNSUPPORTED ? chapter : -1);
|
||||
return ris != STREAM_UNSUPPORTED ? chapter : -1;
|
||||
} else { //chapters structure is set in the demuxer
|
||||
total = demuxer->num_chapters;
|
||||
|
||||
|
@ -231,27 +231,25 @@ static void fix_audio_sys_header(muxer_priv_t *priv, uint8_t id, uint8_t newid,
|
||||
|
||||
static inline int is_mpeg1(uint32_t x)
|
||||
{
|
||||
return (
|
||||
return
|
||||
(x == 0x10000001) ||
|
||||
(x == mmioFOURCC('m','p','g','1')) ||
|
||||
(x == mmioFOURCC('M','P','G','1'))
|
||||
);
|
||||
(x == mmioFOURCC('M','P','G','1'));
|
||||
}
|
||||
|
||||
static inline int is_mpeg2(uint32_t x)
|
||||
{
|
||||
return (
|
||||
return
|
||||
(x == 0x10000002) ||
|
||||
(x == mmioFOURCC('m','p','g','2')) ||
|
||||
(x == mmioFOURCC('M','P','G','2')) ||
|
||||
(x == mmioFOURCC('m','p','e','g')) ||
|
||||
(x == mmioFOURCC('M','P','E','G'))
|
||||
);
|
||||
(x == mmioFOURCC('M','P','E','G'));
|
||||
}
|
||||
|
||||
static inline int is_mpeg4(uint32_t x)
|
||||
{
|
||||
return (
|
||||
return
|
||||
(x == 0x10000004) ||
|
||||
(x == mmioFOURCC('d','i','v','x')) ||
|
||||
(x == mmioFOURCC('D','I','V','X')) ||
|
||||
@ -265,8 +263,7 @@ static inline int is_mpeg4(uint32_t x)
|
||||
(x == mmioFOURCC('F', 'M','P','4')) ||
|
||||
(x == mmioFOURCC('f', 'm','p','4')) ||
|
||||
(x == mmioFOURCC('D', 'X','5','0')) ||
|
||||
(x == mmioFOURCC('d', 'x','5','0'))
|
||||
);
|
||||
(x == mmioFOURCC('d', 'x','5','0'));
|
||||
}
|
||||
|
||||
//from unrarlib.c
|
||||
@ -666,7 +663,7 @@ static int write_mpeg_psm(muxer_t *muxer, char *buff)
|
||||
|
||||
static int psm_is_late(muxer_priv_t *priv)
|
||||
{
|
||||
return (!priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL));
|
||||
return !priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL);
|
||||
}
|
||||
|
||||
static int write_mpeg_pes_header(muxer_headers_t *h, uint8_t *pes_id, uint8_t *buff, uint16_t plen, int stuffing_len, int mux_type)
|
||||
|
Loading…
Reference in New Issue
Block a user