[FFmpeg-devel] [PATCH] avcodec/aac/aacdec_usac: remove unnecessary cast

Lynne dev at lynne.ee
Mon Jun 3 03:18:02 EEST 2024


On 03/06/2024 01:14, James Almer wrote:
> Fixes "libavcodec/aac/aacdec_usac.c(543): error C2440: 'type cast': cannot convert from 'GetBitContext' to 'GetBitContext'"
> from msvc.

That's a very weird error. Why would they not permit casts of the same type?

> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>   libavcodec/aac/aacdec_usac.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> index 00ec74718b..c76d72d7a7 100644
> --- a/libavcodec/aac/aacdec_usac.c
> +++ b/libavcodec/aac/aacdec_usac.c
> @@ -540,7 +540,7 @@ static int decode_spectrum_and_dequant_ac(AACDecContext *s, float coef[1024],
>       c = ff_aac_ac_map_process(state, reset, N);
>   
>       /* Backup reader for rolling back by 14 bits at the end */
> -    gb2 = (GetBitContext)*gb;
> +    gb2 = *gb;
>       gb_count = get_bits_count(&gb2);
>   
>       for (i = 0; i < len/2; i++) {

LGTM, tnx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA2FEA5F03F034464.asc
Type: application/pgp-keys
Size: 624 bytes
Desc: OpenPGP public key
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240603/f8e3c09a/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240603/f8e3c09a/attachment.sig>


More information about the ffmpeg-devel mailing list