On 07/07/15 1:23 PM, Michael Niedermayer wrote: > On Tue, Jul 07, 2015 at 05:29:17PM +0200, Hendrik Leppkes wrote: >> On Tue, Jul 7, 2015 at 1:46 PM, Michael Niedermayer <michae...@gmx.at> wrote: >>> On Tue, Jul 07, 2015 at 03:06:23AM -0300, James Almer wrote: >>>> Signed-off-by: James Almer <jamr...@gmail.com> >>>> --- >>>> libavcodec/libdcadec.c | 19 +++++++++++++++++++ >>>> 1 file changed, 19 insertions(+) >>>> >>>> diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c >>>> index 890d270..4bc3765 100644 >>>> --- a/libavcodec/libdcadec.c >>>> +++ b/libavcodec/libdcadec.c >>>> @@ -41,6 +41,7 @@ static int dcadec_decode_frame(AVCodecContext *avctx, >>>> void *data, >>>> { >>>> DCADecContext *s = avctx->priv_data; >>>> AVFrame *frame = data; >>>> + struct dcadec_exss_info *exss; >>>> int ret, i, k; >>>> int **samples, nsamples, channel_mask, sample_rate, bits_per_sample, >>>> profile; >>>> uint32_t mrk; >>>> @@ -127,6 +128,24 @@ static int dcadec_decode_frame(AVCodecContext *avctx, >>>> void *data, >>>> } else >>>> avctx->bit_rate = 0; >>>> >>>> + if (exss = dcadec_context_get_exss_info(s->ctx)) { >>>> + enum AVMatrixEncoding matrix_encoding = AV_MATRIX_ENCODING_NONE; >>>> + >>>> + switch(exss->matrix_encoding) { >>>> + case DCADEC_MATRIX_ENCODING_SURROUND: >>>> + matrix_encoding = AV_MATRIX_ENCODING_DOLBY; >>>> + break; >>>> + case DCADEC_MATRIX_ENCODING_HEADPHONE: >>> >>> breaks build here >>> >>> CC libavcodec/libdcadec.o >>> libavcodec/libdcadec.c: In function ‘dcadec_decode_frame’: >>> libavcodec/libdcadec.c:147:20: error: ‘struct dcadec_exss_info’ has no >>> member named ‘matrix_encoding’ >>> libavcodec/libdcadec.c:148:14: error: ‘DCADEC_MATRIX_ENCODING_SURROUND’ >>> undeclared (first use in this function) >>> libavcodec/libdcadec.c:148:14: note: each undeclared identifier is reported >>> only once for each function it appears in >>> libavcodec/libdcadec.c:151:14: error: ‘DCADEC_MATRIX_ENCODING_HEADPHONE’ >>> undeclared (first use in this function) >>> >> >> dcadec currently does not version its library or headers, > > ok, its their lib and their headers, thats is not > really causing a problem > > >> so we're >> always assuming you are using git HEAD, > > then our code is broken because it does not check for that. > whatever we assume is available for build must be checked by > configure > > if we use ‘DCADEC_MATRIX_ENCODING_HEADPHONE’, configure should check > for that. > Such check can use a version number if there is one, but if there is > none something else can very easily be used to check for the lib to > be new enough a field, a struct, a symbol that has been added later > ...
I'll add a check for that. It can easily be removed once the first release is tagged (And we force it as a minimum requirement). > > >> until such a time when he has >> a release version and library versioning (ie. after the first >> release). > > [...] > > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel