Message ID | 20171231130728.5335-1-atomnuker@gmail.com |
---|---|
State | New |
Headers | show |
On 12/31/2017 10:07 AM, Rostislav Pehlivanov wrote: > Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com> > --- > libavcodec/avcodec.h | 4 +++- > libavcodec/version.h | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index c13deb599f..5a27211b80 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -4558,6 +4558,7 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); > */ > enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); > > +#if FF_API_OLD_CODING > /** > * Decode the audio frame of size avpkt->size from avpkt->data into frame. > * > @@ -4609,7 +4610,7 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); > * decoding, otherwise the number of bytes consumed from the input > * AVPacket is returned. > * > -* @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). > + * @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). > */ > attribute_deprecated > int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, > @@ -4664,6 +4665,7 @@ attribute_deprecated > int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, > int *got_picture_ptr, > const AVPacket *avpkt); > +#endif > > /** > * Decode a subtitle message. > diff --git a/libavcodec/version.h b/libavcodec/version.h > index 47a15d52b8..2886e76860 100644 > --- a/libavcodec/version.h > +++ b/libavcodec/version.h > @@ -127,7 +127,10 @@ > #define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) > #endif > #ifndef FF_API_LOCKMGR > -#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) > +#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) > +#endif > +#ifndef FF_API_OLD_CODING > +#define FF_API_OLD_CODING (LIBAVCODEC_VERSION_MAJOR < 59) > #endif You haven't wrapped the actual implementations in decode.c and encode.c In any case, the cosmetic changes here look good but should be in a separate patch.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c13deb599f..5a27211b80 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4558,6 +4558,7 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); */ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); +#if FF_API_OLD_CODING /** * Decode the audio frame of size avpkt->size from avpkt->data into frame. * @@ -4609,7 +4610,7 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); * decoding, otherwise the number of bytes consumed from the input * AVPacket is returned. * -* @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). + * @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). */ attribute_deprecated int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, @@ -4664,6 +4665,7 @@ attribute_deprecated int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt); +#endif /** * Decode a subtitle message. diff --git a/libavcodec/version.h b/libavcodec/version.h index 47a15d52b8..2886e76860 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -127,7 +127,10 @@ #define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) #endif #ifndef FF_API_LOCKMGR -#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) +#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_CODING +#define FF_API_OLD_CODING (LIBAVCODEC_VERSION_MAJOR < 59) #endif
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com> --- libavcodec/avcodec.h | 4 +++- libavcodec/version.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-)