Hi Hendrik,
The attached is another patch which uses av_reallocp to fix this issue.
/Best Regards,
lvqier - lvq...@gmail.com <mailto:lvq...@gmail.com>
/
******************************************
青春如烟,唱一首笑忘歌
On 12/5/15 11:23 PM, Lvqier wrote:
Ok, I will try av_reallocp
/Best Regards,
lvqier - lvq...@gmail.com <mailto:lvq...@gmail.com>
/
******************************************
青春如烟,唱一首笑忘歌
On 12/5/15 7:27 PM, Hendrik Leppkes wrote:
On Sat, Dec 5, 2015 at 11:02 AM, Qier LU<lvq...@gmail.com> wrote:
Hi Michael,
The attached is against git master.
The patch is probably fine now. Maybe it would be saner to actually
use av_reallocp on the filename to avoid having to allocate and free
it in different places?
- Hendrik
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 8432d0f..f230251 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -206,8 +206,7 @@ static int set_segment_filename(AVFormatContext *s)
if (seg->entry_prefix)
size += strlen(seg->entry_prefix);
- seg->cur_entry.filename = av_mallocz(size);
- if (!seg->cur_entry.filename)
+ if (av_reallocp(&seg->cur_entry.filename, size))
return AVERROR(ENOMEM);
snprintf(seg->cur_entry.filename, size, "%s%s",
seg->entry_prefix ? seg->entry_prefix : "",
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel