[FFmpeg-devel] [PATCH 04/13] avformat/rtmppkt: Remove ff_amf_read_bool

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Feb 1 19:47:21 EET 2021


Andreas Rheinhardt:
> Added in 50468f93e3940ba78836dfdac5165c20ae75327a, but never used.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavformat/rtmppkt.c | 8 --------
>  libavformat/rtmppkt.h | 9 ---------
>  2 files changed, 17 deletions(-)
> 
> diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
> index 1eeae17337..0e61e83699 100644
> --- a/libavformat/rtmppkt.c
> +++ b/libavformat/rtmppkt.c
> @@ -84,14 +84,6 @@ void ff_amf_write_object_end(uint8_t **dst)
>      bytestream_put_be24(dst, AMF_DATA_TYPE_OBJECT_END);
>  }
>  
> -int ff_amf_read_bool(GetByteContext *bc, int *val)
> -{
> -    if (bytestream2_get_byte(bc) != AMF_DATA_TYPE_BOOL)
> -        return AVERROR_INVALIDDATA;
> -    *val = bytestream2_get_byte(bc);
> -    return 0;
> -}
> -
>  int ff_amf_read_number(GetByteContext *bc, double *val)
>  {
>      uint64_t read;
> diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h
> index eb68f1d3e1..a15d2a5773 100644
> --- a/libavformat/rtmppkt.h
> +++ b/libavformat/rtmppkt.h
> @@ -259,15 +259,6 @@ void ff_amf_write_field_name(uint8_t **dst, const char *str);
>   */
>  void ff_amf_write_object_end(uint8_t **dst);
>  
> -/**
> - * Read AMF boolean value.
> - *
> - *@param[in,out] gbc GetByteContext initialized with AMF-formatted data
> - *@param[out]    val 0 or 1
> - *@return 0 on success or an AVERROR code on failure
> -*/
> -int ff_amf_read_bool(GetByteContext *gbc, int *val);
> -
>  /**
>   * Read AMF number value.
>   *
> Will apply the rest of this patchset tomorrow unless there are objections.

- Andreas


More information about the ffmpeg-devel mailing list