[FFmpeg-devel] [PATCH] avcodec/libdcadec: require first public release
James Almer
jamrial at gmail.com
Mon Nov 30 00:41:10 CET 2015
On 11/29/2015 5:32 AM, Hendrik Leppkes wrote:
> On Fri, Nov 27, 2015 at 7:11 PM, James Almer <jamrial at gmail.com> wrote:
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> configure | 4 +---
>> libavcodec/libdcadec.c | 6 +++---
>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 0198b75..5583358 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1877,7 +1877,6 @@ TYPES_LIST="
>> CONDITION_VARIABLE_Ptr
>> socklen_t
>> struct_addrinfo
>> - struct_dcadec_exss_info_matrix_encoding
>> struct_group_source_req
>> struct_ip_mreq_source
>> struct_ipv6_mreq
>> @@ -5338,8 +5337,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
>> { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
>> die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
>> enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
>> -enabled libdcadec && require_pkg_config dcadec libdcadec/dca_context.h dcadec_context_create &&
>> - check_struct libdcadec/dca_context.h "struct dcadec_exss_info" matrix_encoding
>> +enabled libdcadec && require_pkg_config "dcadec >= 0.1.0" libdcadec/dca_context.h dcadec_context_create
>> enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
>> enabled libfdk_aac && { use_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
>> { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
>> diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
>> index a0e34f9..e802076 100644
>> --- a/libavcodec/libdcadec.c
>> +++ b/libavcodec/libdcadec.c
>> @@ -42,7 +42,7 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>> {
>> DCADecContext *s = avctx->priv_data;
>> AVFrame *frame = data;
>> - av_unused struct dcadec_exss_info *exss;
>> + struct dcadec_exss_info *exss;
>> int ret, i, k;
>> int **samples, nsamples, channel_mask, sample_rate, bits_per_sample, profile;
>> uint32_t mrk;
>> @@ -78,6 +78,8 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>> &sample_rate, &bits_per_sample, &profile)) < 0) {
>> av_log(avctx, AV_LOG_ERROR, "dcadec_context_filter() failed: %d (%s)\n", -ret, dcadec_strerror(ret));
>> return AVERROR_EXTERNAL;
>> + } else if (ret > 0) {
>> + av_log(avctx, AV_LOG_WARNING, "dcadec_context_filter() warning: %d (%s)\n", ret, dcadec_strerror(ret));
>> }
>>
>> avctx->channels = av_get_channel_layout_nb_channels(channel_mask);
>> @@ -129,7 +131,6 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>> } else
>> avctx->bit_rate = 0;
>>
>> -#if HAVE_STRUCT_DCADEC_EXSS_INFO_MATRIX_ENCODING
>> if (exss = dcadec_context_get_exss_info(s->ctx)) {
>> enum AVMatrixEncoding matrix_encoding = AV_MATRIX_ENCODING_NONE;
>>
>> @@ -158,7 +159,6 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>> (ret = ff_side_data_update_matrix_encoding(frame, matrix_encoding)) < 0)
>> return ret;
>> }
>> -#endif
>>
>> frame->nb_samples = nsamples;
>> if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
>> --
>> 2.6.3
>>
>
>
> LGTM.
Pushed earlier today. Thanks.
More information about the ffmpeg-devel
mailing list