diff mbox series

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

Message ID 20210129052302.3124447-4-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/13] avfilter/drawutils: Remove remnants of old API | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 29, 2021, 5:22 a.m. UTC
Added in 50468f93e3940ba78836dfdac5165c20ae75327a, but never used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/rtmppkt.c | 8 --------
 libavformat/rtmppkt.h | 9 ---------
 2 files changed, 17 deletions(-)

Comments

Andreas Rheinhardt Feb. 1, 2021, 5:47 p.m. UTC | #1
Andreas Rheinhardt:
> Added in 50468f93e3940ba78836dfdac5165c20ae75327a, but never used.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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
diff mbox series

Patch

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.
  *