[FFmpeg-devel] [PATCH]lavf/rtpdec_jpeg: Treat stream type 64 like 0.

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Jan 6 14:53:09 EET 2018


2018-01-06 2:45 GMT+01:00 Michael Niedermayer <michael at niedermayer.cc>:
> On Fri, Jan 05, 2018 at 05:43:01AM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch intends to fix ticket #5975, rfc 2435 says stream type
>> 64 should be treated like 0.
>>
>> Please review, Carl Eugen
>
>>  rtpdec_jpeg.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 6c39ed6cee670ad983250a1dd2566d9aa58b7abf  0001-lavf-rtpdec_jpeg-Treat-jpeg-type-64-like-0.patch
>> From 690f2fccf766f3cbb23a1ef45e235e25c355b197 Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg at 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 */
>
> isnt 64 masked out already ?
> "        type &= ~0x40;"
>
> am i missing something ?

No, the reporter of ticket #5975 and I missed my commit...

Thank you, Carl Eugen


More information about the ffmpeg-devel mailing list