[FFmpeg-cvslog] avfilter/f_select: avoid using doubles for equals checks and casts to enums
Michael Niedermayer
git at videolan.org
Tue Aug 5 04:58:06 CEST 2014
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 30 17:37:09 2014 +0200| [c9f1456a41f58f8e4e9f937bba87bce96f7fd7a5] | committer: Michael Niedermayer
avfilter/f_select: avoid using doubles for equals checks and casts to enums
This might silence some warnings.
Issue found from: a8d803a320fb08b3ad5db4fffc79abd401206905
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 887d8d293fc31c949427f971f37c126b3812b451)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9f1456a41f58f8e4e9f937bba87bce96f7fd7a5
---
libavfilter/f_select.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 1ffc006..c3756c2 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -342,10 +342,9 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame)
switch (inlink->type) {
case AVMEDIA_TYPE_VIDEO:
av_log(inlink->dst, AV_LOG_DEBUG, " interlace_type:%c pict_type:%c scene:%f",
- select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' :
- select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' :
- select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : '?',
- av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]),
+ (!frame->interlaced_frame) ? 'P' :
+ frame->top_field_first ? 'T' : 'B',
+ av_get_picture_type_char(frame->pict_type),
select->var_values[VAR_SCENE]);
break;
case AVMEDIA_TYPE_AUDIO:
More information about the ffmpeg-cvslog
mailing list