Hi!

When receiving jpeg frames via rtp, libavformat currently writes a
wrong JFIF version (2.01 instead of 1.02), see also 85ca012ba68.
Attached patch fixes the version.

Please comment, Carl Eugen
From cf3250c1f044a940336ce17484a1d783849ed71f Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Thu, 21 May 2020 22:03:08 +0200
Subject: [PATCH] lavf/rtpdec_jpeg: Fix JFIF version.

See also 85ca012b
---
 libavformat/rtpdec_jpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 931463cec4..b32d074136 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -112,7 +112,7 @@ static int jpeg_create_header(uint8_t *buf, int size, uint32_t type, uint32_t w,
     jpeg_put_marker(&pbc, APP0);
     bytestream2_put_be16(&pbc, 16);
     bytestream2_put_buffer(&pbc, "JFIF", 5);
-    bytestream2_put_be16(&pbc, 0x0201);
+    bytestream2_put_be16(&pbc, 0x0102);
     bytestream2_put_byte(&pbc, 0);
     bytestream2_put_be16(&pbc, 1);
     bytestream2_put_be16(&pbc, 1);
-- 
2.24.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to