[FFmpeg-devel] [PATCH 2/2] libavcodec/ac3tab: rename ff_ac3_sample_rate_tab to avpriv_ac3_sample_rate_tab so that it can be used in libavformat

James Almer jamrial at gmail.com
Mon Oct 5 15:58:59 EEST 2020


On 10/5/2020 7:48 AM, Nachiket Tarate wrote:
> 
> 
> ________________________________
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of Anton Khirnov <anton at khirnov.net>
> Sent: Monday, October 5, 2020 1:50 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 2/2] libavcodec/ac3tab: rename ff_ac3_sample_rate_tab to avpriv_ac3_sample_rate_tab so that it can be used in libavformat
> 
> Quoting Nachiket Tarate (2020-10-04 16:35:09)
>> This will be used by HLS demuxer to parse EC3SpecificBox (dec3) during SAMPLE-AES decryption.
>>
>> Signed-off-by: Nachiket Tarate <nachiket.tarate at outlook.com>
> 
> Since the table is so small, it seems preferable to duplicate it in
> libavformat than add eat another private symbol.
> 
> Private symbols are evil and should not exist.
> 
> --
> Anton Khirnov
> 
> @Anton Khirnov <anton at khirnov.net>
> In the first version of the patch, I had implemented avpriv_eac3_parse_dec3() function in ac3_parser.c to avoid sharing or duplication of table across the libraries. I changed that implementation based on James Almer <jamrial at gmail.com>'s review comments.
> 
> @James Almer <jamrial at gmail.com>
> What is your opinion about Anton Khirnov <anton at khirnov.net>'s review comments ?

I'm fine with duplicating it. It's true it's small enough for it. I had
not looked at the table in question when i suggested to share it.

In general, if you can avoid exposing functions and tables using the
avpriv_ prefix then that's always preferable, but sometimes it can't be
done.

> 
> --
> Nachiket Tarate
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list