[vlc-commits] modules: Remove use of gcc specific conditionals with omitted operands
Hugo Beauzée-Luyssen
git at videolan.org
Fri Oct 24 17:12:21 CEST 2014
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Oct 21 16:10:52 2014 +0200| [d78e3a654f3538e17c5683e0a3d8fd282103b68c] | committer: Hugo Beauzée-Luyssen
modules: Remove use of gcc specific conditionals with omitted operands
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d78e3a654f3538e17c5683e0a3d8fd282103b68c
---
modules/codec/avcodec/video.c | 3 ++-
modules/codec/dmo/dmo.c | 15 ++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index a542732..d596b3f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -275,7 +275,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
vlc_sem_init( &p_sys->sem_mt, 0 );
/* ***** Fill p_context with init values ***** */
- p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_original_fourcc ?: p_dec->fmt_in.i_codec );
+ p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_original_fourcc ?
+ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec );
/* ***** Get configuration of ffmpeg plugin ***** */
p_context->workaround_bugs =
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index 161fd17..999df8b 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -386,7 +386,8 @@ static int DecOpen( decoder_t *p_dec )
dmo_input_type.majortype = MEDIATYPE_Audio;
dmo_input_type.subtype = dmo_input_type.majortype;
- dmo_input_type.subtype.Data1 = p_dec->fmt_in.i_original_fourcc ?: p_dec->fmt_in.i_codec;
+ dmo_input_type.subtype.Data1 = p_dec->fmt_in.i_original_fourcc ?
+ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec;
fourcc_to_wf_tag( p_dec->fmt_in.i_codec, &i_tag );
if( i_tag ) dmo_input_type.subtype.Data1 = i_tag;
@@ -417,7 +418,8 @@ static int DecOpen( decoder_t *p_dec )
memcpy( &p_vih[1], p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra );
p_bih = &p_vih->bmiHeader;
- p_bih->biCompression = p_dec->fmt_in.i_original_fourcc ?: p_dec->fmt_in.i_codec;
+ p_bih->biCompression = p_dec->fmt_in.i_original_fourcc ?
+ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec;
p_bih->biWidth = p_dec->fmt_in.video.i_width;
p_bih->biHeight = p_dec->fmt_in.video.i_height;
p_bih->biBitCount = p_dec->fmt_in.video.i_bits_per_pixel;
@@ -432,7 +434,8 @@ static int DecOpen( decoder_t *p_dec )
dmo_input_type.majortype = MEDIATYPE_Video;
dmo_input_type.subtype = dmo_input_type.majortype;
- dmo_input_type.subtype.Data1 = p_dec->fmt_in.i_original_fourcc ?: p_dec->fmt_in.i_codec;
+ dmo_input_type.subtype.Data1 = p_dec->fmt_in.i_original_fourcc ?
+ p_dec->fmt_in.i_original_fourcc: p_dec->fmt_in.i_codec;
dmo_input_type.formattype = FORMAT_VideoInfo;
dmo_input_type.bFixedSizeSamples = 0;
dmo_input_type.bTemporalCompression = 1;
@@ -672,7 +675,8 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
uint16_t i_tag;
dmo_partial_type.type = MEDIATYPE_Audio;
dmo_partial_type.subtype = dmo_partial_type.type;
- dmo_partial_type.subtype.Data1 = p_fmt->i_original_fourcc ?: p_fmt->i_codec;
+ dmo_partial_type.subtype.Data1 = p_fmt->i_original_fourcc ?
+ p_fmt->i_original_fourcc : p_fmt->i_codec;
fourcc_to_wf_tag( p_fmt->i_codec, &i_tag );
if( i_tag ) dmo_partial_type.subtype.Data1 = i_tag;
}
@@ -680,7 +684,8 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
{
dmo_partial_type.type = MEDIATYPE_Video;
dmo_partial_type.subtype = dmo_partial_type.type;
- dmo_partial_type.subtype.Data1 = p_fmt->i_original_fourcc ?: p_fmt->i_codec;
+ dmo_partial_type.subtype.Data1 = p_fmt->i_original_fourcc ?
+ p_fmt->i_original_fourcc : p_fmt->i_codec;
}
/* Load msdmo DLL */
More information about the vlc-commits
mailing list