Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FF_INPUT_BUFFER_PADDING_SIZE renamed as AV_INPUT_BUFFER_PADDING_SIZE #11

Open
giulianoc opened this issue Dec 22, 2017 · 6 comments
Open
Assignees
Labels

Comments

@giulianoc
Copy link

Hi, ^
I realized the last FFmpeg renamed FF_INPUT_BUFFER_PADDING_SIZE with AV_INPUT_BUFFER_PADDING_SIZE.

It has to be fixed in the following source file:

  • internal/decode/h264.cpp
  • internal/demux/mp2ts.cpp

Bst regards
Giuliano

@canbal
Copy link
Contributor

canbal commented Dec 22, 2017

Are you getting a warning or an error during compilation?

@giulianoc
Copy link
Author

It is a blocking compilation error.
Replacing it with AV_INPUT_BUFFER_PADDING_SIZE worked fine.

Inside the FFmpeg/doc/APIchanges file, it is written:

2015-07-27 - lavc 56.56.100 / 56.35.0 - avcodec.h
94d68a4 / 7c6eb0a1 - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.
444e987 / def97856 - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.
29d147c / 059a9348 - Rename FF_INPUT_BUFFER_PADDING_SIZE and FF_MIN_BUFFER_SIZE
to AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE.

@canbal
Copy link
Contributor

canbal commented Dec 23, 2017

Thanks for reporting, and the suggested solution. Can you also attach your full compilation log for more info?

When I previously tested with the latest FFmpeg, I remember seeing some warnings about API deprecations/changes but it didn't result in blocking errors. At some point I will to do a proper FFmpeg upgrade and fix all warnings and potentially your issue as well.

@canbal canbal self-assigned this Dec 23, 2017
@giulianoc
Copy link
Author

Hi,
below find a copy of the command generating the error, it was compiled on a MAC.
I just installed again vireo and his dependencies on ubuntu and I did not get any error
(really I had some issues I was able to manage).

BTW, if you want, I could be able to replace automake with cmake that I think is much
better. In case, let me know.
Best regards
Giuliano

edipo-clnt-292:vireo multi$ make V=1
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in ../imagecore
make[2]: Nothing to be done for all'. /bin/sh ./libtool --tag=CXX --mode=compile g++ -std=gnu++14 -DHAVE_CONFIG_H -I. -I./ -I../ -I../thirdparty/l-smash_extra -I/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include -I/Users/multi/GestioneProgetti/Development/vireo/libwebm -g -O2 -fvisibility=hidden -fvisibility-inlines-hidden -MT internal/decode/libvireo_la-h264.lo -MD -MP -MF internal/decode/.deps/libvireo_la-h264.Tpo -c -o internal/decode/libvireo_la-h264.lo test -f 'internal/decode/h264.cpp' || echo './'`internal/decode/h264.cpp
libtool: compile: g++ -std=gnu++14 -DHAVE_CONFIG_H -I. -I./ -I../ -I../thirdparty/l-smash_extra -I/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include -I/Users/multi/GestioneProgetti/Development/vireo/libwebm -g -O2 -fvisibility=hidden -fvisibility-inlines-hidden -MT internal/decode/libvireo_la-h264.lo -MD -MP -MF internal/decode/.deps/libvireo_la-h264.Tpo -c internal/decode/h264.cpp -fno-common -DPIC -o internal/decode/.libs/libvireo_la-h264.o
internal/decode/h264.cpp:67:20: warning: 'refcounted_frames' is deprecated [-Wdeprecated-declarations]
codec_context->refcounted_frames = 1;
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavcodec/avcodec.h:2327:5: note: 'refcounted_frames' has been explicitly marked deprecated here
attribute_deprecated
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'

define attribute_deprecated attribute((deprecated))

                                            ^

internal/decode/h264.cpp:103:60: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
const uint16_t padded_size = (size_t)extradata.count() + FF_INPUT_BUFFER_PADDING_SIZE;
^
internal/decode/h264.cpp:197:17: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
CHECK(avcodec_decode_video2(_this->codec_context.get(), frame.get(), &got_picture, &packet) == packet.size);
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavcodec/avcodec.h:4663:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here
attribute_deprecated
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'

define attribute_deprecated attribute((deprecated))

                                            ^

internal/decode/h264.cpp:203:17: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
CHECK(avcodec_decode_video2(_this->codec_context.get(), frame.get(), &got_picture, &packet) == 0);
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavcodec/avcodec.h:4663:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here
attribute_deprecated
^
/Users/multi/GestioneProgetti/Development/vireo/vireoBinaries/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'

define attribute_deprecated attribute((deprecated))

                                            ^

3 warnings and 1 error generated.
make[2]: *** [internal/decode/libvireo_la-h264.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
edipo-clnt-292:vireo multi$

@canbal
Copy link
Contributor

canbal commented Dec 24, 2017

I see a compile error at the end of your log, along with all the warnings I was talking about. You said you managed the resolve the error, is that true?

@giulianoc
Copy link
Author

Yes, replacing FF_INPUT_BUFFER_PADDING_SIZE and FF_MIN_BUFFER_SIZE
with AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE works fine.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants