[FFmpeg-devel,23/24] avformat/rtpenc_jpeg: remove usage of YUVJ formats

Submitted by Paul B Mahol on May 1, 2018, 7:40 p.m.

Details

Message ID 20180501194013.9552-23-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol May 1, 2018, 7:40 p.m.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/rtpenc_jpeg.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

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