Skip to content

Commit a4dc9d4

Browse files
authored
Merge pull request #241 from eisneinechse/develop
Silence deprecated warnings in ffmpeg 3.x
2 parents eaac2db + d6eef8f commit a4dc9d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/FFmpegUtilities.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@
209209
#define AV_FORMAT_NEW_STREAM(oc, st_codec, av_codec, av_st) av_st = avformat_new_stream(oc, NULL);\
210210
if (!av_st) \
211211
throw OutOfMemory("Could not allocate memory for the video stream.", path); \
212+
_Pragma ("GCC diagnostic push"); \
213+
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\""); \
212214
avcodec_get_context_defaults3(av_st->codec, av_codec); \
213215
c = av_st->codec; \
216+
_Pragma ("GCC diagnostic pop"); \
214217
st_codec = c;
215218
#define AV_COPY_PARAMS_FROM_CONTEXT(av_stream, av_codec) avcodec_parameters_from_context(av_stream->codecpar, av_codec);
216219
#elif LIBAVFORMAT_VERSION_MAJOR >= 55

0 commit comments

Comments
 (0)