diff mbox

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

Message ID 20171209153819.19007-25-onemda@gmail.com
State Superseded
Headers show

Commit Message

Paul B Mahol Dec. 9, 2017, 3:38 p.m. UTC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/rtpenc_jpeg.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox

Patch

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");