[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 64b51f8 web/download: add FFmpeg 2.5.3
The branch, master has been updated via 64b51f85e62c6e1948f521ed267a4df1671c (commit) from b3b45be3eb355827d0beaf328bd34bf18c7c9b04 (commit) - Log - commit 64b51f85e62c6e1948f521ed267a4df1671c Author: Michael Niedermayer AuthorDate: Sat Jan 10 05:31:36 2015 +0100 Commit: Michael Niedermayer CommitDate: Sat Jan 10 05:31:36 2015 +0100 web/download: add FFmpeg 2.5.3 diff --git a/src/download b/src/download index 538a0d1..e8fa9d7 100644 --- a/src/download +++ b/src/download @@ -1,10 +1,10 @@ -http://ffmpeg.org/releases/ffmpeg-2.5.2.tar.bz2"; class="btn btn-success"> +http://ffmpeg.org/releases/ffmpeg-2.5.3.tar.bz2"; class="btn btn-success"> Download - ffmpeg-2.5.2.tar.bz2 + ffmpeg-2.5.3.tar.bz2 More releases @@ -276,10 +276,10 @@ -FFmpeg 2.5.2 "Bohr" +FFmpeg 2.5.3 "Bohr" -2.5.2 was released on 2014-12-23. It is the latest stable FFmpeg release +2.5.3 was released on 2015-01-10. It is the latest stable FFmpeg release from the 2.5 release branch, which was cut from master on 2014-12-15. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2014-12-03, libav 11 as of 2014-12-03. @@ -299,15 +299,15 @@ libpostproc53. 3.100 - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.5.2";>Changelog + http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.5.3";>Changelog http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=release/2.5";>Release Notes --- Summary of changes: src/download | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n2.5.3 : FFmpeg 2.5.3 release
[ffmpeg] [branch: refs/tags/n2.5.3] Tag:c47dd7950774fc74c8ec9772812e0394f9173971 > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=c47dd7950774fc74c8ec9772812e0394f9173971 Tagger: Michael Niedermayer Date: Sat Jan 10 05:21:26 2015 +0100 FFmpeg 2.5.3 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/examples: fix lib math dep for decoding_encoding
ffmpeg | branch: release/2.5 | Andreas Cadhalpun | Fri Jan 9 17:50:27 2015 +0100| [07d508e4f55f6045b83df3346448b149faab5d7d] | committer: Michael Niedermayer doc/examples: fix lib math dep for decoding_encoding It uses at least sin(). Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit f97f2a3527eac2cf60ba86206d1bae9a970a7e71) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07d508e4f55f6045b83df3346448b149faab5d7d --- doc/examples/Makefile |1 + 1 file changed, 1 insertion(+) diff --git a/doc/examples/Makefile b/doc/examples/Makefile index 07251fe..9f03f04 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -29,6 +29,7 @@ OBJS=$(addsuffix .o,$(EXAMPLES)) # the following examples make explicit use of the math library avcodec: LDLIBS += -lm +decoding_encoding: LDLIBS += -lm muxing:LDLIBS += -lm resampling_audio: LDLIBS += -lm ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1"
ffmpeg | branch: release/2.5 | Michael Niedermayer | Sat Jan 10 03:43:54 2015 +0100| [b089b582500ffd3c6370e1cd8d91fe7a7f21cc17] | committer: Michael Niedermayer avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1" Signed-off-by: Michael Niedermayer (cherry picked from commit 7824dc5150c0ea44ffa7cd4d57803f9a9697e7d7) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b089b582500ffd3c6370e1cd8d91fe7a7f21cc17 --- libavformat/movenc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 10e883c..ef25041 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2499,7 +2499,8 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) } version = max_track_len < UINT32_MAX ? 0 : 1; -(version == 1) ? avio_wb32(pb, 120) : avio_wb32(pb, 108); /* size */ +avio_wb32(pb, version == 1 ? 120 : 108); /* size */ + ffio_wfourcc(pb, "mvhd"); avio_w8(pb, version); avio_wb24(pb, 0); /* flags */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/examples: fix lib math dep for decoding_encoding
ffmpeg | branch: master | Andreas Cadhalpun | Fri Jan 9 17:50:27 2015 +0100| [f97f2a3527eac2cf60ba86206d1bae9a970a7e71] | committer: Michael Niedermayer doc/examples: fix lib math dep for decoding_encoding It uses at least sin(). Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f97f2a3527eac2cf60ba86206d1bae9a970a7e71 --- doc/examples/Makefile |1 + 1 file changed, 1 insertion(+) diff --git a/doc/examples/Makefile b/doc/examples/Makefile index 07251fe..9f03f04 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -29,6 +29,7 @@ OBJS=$(addsuffix .o,$(EXAMPLES)) # the following examples make explicit use of the math library avcodec: LDLIBS += -lm +decoding_encoding: LDLIBS += -lm muxing:LDLIBS += -lm resampling_audio: LDLIBS += -lm ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/movenc: move variable to a more local block
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 10 04:50:50 2015 +0100| [6f838dee3cf86bf8b7196ef25bcce1cb4736a0c4] | committer: Michael Niedermayer avformat/movenc: move variable to a more local block Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f838dee3cf86bf8b7196ef25bcce1cb4736a0c4 --- libavformat/movenc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2b39a42..bc2d9ef 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2507,12 +2507,12 @@ static int mov_write_mvex_tag(AVIOContext *pb, MOVMuxContext *mov) static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) { int max_track_id = 1, i; -int64_t max_track_len_temp, max_track_len = 0; +int64_t max_track_len = 0; int version; for (i = 0; i < mov->nb_streams; i++) { if (mov->tracks[i].entry > 0 && mov->tracks[i].timescale) { -max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration, +int64_t max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration, MOV_TIMESCALE, mov->tracks[i].timescale, AV_ROUND_UP); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: enable vsx together with altivec for ppc64el
ffmpeg | branch: master | Andreas Cadhalpun | Fri Jan 9 17:32:09 2015 +0100| [6108485cf70f04dbf4708bd84ce749da871fa3f1] | committer: Michael Niedermayer configure: enable vsx together with altivec for ppc64el The altivec optimizations on little endian ppc64 don't work without vsx. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6108485cf70f04dbf4708bd84ce749da871fa3f1 --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 6de4bcc..94f9432 100755 --- a/configure +++ b/configure @@ -4432,7 +4432,7 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; EOF od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian -if [ "$cpu" = "power7" ] || [ "$cpu" = "power8" ] ;then +if [ "$cpu" = "power7" ] || [ "$cpu" = "power8" ] || enabled ppc64; then if ! enabled bigendian && enabled altivec ;then enable vsx fi ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1"
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 10 03:43:54 2015 +0100| [7824dc5150c0ea44ffa7cd4d57803f9a9697e7d7] | committer: Michael Niedermayer avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7824dc5150c0ea44ffa7cd4d57803f9a9697e7d7 --- libavformat/movenc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0143e9b..2b39a42 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2530,7 +2530,8 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) } version = max_track_len < UINT32_MAX ? 0 : 1; -(version == 1) ? avio_wb32(pb, 120) : avio_wb32(pb, 108); /* size */ +avio_wb32(pb, version == 1 ? 120 : 108); /* size */ + ffio_wfourcc(pb, "mvhd"); avio_w8(pb, version); avio_wb24(pb, 0); /* flags */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/internal: add fixme to ff_norm_qscale() to document obvious scaling issue
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 10 02:27:49 2015 +0100| [bdb136d302182229f4c383f057d2c9ac565ae39d] | committer: Michael Niedermayer avfilter/internal: add fixme to ff_norm_qscale() to document obvious scaling issue Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bdb136d302182229f4c383f057d2c9ac565ae39d --- libavfilter/internal.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/internal.h b/libavfilter/internal.h index d3a859c..a7ec751 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -377,6 +377,8 @@ void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter /** * Normalize the qscale factor + * FIXME the H264 qscale is a log based scale, mpeg1/2 is not, the code below + * cannot be optimal */ static inline int ff_norm_qscale(int qscale, int type) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter: Factorize the use of norm_qscale in pp7
ffmpeg | branch: master | Arwa Arif | Sat Jan 10 02:01:42 2015 +0530| [4df01d5d44cf65c141e5569c9cb6c57a77c70e39] | committer: Michael Niedermayer avfilter: Factorize the use of norm_qscale in pp7 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4df01d5d44cf65c141e5569c9cb6c57a77c70e39 --- libavfilter/internal.h | 15 +++ libavfilter/vf_pp7.c | 14 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 308b115..d3a859c 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -31,6 +31,7 @@ #include "thread.h" #include "version.h" #include "video.h" +#include "libavcodec/avcodec.h" #define POOL_SIZE 32 typedef struct AVFilterPool { @@ -374,4 +375,18 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name); */ void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter); +/** + * Normalize the qscale factor + */ +static inline int ff_norm_qscale(int qscale, int type) +{ +switch (type) { +case FF_QSCALE_TYPE_MPEG1: return qscale; +case FF_QSCALE_TYPE_MPEG2: return qscale >> 1; +case FF_QSCALE_TYPE_H264: return qscale >> 2; +case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2; +} +return qscale; +} + #endif /* AVFILTER_INTERNAL_H */ diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index 2f071f2..bb590a2 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -33,7 +33,6 @@ #include "libavutil/pixdesc.h" #include "internal.h" #include "vf_pp7.h" -#include "libavcodec/avcodec.h" enum mode { MODE_HARD, @@ -87,17 +86,6 @@ static const int thres[16] = { N / (SN2 * SN0), N / (SN2 * SN2), N / (SN2 * SN0), N / (SN2 * SN2), }; -static inline int norm_qscale(int qscale, int type) -{ -switch (type) { -case FF_QSCALE_TYPE_MPEG1: return qscale; -case FF_QSCALE_TYPE_MPEG2: return qscale >> 1; -case FF_QSCALE_TYPE_H264: return qscale >> 2; -case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2; -} -return qscale; -} - static void init_thres2(PP7Context *p) { int qp, i; @@ -259,7 +247,7 @@ static void filter(PP7Context *p, uint8_t *dst, uint8_t *src, qp = p->qp; else { qp = qp_store[ (FFMIN(x, width - 1) >> qps) + (FFMIN(y, height - 1) >> qps) * qp_stride]; -qp = norm_qscale(qp, p->qscale_type); +qp = ff_norm_qscale(qp, p->qscale_type); } for (; x < end; x++) { const int index = x + y * stride + (8 - 3) * (1 + stride) + 8; //FIXME silly offset ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rm: fix memory leak on init failure
ffmpeg | branch: master | wm4 | Fri Jan 9 21:24:54 2015 +0100| [aab74a38b8ba910a383dd82953061d5c42772ae9] | committer: Michael Niedermayer rm: fix memory leak on init failure AVInputFormat.read_close is not called if AVInputFormat.read_header fails, so this needs to be handled separately. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aab74a38b8ba910a383dd82953061d5c42772ae9 --- libavformat/rmdec.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 299c742..d61e327 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -65,6 +65,8 @@ typedef struct { int audio_pkt_cnt; ///< Output packet counter } RMDemuxContext; +static int rm_read_close(AVFormatContext *s); + static inline void get_strl(AVIOContext *pb, char *buf, int buf_size, int len) { int i; @@ -505,6 +507,7 @@ static int rm_read_header(AVFormatContext *s) unsigned int data_off = 0, indx_off = 0; char buf[128], mime[128]; int flags = 0; +int ret = -1; tag = avio_rl32(pb); if (tag == MKTAG('.', 'r', 'a', 0xfd)) { @@ -519,7 +522,7 @@ static int rm_read_header(AVFormatContext *s) for(;;) { if (avio_feof(pb)) -return -1; +goto fail; tag = avio_rl32(pb); tag_size = avio_rb32(pb); avio_rb16(pb); @@ -531,7 +534,7 @@ static int rm_read_header(AVFormatContext *s) tag, tag_size); if (tag_size < 10 && tag != MKTAG('D', 'A', 'T', 'A')) -return -1; +goto fail; switch(tag) { case MKTAG('P', 'R', 'O', 'P'): /* file header */ @@ -553,8 +556,10 @@ static int rm_read_header(AVFormatContext *s) break; case MKTAG('M', 'D', 'P', 'R'): st = avformat_new_stream(s, NULL); -if (!st) -return AVERROR(ENOMEM); +if (!st) { +ret = AVERROR(ENOMEM); +goto fail; +} st->id = avio_rb16(pb); avio_rb32(pb); /* max bit rate */ st->codec->bit_rate = avio_rb32(pb); /* bit rate */ @@ -573,7 +578,7 @@ static int rm_read_header(AVFormatContext *s) st->priv_data = ff_rm_alloc_rmstream(); if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data, avio_rb32(pb), mime) < 0) -return -1; +goto fail; break; case MKTAG('D', 'A', 'T', 'A'): goto header_end; @@ -598,6 +603,10 @@ static int rm_read_header(AVFormatContext *s) } return 0; + +fail: +rm_read_close(s); +return ret; } static int get_num(AVIOContext *pb, int *len) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver: Use av_malloc_array()
ffmpeg | branch: master | Michael Niedermayer | Tue Jan 6 17:55:50 2015 +0100| [11d8fa5e9d695fc3f9f553dc313edd9d4e45ed18] | committer: Michael Niedermayer ffserver: Use av_malloc_array() Reviewed-by: "Reynaldo H. Verdejo Pinochet" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11d8fa5e9d695fc3f9f553dc313edd9d4e45ed18 --- ffserver.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ffserver.c b/ffserver.c index 1f20d19..0b69196 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2810,11 +2810,9 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer, snprintf(avc->filename, 1024, "rtp://0.0.0.0"); } -if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) || -!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams +if (!(avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams goto sdp_done; -if (avc->nb_streams >= INT_MAX/sizeof(*avs) || -!(avs = av_malloc(avc->nb_streams * sizeof(*avs +if (!(avs = av_malloc_array(avc->nb_streams, sizeof(*avs goto sdp_done; for(i = 0; i < stream->nb_streams; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] x86/vf_pp7: port dctB_mmx to yasm
ffmpeg | branch: master | James Almer | Fri Jan 9 16:51:13 2015 -0300| [da02ee127a21d029763011d99f7eb4e66d3f49b3] | committer: James Almer x86/vf_pp7: port dctB_mmx to yasm Reviewed-by: Michael Niedermayer Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da02ee127a21d029763011d99f7eb4e66d3f49b3 --- libavfilter/x86/Makefile |3 +- libavfilter/x86/vf_pp7.asm| 57 ++ libavfilter/x86/vf_pp7.c | 68 - libavfilter/x86/vf_pp7_init.c | 34 + 4 files changed, 93 insertions(+), 69 deletions(-) diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile index a472a72..27de5a5 100644 --- a/libavfilter/x86/Makefile +++ b/libavfilter/x86/Makefile @@ -4,7 +4,7 @@ OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d_init.o OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idet_init.o OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_interlace_init.o OBJS-$(CONFIG_NOISE_FILTER) += x86/vf_noise.o -OBJS-$(CONFIG_PP7_FILTER)+= x86/vf_pp7.o +OBJS-$(CONFIG_PP7_FILTER)+= x86/vf_pp7_init.o OBJS-$(CONFIG_PULLUP_FILTER) += x86/vf_pullup_init.o OBJS-$(CONFIG_SPP_FILTER)+= x86/vf_spp.o OBJS-$(CONFIG_TINTERLACE_FILTER) += x86/vf_tinterlace_init.o @@ -16,6 +16,7 @@ YASM-OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun.o YASM-OBJS-$(CONFIG_HQDN3D_FILTER)+= x86/vf_hqdn3d.o YASM-OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idet.o YASM-OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_interlace.o +YASM-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7.o YASM-OBJS-$(CONFIG_PULLUP_FILTER)+= x86/vf_pullup.o YASM-OBJS-$(CONFIG_TINTERLACE_FILTER)+= x86/vf_interlace.o YASM-OBJS-$(CONFIG_VOLUME_FILTER)+= x86/af_volume.o diff --git a/libavfilter/x86/vf_pp7.asm b/libavfilter/x86/vf_pp7.asm new file mode 100644 index 000..7b3e5cf --- /dev/null +++ b/libavfilter/x86/vf_pp7.asm @@ -0,0 +1,57 @@ +;* +;* x86-optimized functions for pp7 filter +;* +;* Copyright (c) 2005 Michael Niedermayer +;* +;* This file is part of FFmpeg. +;* +;* FFmpeg is free software; you can redistribute it and/or modify +;* it under the terms of the GNU General Public License as published by +;* the Free Software Foundation; either version 2 of the License, or +;* (at your option) any later version. +;* +;* FFmpeg is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;* GNU General Public License for more details. +;* +;* You should have received a copy of the GNU General Public License along +;* with FFmpeg; if not, write to the Free Software Foundation, Inc., +;* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +;** + +%include "libavutil/x86/x86util.asm" + +SECTION .text + +INIT_MMX mmx + +;void ff_pp7_dctB_mmx(int16_t *dst, int16_t *src) +cglobal pp7_dctB, 2, 2, 0, dst, src +movq m0, [srcq] +movq m1, [srcq+mmsize*1] +paddw m0, [srcq+mmsize*6] +paddw m1, [srcq+mmsize*5] +movq m2, [srcq+mmsize*2] +movq m3, [srcq+mmsize*3] +paddw m2, [srcq+mmsize*4] +paddw m3, m3 +movq m4, m3 +psubw m3, m0 +paddw m4, m0 +movq m0, m2 +psubw m2, m1 +paddw m0, m1 +movq m1, m4 +psubw m4, m0 +paddw m1, m0 +movq m0, m3 +psubw m3, m2 +psubw m3, m2 +paddw m2, m0 +paddw m2, m0 +movq [dstq], m1 +movq [dstq+mmsize*2], m4 +movq [dstq+mmsize*1], m2 +movq [dstq+mmsize*3], m3 +RET diff --git a/libavfilter/x86/vf_pp7.c b/libavfilter/x86/vf_pp7.c deleted file mode 100644 index 64c8618..000 --- a/libavfilter/x86/vf_pp7.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2005 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with FFmpeg; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "libavutil/attributes.h" -#include "libavutil/cpu.h" -#i
[FFmpeg-cvslog] Merge commit '51da7d02748cc54b7d009115e76efa940b99a8ef'
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 21:25:26 2015 +0100| [f95cd5a235bae89510cfe4320f2189c9cfbcc457] | committer: Michael Niedermayer Merge commit '51da7d02748cc54b7d009115e76efa940b99a8ef' * commit '51da7d02748cc54b7d009115e76efa940b99a8ef': matroskaenc: refuse to write AAC without valid extradata Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f95cd5a235bae89510cfe4320f2189c9cfbcc457 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] matroskaenc: refuse to write AAC without valid extradata
ffmpeg | branch: master | Anton Khirnov | Thu Jan 1 18:22:46 2015 +0100| [51da7d02748cc54b7d009115e76efa940b99a8ef] | committer: Anton Khirnov matroskaenc: refuse to write AAC without valid extradata > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51da7d02748cc54b7d009115e76efa940b99a8ef --- libavformat/matroskaenc.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 1d55b66..3427c59 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -520,20 +520,21 @@ static int put_flac_codecpriv(AVFormatContext *s, return 0; } -static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, - int *sample_rate, int *output_sample_rate) +static int get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, +int *sample_rate, int *output_sample_rate) { MPEG4AudioConfig mp4ac; if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size * 8, 1) < 0) { -av_log(s, AV_LOG_WARNING, +av_log(s, AV_LOG_ERROR, "Error parsing AAC extradata, unable to determine samplerate.\n"); -return; +return AVERROR(EINVAL); } *sample_rate= mp4ac.sample_rate; *output_sample_rate = mp4ac.ext_sample_rate; +return 0; } static int mkv_write_native_codecprivate(AVFormatContext *s, @@ -748,8 +749,11 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, if (!bit_depth) bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3; -if (codec->codec_id == AV_CODEC_ID_AAC) -get_aac_sample_rates(s, codec, &sample_rate, &output_sample_rate); +if (codec->codec_id == AV_CODEC_ID_AAC) { +ret = get_aac_sample_rates(s, codec, &sample_rate, &output_sample_rate); +if (ret < 0) +return ret; +} track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0); put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER , i + 1); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c'
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 20:51:17 2015 +0100| [1cf0f27985965c28049b7a8481c859867dad3948] | committer: Michael Niedermayer Merge commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c' * commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c': mpeg4audio: check the init_get_bits() return value Conflicts: libavcodec/mpeg4audio.c See: deefdf9788467edd262b9c29a4f6e33d2ae84b8c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cf0f27985965c28049b7a8481c859867dad3948 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpeg4audio: check the init_get_bits() return value
ffmpeg | branch: master | Anton Khirnov | Thu Jan 1 17:56:56 2015 +0100| [7e4e010b80e76862e83afbd41c25d50e72f0b44c] | committer: Anton Khirnov mpeg4audio: check the init_get_bits() return value Fixes possible invalid reads. CC:libav-sta...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e4e010b80e76862e83afbd41c25d50e72f0b44c --- libavcodec/mpeg4audio.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 0fb9b96..2363cb6 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -80,9 +80,11 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int bit_size, int sync_extension) { GetBitContext gb; -int specific_config_bitindex; +int specific_config_bitindex, ret; -init_get_bits(&gb, buf, bit_size); +ret = init_get_bits(&gb, buf, bit_size); +if (ret < 0) +return ret; c->object_type = get_object_type(&gb); c->sample_rate = get_sample_rate(&gb, &c->sampling_index); c->chan_config = get_bits(&gb, 4); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass_split: use *alloc_array()
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 20:20:00 2015 +0100| [aefb99f2c0554a10f695eed569f0b94d7e462a34] | committer: Michael Niedermayer avcodec/ass_split: use *alloc_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aefb99f2c0554a10f695eed569f0b94d7e462a34 --- libavcodec/ass_split.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index cc4f961..2458cb9 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -207,7 +207,7 @@ static uint8_t *realloc_section_array(ASSSplitContext *ctx) const ASSSection *section = &ass_sections[ctx->current_section]; int *count = (int *)((uint8_t *)&ctx->ass + section->offset_count); void **section_ptr = (void **)((uint8_t *)&ctx->ass + section->offset); -uint8_t *tmp = av_realloc(*section_ptr, (*count+1)*section->size); +uint8_t *tmp = av_realloc_array(*section_ptr, (*count+1), section->size); if (!tmp) return NULL; *section_ptr = tmp; @@ -232,7 +232,7 @@ static inline const char *skip_space(const char *buf) static int *get_default_field_orders(const ASSSection *section) { int i; -int *order = av_malloc(FF_ARRAY_ELEMS(section->fields) * sizeof(*order)); +int *order = av_malloc_array(FF_ARRAY_ELEMS(section->fields), sizeof(*order)); if (!order) return NULL; @@ -265,7 +265,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) while (!is_eol(*buf)) { buf = skip_space(buf); len = strcspn(buf, ", \r\n"); -if (!(tmp = av_realloc(order, (*number + 1) * sizeof(*order +if (!(tmp = av_realloc_array(order, (*number + 1), sizeof(*order return NULL; order = tmp; order[*number] = -1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass: Use av_realloc_array()
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 18:57:37 2015 +0100| [727cb2bda9df0f5f66d19846d529da73751737c3] | committer: Michael Niedermayer avcodec/ass: Use av_realloc_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=727cb2bda9df0f5f66d19846d529da73751737c3 --- libavcodec/ass.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ass.c b/libavcodec/ass.c index 3a37cee..ea247f8 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -154,7 +154,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, if (!av_bprint_is_complete(&buf)) goto errnomem; -rects = av_realloc(sub->rects, (sub->num_rects+1) * sizeof(*sub->rects)); +rects = av_realloc_array(sub->rects, (sub->num_rects+1), sizeof(*sub->rects)); if (!rects) goto errnomem; sub->rects = rects; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Update for 2.5.3
ffmpeg | branch: release/2.5 | Michael Niedermayer | Fri Jan 9 17:37:34 2015 +0100| [a7dd37169c9ac74cd99a993ff04679b13fbd] | committer: Michael Niedermayer Update for 2.5.3 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7dd37169c9ac74cd99a993ff04679b13fbd --- Changelog| 17 + RELEASE |2 +- doc/Doxyfile |2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 4f5651b..60eaea0 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,23 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.5.3: +- vp9: fix parser return values in error case +- ffmpeg: Clear error message array at init. +- avcodec/dvdsubdec: fix accessing dangling pointers +- avcodec/dvdsubdec: error on bitmaps with size 0 +- cmdutils: Use 64bit for file size/offset related variable in cmdutils_read_file() +- mov: Fix negative size calculation in mov_read_default(). +- avformat/mov: fix integer overflow in mov_read_udta_string() +- mov: Fix overflow and error handling in read_tfra(). +- mov: Avoid overflow with mov_metadata_raw() +- avcodec/dvdsubdec: fix out of bounds accesses +- avfilter/vf_sab: fix filtering tiny images +- avformat/flvdec: Increase string array size +- avformat/flvdec: do not inject dts=0 metadata packets which failed to be parsed into a new data stream +- avformat/cdxl: Fix integer overflow of image_size +- libavformat: Build hevc.o when building the RTP muxer + version 2.5.2: - avcodec/indeo3: ensure offsets are non negative - avcodec/h264: Check *log2_weight_denom diff --git a/RELEASE b/RELEASE index f225a78..aedc15b 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.5.2 +2.5.3 diff --git a/doc/Doxyfile b/doc/Doxyfile index 1cde20b..4138903 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.5.2 +PROJECT_NUMBER = 2.5.3 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi: port mp=pp7 to libavfilter
ffmpeg | branch: master | Arwa Arif | Thu Dec 25 10:08:24 2014 +0530| [a299cd5ab3567bdf855dc84cdbed4d22ea5fcbb6] | committer: Stefano Sabatini lavfi: port mp=pp7 to libavfilter The only difference with mp=pp7 is that default mode is "medium", as stated in the MPlayer docs, rather than "hard". Signed-off-by: Stefano Sabatini > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a299cd5ab3567bdf855dc84cdbed4d22ea5fcbb6 --- LICENSE.md |1 + configure|1 + doc/filters.texi | 26 +++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/version.h|2 +- libavfilter/vf_pp7.c | 419 ++ libavfilter/vf_pp7.h | 46 + libavfilter/x86/Makefile |1 + libavfilter/x86/vf_pp7.c | 68 10 files changed, 565 insertions(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 5659973..e612c22 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -43,6 +43,7 @@ Specifically, the GPL parts of FFmpeg are: - vf_perspective.c - vf_phase.c - vf_pp.c +- vf_pp7.c - vf_pullup.c - vf_sab.c - vf_smartblur.c diff --git a/configure b/configure index 51999de..6de4bcc 100755 --- a/configure +++ b/configure @@ -2600,6 +2600,7 @@ mpdecimate_filter_select="pixelutils" mptestsrc_filter_deps="gpl" negate_filter_deps="lut_filter" perspective_filter_deps="gpl" +pp7_filter_deps="gpl" ocv_filter_deps="libopencv" owdenoise_filter_deps="gpl" pan_filter_deps="swresample" diff --git a/doc/filters.texi b/doc/filters.texi index f14f6a9..0fa60c6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -7193,6 +7193,32 @@ pp=hb|y/vb|a @end example @end itemize +@section pp7 +Apply Postprocessing filter 7. It is variant of the @ref{spp} filter, +similar to spp = 6 with 7 point DCT, where only the center sample is +used after IDCT. + +The filter accepts the following options: + +@table @option +@item qp +Force a constant quantization parameter. It accepts an integer in range +0 to 63. If not set, the filter will use the QP from the video stream +(if available). + +@item mode +Set thresholding mode. Available modes are: + +@table @samp +@item hard +Set hard thresholding. +@item soft +Set soft thresholding (better de-ringing effect, but likely blurrier). +@item medium +Set medium thresholding (good results, default). +@end table +@end table + @section psnr Obtain the average, maximum and minimum PSNR (Peak Signal to Noise diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 0ead6c5..3f8016a 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -164,6 +164,7 @@ OBJS-$(CONFIG_PERSPECTIVE_FILTER)+= vf_perspective.o OBJS-$(CONFIG_PHASE_FILTER) += vf_phase.o OBJS-$(CONFIG_PIXDESCTEST_FILTER)+= vf_pixdesctest.o OBJS-$(CONFIG_PP_FILTER) += vf_pp.o +OBJS-$(CONFIG_PP7_FILTER)+= vf_pp7.o OBJS-$(CONFIG_PSNR_FILTER) += vf_psnr.o dualinput.o framesync.o OBJS-$(CONFIG_PULLUP_FILTER) += vf_pullup.o OBJS-$(CONFIG_REMOVELOGO_FILTER) += bbox.o lswsutils.o lavfutils.o vf_removelogo.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 6543629..a330eb9 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -179,6 +179,7 @@ void avfilter_register_all(void) REGISTER_FILTER(PHASE, phase, vf); REGISTER_FILTER(PIXDESCTEST,pixdesctest,vf); REGISTER_FILTER(PP, pp, vf); +REGISTER_FILTER(PP7,pp7,vf); REGISTER_FILTER(PSNR, psnr, vf); REGISTER_FILTER(PULLUP, pullup, vf); REGISTER_FILTER(REMOVELOGO, removelogo, vf); diff --git a/libavfilter/version.h b/libavfilter/version.h index 50967f4..b931aa9 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 5 -#define LIBAVFILTER_VERSION_MINOR 6 +#define LIBAVFILTER_VERSION_MINOR 7 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c new file mode 100644 index 000..2f071f2 --- /dev/null +++ b/libavfilter/vf_pp7.c @@ -0,0 +1,419 @@ +/* + * Copyright (c) 2005 Michael Niedermayer + * Copyright (c) 2014 Arwa Arif + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
[FFmpeg-cvslog] vp9: fix parser return values in error case
ffmpeg | branch: release/2.5 | wm4 | Fri Jan 9 02:13:36 2015 +0100| [3032291b3a88fb25e3cf0d09a61792768e84a578] | committer: Michael Niedermayer vp9: fix parser return values in error case The parser must always set the out_size and out_data pointers. The API seems to require it, and the common code in parser.c also relies on it. Signed-off-by: Michael Niedermayer (cherry picked from commit b88e80589bd11ef935a5e9dab53d4edb00de16e4) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3032291b3a88fb25e3cf0d09a61792768e84a578 --- libavcodec/vp9_parser.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index af033c2..922f36f 100644 --- a/libavcodec/vp9_parser.c +++ b/libavcodec/vp9_parser.c @@ -77,6 +77,8 @@ static int parse(AVCodecParserContext *ctx, idx += a; \ if (sz > size) { \ s->n_frames = 0; \ +*out_size = 0; \ +*out_data = data; \ av_log(avctx, AV_LOG_ERROR, \ "Superframe packet size too big: %u > %d\n", \ sz, size); \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: Clear error message array at init.
ffmpeg | branch: release/2.5 | Michael Niedermayer | Thu Jan 8 23:02:30 2015 +0100| [f9bbc26e691fb0adbef03e8fd1ea556287fe2af7] | committer: Michael Niedermayer ffmpeg: Clear error message array at init. This avoids printing uninitialized bytes if no error message is set Signed-off-by: Michael Niedermayer (cherry picked from commit 6d1a2efb8ac399a003ea7d3b6f8c641d192567ee) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9bbc26e691fb0adbef03e8fd1ea556287fe2af7 --- ffmpeg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index eef774b..2be1004 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2521,7 +2521,7 @@ static int transcode_init(void) AVFormatContext *oc; OutputStream *ost; InputStream *ist; -char error[1024]; +char error[1024] = {0}; int want_sdp = 1; for (i = 0; i < nb_filtergraphs; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/flvdec: Increase string array size
ffmpeg | branch: release/2.5 | Michael Niedermayer | Thu Jan 1 18:15:16 2015 +0100| [5bb31e856d7c4f0aa3cefbe0d199be4f1cc0c4fb] | committer: Michael Niedermayer avformat/flvdec: Increase string array size Fixes parsing httphostheader of Scarlatti\,\ Pieter-Jan\ Belder\ -\ Sonata\ K113\ in\ A\ major\ -\ Alle.flv Signed-off-by: Michael Niedermayer (cherry picked from commit eb767a276bfdb9a0493bdb0b38203638230b7ccb) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bb31e856d7c4f0aa3cefbe0d199be4f1cc0c4fb --- libavformat/flvdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 568a654..da277a1 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -390,7 +390,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, FLVContext *flv = s->priv_data; AVIOContext *ioc; AMFDataType amf_type; -char str_val[256]; +char str_val[1024]; double num_val; num_val = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Fix mixed declaration and statement warning
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 19:51:38 2015 +0100| [d0041dc8c4d79cf269650d0790956e0eeeb3dc31] | committer: Michael Niedermayer avformat/mov: Fix mixed declaration and statement warning Signed-off-by: Michael Niedermayer (cherry picked from commit db27f50e0658e91758e8a17fdcf390e6bc93c1d2) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0041dc8c4d79cf269650d0790956e0eeeb3dc31 --- libavformat/mov.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 2313674..7455e3b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -210,10 +210,11 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) static int mov_metadata_raw(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { +char *value; // Check for overflow. if (len >= INT_MAX) return AVERROR(EINVAL); -char *value = av_malloc(len + 1); +value = av_malloc(len + 1); if (!value) return AVERROR(ENOMEM); avio_read(pb, value, len); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/2.5 | James Almer | Sat Jan 3 01:40:02 2015 -0300| [b834dc14da082473e532da2baff1b28ce85f2b49] | committer: Michael Niedermayer configure: bump year Happy new year! (cherry picked from commit b8db25a3338b67186837c49580fe538d63dd73c7) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b834dc14da082473e532da2baff1b28ce85f2b49 --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index d25f155..9190c4e 100755 --- a/configure +++ b/configure @@ -5678,7 +5678,7 @@ cat > $TMPH
[FFmpeg-cvslog] avcodec/dvdsubdec: fix accessing dangling pointers
ffmpeg | branch: release/2.5 | wm4 | Thu Jan 8 17:19:17 2015 +0100| [b895e29941f06ec7c96a8a0a5036cc11274fdb51] | committer: Michael Niedermayer avcodec/dvdsubdec: fix accessing dangling pointers dvdsub_decode() can call append_to_cached_buf() 2 times, the second time with ctx->buf as argument. If the second append_to_cached_buf() reallocs ctx->buf, the argument will be a pointer to the previous, freed block. This can cause invalid reads at least with some fuzzed files - and possibly with valid files. Since packets can apparently not be larger than 64K (even if packets are combined), just use a fixed size buffer. It will be allocated as part of the DVDSubContext, and although some memory is "wasted", it's relatively minimal by modern standards and should be acceptable. Signed-off-by: Michael Niedermayer (cherry picked from commit 816577716bc6170bccfea3b9e865618b69a4b426) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b895e29941f06ec7c96a8a0a5036cc11274fdb51 --- libavcodec/dvdsubdec.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 08e4195..222c71b 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -39,7 +39,7 @@ typedef struct DVDSubContext int has_palette; uint8_t colormap[4]; uint8_t alpha[256]; - uint8_t *buf; + uint8_t buf[0x1]; int buf_size; int forced_subs_only; #ifdef DEBUG @@ -509,15 +509,11 @@ static int append_to_cached_buf(AVCodecContext *avctx, { DVDSubContext *ctx = avctx->priv_data; -if (ctx->buf_size > 0x - buf_size) { +if (ctx->buf_size >= sizeof(ctx->buf) - buf_size) { av_log(avctx, AV_LOG_WARNING, "Attempt to reconstruct " "too large SPU packets aborted.\n"); -av_freep(&ctx->buf); return AVERROR_INVALIDDATA; } -ctx->buf = av_realloc(ctx->buf, ctx->buf_size + buf_size); -if (!ctx->buf) -return AVERROR(ENOMEM); memcpy(ctx->buf + ctx->buf_size, buf, buf_size); ctx->buf_size += buf_size; return 0; @@ -533,7 +529,7 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub = data; int is_menu; -if (ctx->buf) { +if (ctx->buf_size) { int ret = append_to_cached_buf(avctx, buf, buf_size); if (ret < 0) { *data_size = 0; @@ -575,7 +571,6 @@ static int dvdsub_decode(AVCodecContext *avctx, } #endif -av_freep(&ctx->buf); ctx->buf_size = 0; *data_size = 1; return buf_size; @@ -719,7 +714,6 @@ static av_cold int dvdsub_init(AVCodecContext *avctx) static av_cold int dvdsub_close(AVCodecContext *avctx) { DVDSubContext *ctx = avctx->priv_data; -av_freep(&ctx->buf); ctx->buf_size = 0; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dvdsubdec: error on bitmaps with size 0
ffmpeg | branch: release/2.5 | wm4 | Wed Jan 7 23:57:50 2015 +0100| [3d71024f8ab35721f674f116ac84d734a1c6d517] | committer: Michael Niedermayer avcodec/dvdsubdec: error on bitmaps with size 0 Attemtping to decode them could lead to invalid writes with some fuzzed samples. Signed-off-by: Michael Niedermayer (cherry picked from commit bcaa9099b3648b47060e1724a97dc98b63c83702) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d71024f8ab35721f674f116ac84d734a1c6d517 --- libavcodec/dvdsubdec.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 20b9d41..08e4195 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -111,6 +111,9 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h, if (start >= buf_size) return -1; +if (w <= 0 || h <= 0) +return -1; + bit_len = (buf_size - start) * 8; init_get_bits(&gb, buf + start, bit_len); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cmdutils: Use 64bit for file size/ offset related variable in cmdutils_read_file()
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 13:12:22 2015 +0100| [b3c082412cdaa2a2c82dcca91a57e9cbf1f2a84d] | committer: Michael Niedermayer cmdutils: Use 64bit for file size/offset related variable in cmdutils_read_file() Signed-off-by: Michael Niedermayer (cherry picked from commit 369b4cd4120bf67aa5187b6bc72574970a24ca22) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3c082412cdaa2a2c82dcca91a57e9cbf1f2a84d --- cmdutils.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdutils.c b/cmdutils.c index b68dae9..708b536 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1860,7 +1860,7 @@ int read_yesno(void) int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) { -int ret; +int64_t ret; FILE *f = av_fopen_utf8(filename, "rb"); if (!f) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/flvdec: do not inject dts= 0 metadata packets which failed to be parsed into a new data stream
ffmpeg | branch: release/2.5 | Michael Niedermayer | Thu Jan 1 18:07:24 2015 +0100| [eac0451e47381300fc2944268faf9cda550e6481] | committer: Michael Niedermayer avformat/flvdec: do not inject dts=0 metadata packets which failed to be parsed into a new data stream Such data streams (which then contain no other packets except the faulty one) confuse some user applications, like VLC Works around vlcticket 12389 Signed-off-by: Michael Niedermayer (cherry picked from commit 322f0f5960a743cac47252d90a0f1ea7a025feff) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eac0451e47381300fc2944268faf9cda550e6481 --- libavformat/flvdec.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 54f2f56..568a654 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -558,13 +558,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) type = avio_r8(ioc); if (type != AMF_DATA_TYPE_STRING || amf_get_string(ioc, buffer, sizeof(buffer)) < 0) -return -1; +return 2; if (!strcmp(buffer, "onTextData")) return 1; if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint")) -return -1; +return 2; // find the streams now so that amf_parse_object doesn't need to do // the lookup every time it is called. @@ -822,7 +822,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) stream_type=FLV_STREAM_TYPE_DATA; if (size > 13 + 1 + 4 && dts == 0) { // Header-type metadata stuff meta_pos = avio_tell(s->pb); -if (flv_read_metabody(s, next) == 0) { +if (flv_read_metabody(s, next) <= 0) { goto skip; } avio_seek(s->pb, meta_pos, SEEK_SET); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/segment: Use av_freep() avoid leaving stale pointers in memory
ffmpeg | branch: release/2.5 | Michael Niedermayer | Thu Dec 25 12:38:20 2014 +0100| [bcd7f35717dbcb4bae3790912c9c08889c6b588e] | committer: Michael Niedermayer avformat/segment: Use av_freep() avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 68fa549230af35179df2a2af2bdb84ee6c825bed) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bcd7f35717dbcb4bae3790912c9c08889c6b588e --- libavformat/segment.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 2cad6e3..56ffcdc 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -343,7 +343,7 @@ static int segment_end(AVFormatContext *s, int write_trailer, int is_last) if (seg->list_size && seg->segment_count >= seg->list_size) { entry = seg->segment_list_entries; seg->segment_list_entries = seg->segment_list_entries->next; -av_free(entry->filename); +av_freep(&entry->filename); av_freep(&entry); } @@ -501,10 +501,10 @@ static int open_null_ctx(AVIOContext **ctx) return 0; } -static void close_null_ctx(AVIOContext *pb) +static void close_null_ctxp(AVIOContext **pb) { -av_free(pb->buffer); -av_free(pb); +av_freep(&(*pb)->buffer); +av_freep(pb); } static int select_reference_stream(AVFormatContext *s) @@ -687,7 +687,7 @@ static int seg_write_header(AVFormatContext *s) s->avoid_negative_ts = 1; if (!seg->write_header_trailer) { -close_null_ctx(oc->pb); +close_null_ctxp(&oc->pb); if ((ret = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE, &s->interrupt_callback, NULL)) < 0) goto fail; @@ -820,7 +820,7 @@ static int seg_write_trailer(struct AVFormatContext *s) goto fail; open_null_ctx(&oc->pb); ret = av_write_trailer(oc); -close_null_ctx(oc->pb); +close_null_ctxp(&oc->pb); } else { ret = segment_end(s, 1, 1); } @@ -836,7 +836,7 @@ fail: cur = seg->segment_list_entries; while (cur) { next = cur->next; -av_free(cur->filename); +av_freep(&cur->filename); av_free(cur); cur = next; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/matroskadec: Use av_freep() to avoid leaving stale pointers in memory
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 12:48:38 2015 +0100| [2791eba1d78af65884b1b02d482c930b1d301e54] | committer: Michael Niedermayer avformat/matroskadec: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 6e70e4aca50696040cc9256ec96e5c31d9641432) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2791eba1d78af65884b1b02d482c930b1d301e54 --- libavformat/matroskadec.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e9ba1e9..3f327fd 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1080,7 +1080,7 @@ static void ebml_free(EbmlSyntax *syntax, void *data) for (j = 0; j < list->nb_elem; j++, ptr += syntax[i].list_elem_size) ebml_free(syntax[i].def.n, ptr); -av_free(list->elem); +av_freep(&list->elem); } else ebml_free(syntax[i].def.n, data_off); default: @@ -2134,7 +2134,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska, { if (matroska->num_packets > 0) { memcpy(pkt, matroska->packets[0], sizeof(AVPacket)); -av_free(matroska->packets[0]); +av_freep(&matroska->packets[0]); if (matroska->num_packets > 1) { void *newpackets; memmove(&matroska->packets[0], &matroska->packets[1], @@ -2165,7 +2165,7 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska) int n; for (n = 0; n < matroska->num_packets; n++) { av_free_packet(matroska->packets[n]); -av_free(matroska->packets[n]); +av_freep(&matroska->packets[n]); } av_freep(&matroska->packets); matroska->num_packets = 0; @@ -3003,7 +3003,7 @@ static int matroska_read_close(AVFormatContext *s) for (n = 0; n < matroska->tracks.nb_elem; n++) if (tracks[n].type == MATROSKA_TRACK_TYPE_AUDIO) -av_free(tracks[n].audio.buf); +av_freep(&tracks[n].audio.buf); ebml_free(matroska_cluster, &matroska->current_cluster); ebml_free(matroska_segment, matroska); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/cdxl: Fix integer overflow of image_size
ffmpeg | branch: release/2.5 | Michael Niedermayer | Wed Dec 31 21:41:46 2014 +0100| [68c63470895d8b8016931af2f94e1dd29b4d8b26] | committer: Michael Niedermayer avformat/cdxl: Fix integer overflow of image_size Signed-off-by: Michael Niedermayer (cherry picked from commit 3eb5cbe0c50d0a0bbe10bcabbd6b16d73d93c128) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68c63470895d8b8016931af2f94e1dd29b4d8b26 --- libavformat/cdxl.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index e3e379a..6d8e750 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -127,6 +127,8 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) height = AV_RB16(&cdxl->header[16]); palette_size = AV_RB16(&cdxl->header[20]); audio_size = AV_RB16(&cdxl->header[22]); +if (FFALIGN(width, 16) * (uint64_t)height * cdxl->header[19] > INT_MAX) +return AVERROR_INVALIDDATA; image_size = FFALIGN(width, 16) * height * cdxl->header[19] / 8; video_size = palette_size + image_size; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: fix integer overflow in mov_read_udta_string()
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 04:29:10 2015 +0100| [25312a427bda360a98c6a38be7af9e5f686c9902] | committer: Michael Niedermayer avformat/mov: fix integer overflow in mov_read_udta_string() Found-by: Paul Mehta Signed-off-by: Michael Niedermayer (cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25312a427bda360a98c6a38be7af9e5f686c9902 --- libavformat/mov.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3a93897..11fdcf0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -355,7 +355,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!key) return 0; -if (atom.size < 0) +if (atom.size < 0 || str_size >= INT_MAX/2) return AVERROR_INVALIDDATA; str_size_alloc = str_size << 1; // worst-case requirement for output string in case of utf8 coded input ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 12:53:53 2015 +0100| [918ed73b70a9ab7c48969256a399b2c2a4f0893c] | committer: Michael Niedermayer avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory Signed-off-by: Michael Niedermayer (cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=918ed73b70a9ab7c48969256a399b2c2a4f0893c --- libavformat/utils.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 5da110d..5a282a7c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2829,6 +2829,7 @@ int ff_alloc_extradata(AVCodecContext *avctx, int size) int ret; if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) { +avctx->extradata = NULL; avctx->extradata_size = 0; return AVERROR(EINVAL); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi: check av_strdup() return value
ffmpeg | branch: release/2.5 | Paul B Mahol | Tue Jan 6 09:42:59 2015 +| [c7a2ac6b6bd5e3f4d11f06caaeff064c263ad829] | committer: Michael Niedermayer lavfi: check av_strdup() return value Signed-off-by: Paul B Mahol (cherry picked from commit 145a84717b62e086cdb5f26649ad9f1b51ef38d0) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7a2ac6b6bd5e3f4d11f06caaeff064c263ad829 --- libavfilter/af_amix.c |2 ++ libavfilter/af_join.c |2 ++ libavfilter/split.c |2 ++ libavfilter/src_movie.c |2 ++ 4 files changed, 8 insertions(+) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index e40969f..fd9d135 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -496,6 +496,8 @@ static av_cold int init(AVFilterContext *ctx) snprintf(name, sizeof(name), "input%d", i); pad.type = AVMEDIA_TYPE_AUDIO; pad.name = av_strdup(name); +if (!pad.name) +return AVERROR(ENOMEM); pad.filter_frame = filter_frame; ff_insert_inpad(ctx, i, &pad); diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index a1717c6..71a454b 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -214,6 +214,8 @@ static av_cold int join_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "input%d", i); pad.type = AVMEDIA_TYPE_AUDIO; pad.name = av_strdup(name); +if (!pad.name) +return AVERROR(ENOMEM); pad.filter_frame = filter_frame; pad.needs_fifo = 1; diff --git a/libavfilter/split.c b/libavfilter/split.c index 6abd5ee..7353810 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -52,6 +52,8 @@ static av_cold int split_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "output%d", i); pad.type = ctx->filter->inputs[0].type; pad.name = av_strdup(name); +if (!pad.name) +return AVERROR(ENOMEM); ff_insert_outpad(ctx, i, &pad); } diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 0b97b82..908c03e 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -289,6 +289,8 @@ static av_cold int movie_common_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "out%d", i); pad.type = movie->st[i].st->codec->codec_type; pad.name = av_strdup(name); +if (!pad.name) +return AVERROR(ENOMEM); pad.config_props = movie_config_output_props; pad.request_frame = movie_request_frame; ff_insert_outpad(ctx, i, &pad); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov: Fix negative size calculation in mov_read_default().
ffmpeg | branch: release/2.5 | Dale Curtis | Mon Jan 5 16:34:17 2015 -0800| [0ce35b8ce8b9e06a4dedc62b4fe10261db67f0a3] | committer: Michael Niedermayer mov: Fix negative size calculation in mov_read_default(). The previous code assumed if an atom was marked with a 64-bit size extension, it actually had that data available. The new code verfies there's enough data in the atom for this to be done. Failure to verify causes total_size > atom.size which will result in negative size calculations later on. Found-by: Paul Mehta Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer (cherry picked from commit 3ebd76a9c57558e284e94da367dd23b435e6a6d0) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ce35b8ce8b9e06a4dedc62b4fe10261db67f0a3 --- libavformat/mov.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 11fdcf0..47f0073 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3431,7 +3431,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) } } total_size += 8; -if (a.size == 1) { /* 64 bit extended size */ +if (a.size == 1 && total_size + 8 <= atom.size) { /* 64 bit extended size */ a.size = avio_rb64(pb) - 8; total_size += 8; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_sab: fix filtering tiny images
ffmpeg | branch: release/2.5 | Michael Niedermayer | Sun Jan 4 01:03:26 2015 +0100| [252ba4a9259fcaf18f5f340da364e7d536bc6788] | committer: Michael Niedermayer avfilter/vf_sab: fix filtering tiny images Fixes out of array reads Signed-off-by: Michael Niedermayer (cherry picked from commit 9bff052b51f27f6cce04e8d7d8b405c710d7ad67) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=252ba4a9259fcaf18f5f340da364e7d536bc6788 --- libavfilter/vf_sab.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c index aa38b53..b8af27c 100644 --- a/libavfilter/vf_sab.c +++ b/libavfilter/vf_sab.c @@ -220,6 +220,19 @@ static int config_props(AVFilterLink *inlink) #define NB_PLANES 4 +static inline int mirror(int x, int w) +{ +if (!w) +return 0; + +while ((unsigned)x > (unsigned)w) { +x = -x; +if (x < 0) +x += 2 * w; +} +return x; +} + static void blur(uint8_t *dst, const int dst_linesize, const uint8_t *src, const int src_linesize, const int w, const int h, FilterParam *fp) @@ -253,8 +266,7 @@ static void blur(uint8_t *dst, const int dst_linesize, for (dy = 0; dy < radius*2 + 1; dy++) { int dx; int iy = y+dy - radius; -if (iy < 0) iy = -iy; -else if (iy >= h) iy = h+h-iy-1; +iy = mirror(iy, h-1); for (dx = 0; dx < radius*2 + 1; dx++) { const int ix = x+dx - radius; @@ -265,13 +277,11 @@ static void blur(uint8_t *dst, const int dst_linesize, for (dy = 0; dy < radius*2+1; dy++) { int dx; int iy = y+dy - radius; -if (iy < 0) iy = -iy; -else if (iy >= h) iy = h+h-iy-1; +iy = mirror(iy, h-1); for (dx = 0; dx < radius*2 + 1; dx++) { int ix = x+dx - radius; -if (ix < 0) ix = -ix; -else if (ix >= w) ix = w+w-ix-1; +ix = mirror(ix, w-1); UPDATE_FACTOR; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dvdsubdec: fix out of bounds accesses
ffmpeg | branch: release/2.5 | wm4 | Mon Jan 5 04:45:26 2015 +0100| [e0a12b3dc3a252412e91416ebbbf9449e82e4bd0] | committer: Michael Niedermayer avcodec/dvdsubdec: fix out of bounds accesses The code blindly trusted buffer offsets read from the file in the RLE decoder. Explicitly check the offset. Also error out on other RLE decoding errors. Signed-off-by: Michael Niedermayer (cherry picked from commit c9151de7c42553bb145be608df8513c1287f1f24) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0a12b3dc3a252412e91416ebbbf9449e82e4bd0 --- libavcodec/dvdsubdec.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 39604f3..20b9d41 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -108,6 +108,9 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h, int x, y, len, color; uint8_t *d; +if (start >= buf_size) +return -1; + bit_len = (buf_size - start) * 8; init_get_bits(&gb, buf + start, bit_len); @@ -359,10 +362,12 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, sub_header->rects[0] = av_mallocz(sizeof(AVSubtitleRect)); sub_header->num_rects = 1; sub_header->rects[0]->pict.data[0] = bitmap; -decode_rle(bitmap, w * 2, w, (h + 1) / 2, - buf, offset1, buf_size, is_8bit); -decode_rle(bitmap + w, w * 2, w, h / 2, - buf, offset2, buf_size, is_8bit); +if (decode_rle(bitmap, w * 2, w, (h + 1) / 2, + buf, offset1, buf_size, is_8bit) < 0) +goto fail; +if (decode_rle(bitmap + w, w * 2, w, h / 2, + buf, offset2, buf_size, is_8bit) < 0) +goto fail; sub_header->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); if (is_8bit) { if (!yuv_palette) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: use av_freep() to avoid leaving stale pointers in memory
ffmpeg | branch: release/2.5 | Michael Niedermayer | Tue Jan 6 12:45:25 2015 +0100| [0d3a07852c3ccada8948c15e593669a21089e316] | committer: Michael Niedermayer avformat/mov: use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 383c6a3a07b71981bd32d083496f5a4935f620f9) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d3a07852c3ccada8948c15e593669a21089e316 --- libavformat/mov.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 47f0073..2313674 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1153,7 +1153,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->codec->codec_id == AV_CODEC_ID_QDMC || st->codec->codec_id == AV_CODEC_ID_SPEEX) { // pass all frma atom to codec, needed at least for QDMC and QDM2 -av_free(st->codec->extradata); +av_freep(&st->codec->extradata); if (ff_get_extradata(st->codec, pb, atom.size) < 0) return AVERROR(ENOMEM); } else if (atom.size > 8) { /* to read frma, esds atoms */ @@ -1193,7 +1193,7 @@ static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c, AV_LOG_WARNING, "ignoring multiple glbl\n"); return 0; } -av_free(st->codec->extradata); +av_freep(&st->codec->extradata); if (ff_get_extradata(st->codec, pb, atom.size) < 0) return AVERROR(ENOMEM); @@ -1218,7 +1218,7 @@ static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; avio_seek(pb, 6, SEEK_CUR); -av_free(st->codec->extradata); +av_freep(&st->codec->extradata); if ((ret = ff_get_extradata(st->codec, pb, atom.size - 7)) < 0) return ret; @@ -1244,7 +1244,7 @@ static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR_INVALIDDATA; avio_skip(pb, 40); -av_free(st->codec->extradata); +av_freep(&st->codec->extradata); if (ff_get_extradata(st->codec, pb, atom.size - 40) < 0) return AVERROR(ENOMEM); return 0; @@ -4113,7 +4113,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) #if CONFIG_DV_DEMUXER if (mov->dv_demux && sc->dv_audio_container) { avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size, pkt->pos); -av_free(pkt->data); +av_freep(&pkt->data); pkt->size = 0; ret = avpriv_dv_get_packet(mov->dv_demux, pkt); if (ret < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov: Fix overflow and error handling in read_tfra().
ffmpeg | branch: release/2.5 | Dale Curtis | Tue Jan 6 04:00:43 2015 +0100| [9143ab0e5a75519c899cae2996d07b3f69bcfb24] | committer: Michael Niedermayer mov: Fix overflow and error handling in read_tfra(). Under abnormal conditions the item_count may exceed the max allocation size on 32-bit systems, this causes the allocated size to overflow and become too small for the given count. Additionally, if av_reallocp() fails its allocation, the fragment_index_count is not correctly decremented. Ensuring further havoc may be wrought, the error code for read_tfra() is not checked upon return. Found-by: Paul Mehta positive return code and use of _array functions by commiter Signed-off-by: Michael Niedermayer (cherry picked from commit db42d93a61be26873be6115c57f5921b4dfdec14) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9143ab0e5a75519c899cae2996d07b3f69bcfb24 --- libavformat/mov.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index b888c67..3a93897 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3782,35 +3782,39 @@ static void export_orphan_timecode(AVFormatContext *s) static int read_tfra(MOVContext *mov, AVIOContext *f) { MOVFragmentIndex* index = NULL; -int version, fieldlength, i, j, err; +int version, fieldlength, i, j; int64_t pos = avio_tell(f); uint32_t size = avio_rb32(f); +void *tmp; + if (avio_rb32(f) != MKBETAG('t', 'f', 'r', 'a')) { -return -1; +return 1; } av_log(mov->fc, AV_LOG_VERBOSE, "found tfra\n"); index = av_mallocz(sizeof(MOVFragmentIndex)); if (!index) { return AVERROR(ENOMEM); } -mov->fragment_index_count++; -if ((err = av_reallocp(&mov->fragment_index_data, - mov->fragment_index_count * - sizeof(MOVFragmentIndex*))) < 0) { + +tmp = av_realloc_array(mov->fragment_index_data, + mov->fragment_index_count + 1, + sizeof(MOVFragmentIndex*)); +if (!tmp) { av_freep(&index); -return err; +return AVERROR(ENOMEM); } -mov->fragment_index_data[mov->fragment_index_count - 1] = -index; +mov->fragment_index_data = tmp; +mov->fragment_index_data[mov->fragment_index_count++] = index; version = avio_r8(f); avio_rb24(f); index->track_id = avio_rb32(f); fieldlength = avio_rb32(f); index->item_count = avio_rb32(f); -index->items = av_mallocz( -index->item_count * sizeof(MOVFragmentIndexItem)); +index->items = av_mallocz_array( +index->item_count, sizeof(MOVFragmentIndexItem)); if (!index->items) { +index->item_count = 0; return AVERROR(ENOMEM); } for (i = 0; i < index->item_count; i++) { @@ -3864,11 +3868,13 @@ static int mov_read_mfra(MOVContext *c, AVIOContext *f) av_log(c->fc, AV_LOG_DEBUG, "doesn't look like mfra (tag mismatch)\n"); goto fail; } -ret = 0; av_log(c->fc, AV_LOG_VERBOSE, "stream has mfra\n"); -while (!read_tfra(c, f)) { -/* Empty */ -} +do { +ret = read_tfra(c, f); +if (ret < 0) +goto fail; +} while (!ret); +ret = 0; fail: seek_ret = avio_seek(f, original_pos, SEEK_SET); if (seek_ret < 0) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov: Avoid overflow with mov_metadata_raw()
ffmpeg | branch: release/2.5 | Dale Curtis | Mon Jan 5 16:19:09 2015 -0800| [022bfd3dd47c3a2b59ce3eb1142aecc199f320ed] | committer: Michael Niedermayer mov: Avoid overflow with mov_metadata_raw() The code previously added 1 to len without checking its size, resulting in an overflow which can corrupt value[-1] -- which may be used to store unaligned ptr information for certain allocators. Found-by: Paul Mehta Signed-off-by: Dale Curtis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=022bfd3dd47c3a2b59ce3eb1142aecc199f320ed --- libavformat/mov.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 57e4524..b888c67 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -210,6 +210,9 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) static int mov_metadata_raw(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { +// Check for overflow. +if (len >= INT_MAX) +return AVERROR(EINVAL); char *value = av_malloc(len + 1); if (!value) return AVERROR(ENOMEM); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: restore a block mistakenly removed in e10fd08a
ffmpeg | branch: release/2.4 | Anton Khirnov | Thu Dec 25 22:46:39 2014 +0100| [883795fb0face00a07349fbd32f4775431a9f30d] | committer: Anton Khirnov h264: restore a block mistakenly removed in e10fd08a CC: libav-sta...@libav.org Bug-ID: 781 (cherry picked from commit 60d4c6ff76467d4d8f55c1cc61ab6c618e8ea2f3) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=883795fb0face00a07349fbd32f4775431a9f30d --- libavcodec/h264.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 562b102..4bc0a03 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1454,6 +1454,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, buf_index = find_start_code(buf, buf_size, buf_index, next_avc); if (buf_index >= buf_size) break; +if (buf_index >= next_avc) +continue; } hx = h->thread_context[context_count]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '883795fb0face00a07349fbd32f4775431a9f30d' into release/2.4
ffmpeg | branch: release/2.4 | Michael Niedermayer | Fri Jan 9 17:06:27 2015 +0100| [33c8bb2c6a87e89ed4536ed2ebaa9a1dae2fbfcb] | committer: Michael Niedermayer Merge commit '883795fb0face00a07349fbd32f4775431a9f30d' into release/2.4 * commit '883795fb0face00a07349fbd32f4775431a9f30d': h264: restore a block mistakenly removed in e10fd08a See: 0ecb3075c1c243cfb656d1cbe0b19cdb91bde659 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33c8bb2c6a87e89ed4536ed2ebaa9a1dae2fbfcb --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/hdsenc: Remove redundant NULL pointer checks
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 15:54:15 2015 +0100| [b1d223301f03741c87a0e0b755c108bbc2eafc93] | committer: Michael Niedermayer avformat/hdsenc: Remove redundant NULL pointer checks Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b1d223301f03741c87a0e0b755c108bbc2eafc93 --- libavformat/hdsenc.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 4052028..48810a9 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -139,11 +139,10 @@ static void hds_free(AVFormatContext *s) return; for (i = 0; i < s->nb_streams; i++) { OutputStream *os = &c->streams[i]; -if (os->out) -avio_closep(&os->out); +avio_closep(&os->out); if (os->ctx && os->ctx_inited) av_write_trailer(os->ctx); -if (os->ctx && os->ctx->pb) +if (os->ctx) av_freep(&os->ctx->pb); if (os->ctx) avformat_free_context(os->ctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: remove unneeded NULL pointer check
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 15:51:32 2015 +0100| [04091552616e6c5bea754ebbee26f77cb8ba416e] | committer: Michael Niedermayer ffmpeg: remove unneeded NULL pointer check Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04091552616e6c5bea754ebbee26f77cb8ba416e --- ffmpeg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 0741eca..f9aa65f 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -458,7 +458,7 @@ static void ffmpeg_cleanup(int ret) for (i = 0; i < nb_output_files; i++) { OutputFile *of = output_files[i]; AVFormatContext *s = of->ctx; -if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE) && s->pb) +if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE)) avio_closep(&s->pb); avformat_free_context(s); av_dict_free(&of->opts); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] tools/uncoded_frame: Use avio_closep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 15:46:13 2015 +0100| [323355413dbe576dada9919535c7b72f2d9a66b4] | committer: Michael Niedermayer tools/uncoded_frame: Use avio_closep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=323355413dbe576dada9919535c7b72f2d9a66b4 --- tools/uncoded_frame.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c index 53e71ea..3ca2ba4 100644 --- a/tools/uncoded_frame.c +++ b/tools/uncoded_frame.c @@ -269,7 +269,7 @@ fail: st = &streams[i]; if (st->mux) { if (st->mux->pb) -avio_close(st->mux->pb); +avio_closep(&st->mux->pb); avformat_free_context(st->mux); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/sapenc: Use avio_closep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 13:39:48 2015 +0100| [643dee846addc190fe2596ca8d9b53bafeba080f] | committer: Michael Niedermayer avformat/sapenc: Use avio_closep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=643dee846addc190fe2596ca8d9b53bafeba080f --- libavformat/sapenc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index f909557..07fbf48 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -49,7 +49,7 @@ static int sap_write_close(AVFormatContext *s) if (!rtpctx) continue; av_write_trailer(rtpctx); -avio_close(rtpctx->pb); +avio_closep(&rtpctx->pb); avformat_free_context(rtpctx); s->streams[i]->priv_data = NULL; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 13:39:06 2015 +0100| [2959a612326c5e473518eb91c4b66020468a11fe] | committer: Michael Niedermayer avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2959a612326c5e473518eb91c4b66020468a11fe --- libavformat/utils.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 7581957..cb8b42b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -496,7 +496,7 @@ fail: ff_id3v2_free_extra_meta(&id3v2_extra_meta); av_dict_free(&tmp); if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO)) -avio_close(s->pb); +avio_closep(&s->pb); avformat_free_context(s); *ps = NULL; return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/tee: Simplify code by using avio_closep()
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 9 13:40:09 2015 +0100| [ef3a6a48b56dce552f4bc8b60403d2d53484c2f8] | committer: Michael Niedermayer avformat/tee: Simplify code by using avio_closep() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef3a6a48b56dce552f4bc8b60403d2d53484c2f8 --- libavformat/tee.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 681f943..e3d466a 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -305,8 +305,7 @@ static void close_slaves(AVFormatContext *avf) av_freep(&tee->slaves[i].stream_map); av_freep(&tee->slaves[i].bsfs); -avio_close(avf2->pb); -avf2->pb = NULL; +avio_closep(&avf2->pb); avformat_free_context(avf2); tee->slaves[i].avf = NULL; } @@ -437,10 +436,9 @@ static int tee_write_trailer(AVFormatContext *avf) if (!ret_all) ret_all = ret; if (!(avf2->oformat->flags & AVFMT_NOFILE)) { -if ((ret = avio_close(avf2->pb)) < 0) +if ((ret = avio_closep(&avf2->pb)) < 0) if (!ret_all) ret_all = ret; -avf2->pb = NULL; } } close_slaves(avf); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vp9: fix parser return values in error case
ffmpeg | branch: master | wm4 | Fri Jan 9 02:13:36 2015 +0100| [b88e80589bd11ef935a5e9dab53d4edb00de16e4] | committer: Michael Niedermayer vp9: fix parser return values in error case The parser must always set the out_size and out_data pointers. The API seems to require it, and the common code in parser.c also relies on it. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b88e80589bd11ef935a5e9dab53d4edb00de16e4 --- libavcodec/vp9_parser.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index af033c2..922f36f 100644 --- a/libavcodec/vp9_parser.c +++ b/libavcodec/vp9_parser.c @@ -77,6 +77,8 @@ static int parse(AVCodecParserContext *ctx, idx += a; \ if (sz > size) { \ s->n_frames = 0; \ +*out_size = 0; \ +*out_data = data; \ av_log(avctx, AV_LOG_ERROR, \ "Superframe packet size too big: %u > %d\n", \ sz, size); \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] Skip Exif data when auto-detecting jpeg images.
Reimar Döffinger gmx.de> writes: > > +if (AV_RB16(b) == 0xFFE1 && AV_RB32(b + 4) == AV_RB32("Exif")) { > > Are we allowed to just assume that buf_size is >= 8 > (or that there is at least 8 bytes 0 padding)? 32 zeros are required by our API afaict. I cannot comment on the undefined behaviour. Carl Eugen ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] Skip Exif data when auto-detecting jpeg images.
On 09.01.2015, at 00:50, g...@videolan.org (Carl Eugen Hoyos) wrote: > ffmpeg | branch: master | Carl Eugen Hoyos | Fri Jan 9 > 00:30:02 2015 +0100| [cd3405282c7007a535b297d14e50e4ff12c18679] | committer: > Carl Eugen Hoyos > > Skip Exif data when auto-detecting jpeg images. > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd3405282c7007a535b297d14e50e4ff12c18679 > --- > > libavformat/img2dec.c |8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c > index 015a20a..329e61d 100644 > --- a/libavformat/img2dec.c > +++ b/libavformat/img2dec.c > @@ -643,14 +643,18 @@ static int j2k_probe(AVProbeData *p) > static int jpeg_probe(AVProbeData *p) > { > const uint8_t *b = p->buf; > -int i, state = 0xD8; > +int i, state = 0xD8, exif_size = 0; > > if (AV_RB16(b) != 0xFFD8 || > AV_RB32(b) == 0xFFD8FFF7) > return 0; > > b += 2; > -for (i = 0; i < p->buf_size - 2; i++) { > +if (AV_RB16(b) == 0xFFE1 && AV_RB32(b + 4) == AV_RB32("Exif")) { Are we allowed to just assume that buf_size is >= 8 (or that there is at least 8 bytes 0 padding)? > +exif_size = AV_RB16(b + 2) + 2; > +b += exif_size; Also I don't know how we handle it otherwise, but the pointer increment is already undefined behaviour strictly speaking if buf_size < exif_size + 2 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] lavfi/boxblur: Readd 8bit colour spaces on big-endian.
On 08.01.2015, at 17:05, g...@videolan.org (Carl Eugen Hoyos) wrote: > ffmpeg | branch: master | Carl Eugen Hoyos | Thu Jan 8 > 15:24:59 2015 +0100| [26ac6d543598f17ceb6771bce08a00291e62a4ef] | committer: > Carl Eugen Hoyos > > lavfi/boxblur: Readd 8bit colour spaces on big-endian. > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26ac6d543598f17ceb6771bce08a00291e62a4ef > --- > > libavfilter/vf_boxblur.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c > index 89cf015..3ccf268 100644 > --- a/libavfilter/vf_boxblur.c > +++ b/libavfilter/vf_boxblur.c > @@ -124,7 +124,7 @@ static int query_formats(AVFilterContext *ctx) > const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); > if (!(desc->flags & (AV_PIX_FMT_FLAG_HWACCEL | > AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_PAL)) && > (desc->flags & AV_PIX_FMT_FLAG_PLANAR || desc->nb_components == > 1) && > -!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN) > +(!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN) || > desc->comp[0].depth_minus1 == 7) That doesn't seem quite right if there's more than one component, at some point we might add a format that has 8 bit for the first and more bits for some other component. Maybe adding a common function that checks for native-endian would make it easier to understand, too. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog