diff mbox

[FFmpeg-devel,1/2] lavf/hlsenc: fix mixed declarations and code warning.

Message ID 1534763621-12036-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit c4608d225faf0c14b5decdfb73f14bc58ddcb380
Headers show

Commit Message

Jun Zhao Aug. 20, 2018, 11:13 a.m. UTC
fix the build warning for "ISO C90 forbids mixed declarations and code"

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 libavformat/hlsenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Liu Steven Aug. 20, 2018, 12:01 p.m. UTC | #1
> 在 2018年8月20日,下午7:13,Jun Zhao <mypopydev@gmail.com> 写道:
> 
> fix the build warning for "ISO C90 forbids mixed declarations and code"
> 
> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> ---
> libavformat/hlsenc.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 43e6fc8..c261016 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -2152,6 +2152,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
>     uint8_t *buffer = NULL;
>     VariantStream *vs = NULL;
>     AVDictionary *options = NULL;
> +    char *old_filename = NULL;
> 
>     for (i = 0; i < hls->nb_varstreams; i++) {
>         vs = &hls->var_streams[i];
> @@ -2218,7 +2219,6 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
> 
>     }
> 
> -    char *old_filename = NULL;
>     if (vs->packets_written && can_split && av_compare_ts(pkt->pts - vs->start_pts, st->time_base,
>                                                           end_pts, AV_TIME_BASE_Q) >= 0) {
>         int64_t new_start_pos;
> -- 
> 1.7.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



LGTM

Thanks
diff mbox

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 43e6fc8..c261016 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2152,6 +2152,7 @@  static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
     uint8_t *buffer = NULL;
     VariantStream *vs = NULL;
     AVDictionary *options = NULL;
+    char *old_filename = NULL;
 
     for (i = 0; i < hls->nb_varstreams; i++) {
         vs = &hls->var_streams[i];
@@ -2218,7 +2219,6 @@  static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
 
     }
 
-    char *old_filename = NULL;
     if (vs->packets_written && can_split && av_compare_ts(pkt->pts - vs->start_pts, st->time_base,
                                                           end_pts, AV_TIME_BASE_Q) >= 0) {
         int64_t new_start_pos;