From 831018b0bbe26a603802a9022472f714a59293be Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 16 Mar 2017 17:34:12 +0100 Subject: mpeg4audio: Make avpriv_copy_pce_data() inline The function currently accepts a PutBitContext and a GetBitContext, which hardcodes their sizes into the lavc ABI. Since the function is quite small and only called in a few places, the simplest solution is making it inline, thus avoiding a runtime dependency completely. Signed-off-by: Diego Biurrun --- libavcodec/mpeg4audio.h | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'libavcodec/mpeg4audio.h') diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index 2eef2205bd..01f30c6ca7 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -23,6 +23,9 @@ #define AVCODEC_MPEG4AUDIO_H #include + +#include "libavutil/attributes.h" + #include "get_bits.h" #include "put_bits.h" @@ -105,6 +108,44 @@ enum AudioObjectType { #define MAX_PCE_SIZE 304 /// 16; bits -= 16) + ff_pce_copy_bits(pb, gb, 16); + if (bits) + ff_pce_copy_bits(pb, gb, bits); + avpriv_align_put_bits(pb); + align_get_bits(gb); + comment_size = ff_pce_copy_bits(pb, gb, 8); + for (; comment_size > 0; comment_size--) + ff_pce_copy_bits(pb, gb, 8); + + return put_bits_count(pb) - offset; +} #endif /* AVCODEC_MPEG4AUDIO_H */ -- cgit v1.2.3