Re: [FFmpeg-devel] [PATCH 4/4] Delay freeing of hls stream data

2018-09-26 Thread Steven Liu
Carl Eugen Hoyos  于2018年9月26日周三 下午4:22写道:
>
>
>
> > Am 26.09.2018 um 08:00 schrieb Amit Kale :
> >
> > This patch delays freeing of hls stream data, so that it's available for 
> > bandwidth calculation.
>
> > Otherwise the previous patches would cause a segfault in this code.
>
> This means that your patchset was not split correctly: No part of your 
> patchset should introduce known bugs.
> The patchset is therefore not ok yet.
Ok, i got it.
>
> Carl Eugen
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 4/4] Delay freeing of hls stream data

2018-09-26 Thread Carl Eugen Hoyos


> Am 26.09.2018 um 08:00 schrieb Amit Kale :
> 
> This patch delays freeing of hls stream data, so that it's available for 
> bandwidth calculation.

> Otherwise the previous patches would cause a segfault in this code.

This means that your patchset was not split correctly: No part of your patchset 
should introduce known bugs.
The patchset is therefore not ok yet.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/4] Delay freeing of hls stream data

2018-09-26 Thread Amit Kale

This patch delays freeing of hls stream data, so that it's available for 
bandwidth calculation. Otherwise the previous patches would cause a segfault in 
this code.

Signed-off-by: Amit Kale
---

Index: ffmpeg/libavformat/hlsenc.c
===
--- ffmpeg.orig/libavformat/hlsenc.c
+++ ffmpeg/libavformat/hlsenc.c
@@ -2447,10 +2447,13 @@ failed:
 av_freep(>vtt_m3u8_name);
 avformat_free_context(vtt_oc);
 }
+av_free(old_filename);
 
+}

+for (i = 0; i < hls->nb_varstreams; i++) {
+vs = >var_streams[i];
 hls_free_segments(vs->segments);
 hls_free_segments(vs->old_segments);
-av_free(old_filename);
 av_freep(>m3u8_name);
 av_freep(>streams);
 av_freep(>agroup);
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel