diff mbox series

[FFmpeg-devel,1/2] avcodec/h264_metadata_bsf: Don't add AUD to extradata

Message ID HE1PR0301MB2154B137D807073CA7986D2B8F7A9@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit b917218c35d240d9266c163103353e51facb0cae
Headers show
Series [FFmpeg-devel,1/2] avcodec/h264_metadata_bsf: Don't add AUD to extradata | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 2, 2021, 3:38 p.m. UTC
This is a regression since switching to the generic CBS BSF code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Will apply this patchset soon.

 libavcodec/h264_metadata_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Almer April 2, 2021, 3:48 p.m. UTC | #1
On 4/2/2021 12:38 PM, Andreas Rheinhardt wrote:
> This is a regression since switching to the generic CBS BSF code.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> Will apply this patchset soon.
> 
>   libavcodec/h264_metadata_bsf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
> index 6e58c0be1d..06d23e3142 100644
> --- a/libavcodec/h264_metadata_bsf.c
> +++ b/libavcodec/h264_metadata_bsf.c
> @@ -466,7 +466,7 @@ static int h264_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
>           if (ctx->aud == BSF_ELEMENT_REMOVE)
>               ff_cbs_delete_unit(au, 0);
>       } else {
> -        if (ctx->aud == BSF_ELEMENT_INSERT) {
> +        if (pkt && ctx->aud == BSF_ELEMENT_INSERT) {
>               err = h264_metadata_insert_aud(bsf, au);
>               if (err < 0)
>                   return err;

LGTM. And please backport it, too.
diff mbox series

Patch

diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 6e58c0be1d..06d23e3142 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -466,7 +466,7 @@  static int h264_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
         if (ctx->aud == BSF_ELEMENT_REMOVE)
             ff_cbs_delete_unit(au, 0);
     } else {
-        if (ctx->aud == BSF_ELEMENT_INSERT) {
+        if (pkt && ctx->aud == BSF_ELEMENT_INSERT) {
             err = h264_metadata_insert_aud(bsf, au);
             if (err < 0)
                 return err;