diff mbox series

[FFmpeg-devel] lavf/rtpdec_jpeg: Fix JFIF version

Message ID CAB0OVGpYbut42k19hArvYRpLoetdXxE2J+zzLhyTaiDJiWyMKQ@mail.gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] lavf/rtpdec_jpeg: Fix JFIF version | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Carl Eugen Hoyos May 21, 2020, 8:05 p.m. UTC
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
Subject: [PATCH] lavf/rtpdec_jpeg: Fix JFIF version.

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

Comments

Michael Niedermayer May 22, 2020, 8:39 p.m. UTC | #1
On Thu, May 21, 2020 at 10:05:57PM +0200, Carl Eugen Hoyos wrote:
> 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

>  rtpdec_jpeg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 84e0f8878b2a0a1ad99bae56f64566b4f582c43b  0001-lavf-rtpdec_jpeg-Fix-JFIF-version.patch
> From cf3250c1f044a940336ce17484a1d783849ed71f Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@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(-)

probably ok, please bump the micro version also

thx

[...]
Carl Eugen Hoyos Aug. 25, 2020, 5:31 p.m. UTC | #2
Am Fr., 22. Mai 2020 um 22:39 Uhr schrieb Michael Niedermayer
<michael@niedermayer.cc>:
>
> On Thu, May 21, 2020 at 10:05:57PM +0200, Carl Eugen Hoyos wrote:
> > 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
>
> >  rtpdec_jpeg.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 84e0f8878b2a0a1ad99bae56f64566b4f582c43b  0001-lavf-rtpdec_jpeg-Fix-JFIF-version.patch
> > From cf3250c1f044a940336ce17484a1d783849ed71f Mon Sep 17 00:00:00 2001
> > From: Carl Eugen Hoyos <ceffmpeg@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(-)
>
> probably ok, please bump the micro version also

Patch applied with the version bump.

Thank you, Carl Eugen
diff mbox series

Patch

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