Hi!

Attached patch intends to fix ticket #5975, rfc 2435 says stream type
64 should be treated like 0.

Please review, Carl Eugen
From 690f2fccf766f3cbb23a1ef45e235e25c355b197 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Fri, 5 Jan 2018 05:40:30 +0100
Subject: [PATCH] lavf/rtpdec_jpeg: Treat jpeg type 64 like 0.

Fixes ticket #5975.
---
 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 465d9bc..3a33e3a 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -162,7 +162,7 @@ static int jpeg_create_header(uint8_t *buf, int size, uint32_t type, uint32_t w,
     bytestream2_put_be16(&pbc, w);
     bytestream2_put_byte(&pbc, 3); /* number of components */
     bytestream2_put_byte(&pbc, 1); /* component number */
-    bytestream2_put_byte(&pbc, (2 << 4) | (type ? 2 : 1)); /* hsample/vsample */
+    bytestream2_put_byte(&pbc, (2 << 4) | (type & ~64 ? 2 : 1)); /* hsample/vsample */
     bytestream2_put_byte(&pbc, 0); /* matrix number */
     bytestream2_put_byte(&pbc, 2); /* component number */
     bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
-- 
1.7.10.4

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

Reply via email to