diff mbox series

[FFmpeg-devel,v7,5/8] avcodec/h264_metadata_bsf: Fix for the incorrect user data with hyphens

Message ID 20200107050355.17503-5-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,v7,1/8] avutil: add AV_FRAME_DATA_USER_DATA_UNREGISTERED side data type
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang Jan. 7, 2020, 5:03 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

How to reproduce:
./ffmpeg -f lavfi -i testsrc -c:v libx264 -g 25 -bsf:v h264_metadata=sei_user_data=186f3693-b7b3-4f2c-9653-21492feee5b8+hello -frames:v 1 h264.mp4

master:
[Parsed_showinfo_0 @ 0x7fc8a0703180] UUID=186f3693-7030-4f2c-6030-21492feee5b8
[Parsed_showinfo_0 @ 0x7fc8a0703180] User Data=hello

Applied the patch:
[Parsed_showinfo_0 @ 0x7f969d408e00] UUID=186f3693-b7b3-4f2c-9653-21492feee5b8
[Parsed_showinfo_0 @ 0x7f969d408e00] User Data=hello

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/h264_metadata_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Jan. 8, 2020, 12:35 a.m. UTC | #1
On Tue, Jan 07, 2020 at 01:03:52PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> How to reproduce:
> ./ffmpeg -f lavfi -i testsrc -c:v libx264 -g 25 -bsf:v h264_metadata=sei_user_data=186f3693-b7b3-4f2c-9653-21492feee5b8+hello -frames:v 1 h264.mp4
> 
> master:
> [Parsed_showinfo_0 @ 0x7fc8a0703180] UUID=186f3693-7030-4f2c-6030-21492feee5b8
> [Parsed_showinfo_0 @ 0x7fc8a0703180] User Data=hello
> 
> Applied the patch:
> [Parsed_showinfo_0 @ 0x7f969d408e00] UUID=186f3693-b7b3-4f2c-9653-21492feee5b8
> [Parsed_showinfo_0 @ 0x7f969d408e00] User Data=hello
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavcodec/h264_metadata_bsf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 5de74be9d6..d96a50dbf7 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -381,7 +381,7 @@  static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
             } else {
                 goto invalid_user_data;
             }
-            if (i & 1)
+            if (j & 1)
                 udu->uuid_iso_iec_11578[j / 2] |= v;
             else
                 udu->uuid_iso_iec_11578[j / 2] = v << 4;