diff mbox series

[FFmpeg-devel] flvdec: Remove unnecessary initializations

Message ID tencent_9FEA35633E3F57179CAEE0FE5A5234E58009@qq.com
State New
Headers show
Series [FFmpeg-devel] flvdec: Remove unnecessary initializations | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Zhao Zhili July 25, 2020, 3:24 p.m. UTC
pre_tag_size is always reset by avio_rb32(). For AVFormatContext
start_time, as the document says, "NEVER set this value directly:
It is deduced from the AVStream values."
---
 libavformat/flvdec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Zhao Zhili Aug. 24, 2020, 5:15 p.m. UTC | #1
Ping for this trivial change.

> On Jul 25, 2020, at 11:24 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> pre_tag_size is always reset by avio_rb32(). For AVFormatContext
> start_time, as the document says, "NEVER set this value directly:
> It is deduced from the AVStream values."
> ---
> libavformat/flvdec.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index 08622739f3..31bdbbd5e9 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -747,7 +747,7 @@ static int flv_read_header(AVFormatContext *s)
>     int flags;
>     FLVContext *flv = s->priv_data;
>     int offset;
> -    int pre_tag_size = 0;
> +    int pre_tag_size;
> 
>     /* Actual FLV data at 0xe40000 in KUX file */
>     if(!strcmp(s->iformat->name, "kux"))
> @@ -773,7 +773,6 @@ static int flv_read_header(AVFormatContext *s)
>         av_log(s, AV_LOG_WARNING, "Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n");
>     }
> 
> -    s->start_time = 0;
>     flv->sum_flv_tag_size = 0;
>     flv->last_keyframe_stream_index = -1;
> 
> -- 
> 2.25.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 08622739f3..31bdbbd5e9 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -747,7 +747,7 @@  static int flv_read_header(AVFormatContext *s)
     int flags;
     FLVContext *flv = s->priv_data;
     int offset;
-    int pre_tag_size = 0;
+    int pre_tag_size;
 
     /* Actual FLV data at 0xe40000 in KUX file */
     if(!strcmp(s->iformat->name, "kux"))
@@ -773,7 +773,6 @@  static int flv_read_header(AVFormatContext *s)
         av_log(s, AV_LOG_WARNING, "Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n");
     }
 
-    s->start_time = 0;
     flv->sum_flv_tag_size = 0;
     flv->last_keyframe_stream_index = -1;