[FFmpeg-devel] [PATCH 3/7] lavf: move ff_get_v from avio.h to avio_internal.h

Måns Rullgård mans
Sun Mar 6 18:20:11 CET 2011


Anton Khirnov <anton at khirnov.net> writes:

> ---
>  libavformat/avio.h          |    2 --
>  libavformat/avio_internal.h |    2 ++
>  libavformat/mpc8.c          |    1 +
>  libavformat/nutdec.c        |    1 +
>  4 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index c544552..adbccb5 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -571,8 +571,6 @@ unsigned int avio_rb24(AVIOContext *s);
>  unsigned int avio_rb32(AVIOContext *s);
>  uint64_t     avio_rb64(AVIOContext *s);
>  
> -uint64_t ff_get_v(AVIOContext *bc);
> -
>  #if FF_API_OLD_AVIO
>  static inline int url_is_streamed(AVIOContext *s)
>  {
> diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
> index 279c7f6..31335ef 100644
> --- a/libavformat/avio_internal.h
> +++ b/libavformat/avio_internal.h
> @@ -47,4 +47,6 @@ static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
>      avio_wl32(pb, MKTAG(s[0], s[1], s[2], s[3]));
>  }
>  
> +uint64_t ff_get_v(AVIOContext *bc);
> +
>  #endif // AVFORMAT_AVIO_INTERNAL_H
> diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
> index ec2c863..05a9440 100644
> --- a/libavformat/mpc8.c
> +++ b/libavformat/mpc8.c
> @@ -22,6 +22,7 @@
>  #include "libavcodec/get_bits.h"
>  #include "libavcodec/unary.h"
>  #include "avformat.h"
> +#include "avio_internal.h"
>  
>  /// Two-byte MPC tag
>  #define MKMPCTAG(a, b) (a | (b << 8))
> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
> index 395aedf..998101a 100644
> --- a/libavformat/nutdec.c
> +++ b/libavformat/nutdec.c
> @@ -24,6 +24,7 @@
>  #include "libavutil/avstring.h"
>  #include "libavutil/bswap.h"
>  #include "libavutil/tree.h"
> +#include "avio_internal.h"
>  #include "nut.h"
>  
>  #undef NDEBUG
> -- 
> 1.7.4.1

The function isn't public, so it shouldn't be in a public header, and
the patch is OK in this regard.  Making it public is another option on
which I don't have much of an opinion.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list