[FFmpeg-devel] [PATCH]lavf/rtpenc_jpeg: Do not check the table number before warning about the precision

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Jul 9 01:26:23 CEST 2015


Imo, the precision check in rtpenc_jpeg.c is wrong: Only the upper four bits 
contain the precision, the lower four bits are the table number.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c
index 7ee26c4..a52bb63 100644
--- a/libavformat/rtpenc_jpeg.c
+++ b/libavformat/rtpenc_jpeg.c
@@ -63,7 +63,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
         if (buf[i + 1] == DQT) {
-            if (buf[i + 4])
+            if (buf[i + 4] & 0xF0)
                 av_log(s1, AV_LOG_WARNING,
                        "Only 8-bit precision is supported.\n");

More information about the ffmpeg-devel mailing list