Skip to content

Commit

Permalink
tidy: Ignore local <-> ffmpeg conversions that repeat values.
Browse files Browse the repository at this point in the history
The clang-tidy bugprone "branch clone" checker pointed out two places
where a case statement converting local enums to ffmpeg enums repeated
values.  One is an obvious repeat, the other is a macro that equates
to the previous instance.  Tell clang-tidy to ignore both of these
instances of repeated code.

https://clang.llvm.org/extra/clang-tidy/checks/bugprone-branch-clone.html
  • Loading branch information
linuxdude42 committed Nov 27, 2019
1 parent f829115 commit a37390b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythavutil.cpp
Expand Up @@ -47,7 +47,7 @@ AVPixelFormat FrameTypeToPixelFormat(VideoFrameType type)
case FMT_YUV444P14: return AV_PIX_FMT_YUV444P14;
case FMT_YUV444P16: return AV_PIX_FMT_YUV444P16;
case FMT_RGB24: return AV_PIX_FMT_RGB24;
case FMT_BGRA: return AV_PIX_FMT_BGRA;
case FMT_BGRA: return AV_PIX_FMT_BGRA; // NOLINT(bugprone-branch-clone)
case FMT_RGB32: return AV_PIX_FMT_RGB32;
case FMT_ARGB32: return AV_PIX_FMT_ARGB;
case FMT_RGBA32: return AV_PIX_FMT_RGBA;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythvaapidrminterop.cpp
Expand Up @@ -346,7 +346,7 @@ VideoFrameType MythVAAPIInteropDRM::VATypeToMythType(uint32_t Fourcc)
case VA_FOURCC_IYUV:
case VA_FOURCC_I420: return FMT_YV12;
case VA_FOURCC_NV12: return FMT_NV12;
case VA_FOURCC_YUY2: return FMT_YUY2;
case VA_FOURCC_YUY2: return FMT_YUY2; // NOLINT(bugprone-branch-clone)
case VA_FOURCC_UYVY: return FMT_YUY2; // ?
case VA_FOURCC_P010: return FMT_P010;
case VA_FOURCC_P016: return FMT_P016;
Expand Down

0 comments on commit a37390b

Please sign in to comment.