[FFmpeg-devel] [PATCH v2 4/4] avformat/argo_cvg: expose loop/reverb/checksum via metadata

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Jul 21 01:00:05 EEST 2022


Zane van Iperen:
> Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
> ---
>  libavformat/argo_cvg.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c
> index 12465dcbcc..3d4abb4758 100644
> --- a/libavformat/argo_cvg.c
> +++ b/libavformat/argo_cvg.c
> @@ -162,6 +162,15 @@ static int argo_cvg_read_header(AVFormatContext *s)
>      if ((ret = argo_cvg_read_checksum(s->pb, &ctx->header, &ctx->checksum)) < 0)
>          return ret;
>  
> +    if (av_dict_set_int(&st->metadata, "loop", ctx->header.loop, 0) < 0)
> +        return AVERROR(ENOMEM);
> +
> +    if (av_dict_set_int(&st->metadata, "reverb", ctx->header.reverb, 0) < 0)
> +        return AVERROR(ENOMEM);
> +
> +    if (av_dict_set_int(&st->metadata, "checksum", ctx->checksum, 0) < 0)
> +        return AVERROR(ENOMEM);
> +
>      par                         = st->codecpar;
>      par->codec_type             = AVMEDIA_TYPE_AUDIO;
>      par->codec_id               = AV_CODEC_ID_ADPCM_PSX;

Don't second-guess error codes (unless you have a good reason to).

- Andreas


More information about the ffmpeg-devel mailing list