[FFmpeg-devel] [PATCH 25/27] avformat/rtpenc_jpeg: remove usage of YUVJ formats

Paul B Mahol onemda at gmail.com
Sat Dec 9 17:38:17 EET 2017


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/rtpenc_jpeg.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c
index 38eb2e68eb..e0e7afebfc 100644
--- a/libavformat/rtpenc_jpeg.c
+++ b/libavformat/rtpenc_jpeg.c
@@ -46,13 +46,11 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
     h = AV_CEIL_RSHIFT(s1->streams[0]->codecpar->height, 3);
 
     /* get the pixel format type or fail */
-    if (s1->streams[0]->codecpar->format == AV_PIX_FMT_YUVJ422P ||
-        (s1->streams[0]->codecpar->color_range == AVCOL_RANGE_JPEG &&
-         s1->streams[0]->codecpar->format == AV_PIX_FMT_YUV422P)) {
+    if (s1->streams[0]->codecpar->color_range == AVCOL_RANGE_JPEG &&
+         s1->streams[0]->codecpar->format == AV_PIX_FMT_YUV422P) {
         type = 0;
-    } else if (s1->streams[0]->codecpar->format == AV_PIX_FMT_YUVJ420P ||
-               (s1->streams[0]->codecpar->color_range == AVCOL_RANGE_JPEG &&
-                s1->streams[0]->codecpar->format == AV_PIX_FMT_YUV420P)) {
+    } else if (s1->streams[0]->codecpar->color_range == AVCOL_RANGE_JPEG &&
+                s1->streams[0]->codecpar->format == AV_PIX_FMT_YUV420P) {
         type = 1;
     } else {
         av_log(s1, AV_LOG_ERROR, "Unsupported pixel format\n");
-- 
2.11.0



More information about the ffmpeg-devel mailing list