[FFmpeg-cvslog] libx265: Remove experimental flag when encoding 4:2:2 and 4:4:4
ffmpeg | branch: master | Stephen Hutchinson | Tue Jan 26 19:10:01 2016 -0500| [0dd201d947e213887960fe8835586c0b0d73a40e] | committer: Michael Niedermayer libx265: Remove experimental flag when encoding 4:2:2 and 4:4:4 4:2:2 and 4:4:4 support in the HEVC standard was approved in October 2014 as part of HEVC Version 2 and published in January 2015: http://www.itu.int/ITU-T/recommendations/rec.aspx?rec=12296 http://www.itu.int/rec/T-REC-H.265-201410-S https://hevc.hhi.fraunhofer.de/rext Reviewed-by: Derek Buitenhuis Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0dd201d947e213887960fe8835586c0b0d73a40e --- libavcodec/libx265.c |8 1 file changed, 8 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index a1770fa..4c36f4c 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -82,14 +82,6 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) if (!ctx->api) ctx->api = x265_api_get(0); -if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL && -!av_pix_fmt_desc_get(avctx->pix_fmt)->log2_chroma_w) { -av_log(avctx, AV_LOG_ERROR, - "4:2:2 and 4:4:4 support is not fully defined for HEVC yet. " - "Set -strict experimental to encode anyway.\n"); -return AVERROR(ENOSYS); -} - ctx->params = ctx->api->param_alloc(); if (!ctx->params) { av_log(avctx, AV_LOG_ERROR, "Could not allocate x265 param structure.\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/vqf: fix suported/supported typo
ffmpeg | branch: master | Clément Bœsch | Sat Jan 30 13:08:37 2016 +0100| [d3d03fd55e082a2ea14381d4ccfd94d8c2a9abd4] | committer: Clément Bœsch lavf/vqf: fix suported/supported typo > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3d03fd55e082a2ea14381d4ccfd94d8c2a9abd4 --- libavformat/vqf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/vqf.c b/libavformat/vqf.c index a544356..3c897e1 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -211,7 +211,7 @@ static int vqf_read_header(AVFormatContext *s) size = 2048; break; default: -av_log(s, AV_LOG_ERROR, "Mode not suported: %d Hz, %"PRId64" kb/s.\n", +av_log(s, AV_LOG_ERROR, "Mode not supported: %d Hz, %"PRId64" kb/s.\n", st->codec->sample_rate, (int64_t)st->codec->bit_rate); return -1; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/utils: fix instanciate/instantiate typo
ffmpeg | branch: master | Clément Bœsch | Sat Jan 30 13:10:11 2016 +0100| [54ab90c05b9d664f899b628764dcf74997a37358] | committer: Clément Bœsch lavc/utils: fix instanciate/instantiate typo > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54ab90c05b9d664f899b628764dcf74997a37358 --- libavcodec/utils.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 491d8ea..c103039 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1318,7 +1318,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n"); if (CONFIG_FRAME_THREAD_ENCODER && av_codec_is_encoder(avctx->codec)) { -ff_unlock_avcodec(codec); //we will instanciate a few encoders thus kick the counter to prevent false detection of a problem +ff_unlock_avcodec(codec); //we will instantiate a few encoders thus kick the counter to prevent false detection of a problem ret = ff_frame_thread_encoder_init(avctx, options ? *options : NULL); ff_lock_avcodec(avctx, codec); if (ret < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/v210dec: Allow odd width.
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Jan 30 13:31:44 2016 +0100| [d391feff544f014a01393673f373bbdbca8c9af5] | committer: Carl Eugen Hoyos lavc/v210dec: Allow odd width. The rightmost column is not decoded correctly. Fixes a part of ticket #5195. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d391feff544f014a01393673f373bbdbca8c9af5 --- libavcodec/v210dec.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 12d5d54..9af9af6 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -53,10 +53,6 @@ static av_cold int decode_init(AVCodecContext *avctx) { V210DecContext *s = avctx->priv_data; -if (avctx->width & 1) { -av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); -return AVERROR_INVALIDDATA; -} avctx->pix_fmt = AV_PIX_FMT_YUV422P10; avctx->bits_per_raw_sample = 10; @@ -141,7 +137,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } psrc += stride; -y += pic->linesize[0] / 2 - avctx->width; +y += pic->linesize[0] / 2 - avctx->width + (avctx->width & 1); u += pic->linesize[1] / 2 - avctx->width / 2; v += pic->linesize[2] / 2 - avctx->width / 2; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: Sanitize Common Encryption entries.
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Jan 30 13:30:29 2016 +0100| [0275b2d9175475c10040772d87e9ee6911467004] | committer: Carl Eugen Hoyos Changelog: Sanitize Common Encryption entries. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0275b2d9175475c10040772d87e9ee6911467004 --- Changelog |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 8de4fd7..c0be305 100644 --- a/Changelog +++ b/Changelog @@ -2,8 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version : -- Common Encryption (CENC) MP4 decoding support -- Common Encryption (CENC) MP4 encoding support +- Common Encryption (CENC) MP4 encoding and decoding support - DXV decoding - extrastereo filter - ocr filter ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/exr: Move setting SAR down.
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Jan 30 13:38:16 2016 +0100| [31f5fa21b03d16e285035a053d3267880ef9a12b] | committer: Carl Eugen Hoyos lavc/exr: Move setting SAR down. Fixes a theoretical issue if the resolution attribute is written behind the aspect attribute. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31f5fa21b03d16e285035a053d3267880ef9a12b --- libavcodec/exr.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index c8c758e..9ec99d6 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1030,7 +1030,7 @@ static int check_header_variable(EXRContext *s, static int decode_header(EXRContext *s) { int current_channel_offset = 0; -int magic_number, version, flags, i; +int magic_number, version, flags, i, sar = 0; s->xmin = ~0; s->xmax = ~0; @@ -1227,8 +1227,7 @@ static int decode_header(EXRContext *s) if (!var_size) return AVERROR_INVALIDDATA; -ff_set_sar(s->avctx, - av_d2q(av_int2float(bytestream2_get_le32(&s->gb)), 255)); +sar = bytestream2_get_le32(&s->gb); continue; } else if ((var_size = check_header_variable(s, "compression", @@ -1259,6 +1258,8 @@ static int decode_header(EXRContext *s) bytestream2_skip(&s->gb, bytestream2_get_le32(&s->gb)); } +ff_set_sar(s->avctx, av_d2q(av_int2float(sar), 255)); + if (s->compression == EXR_UNKN) { av_log(s->avctx, AV_LOG_ERROR, "Missing compression attribute.\n"); return AVERROR_INVALIDDATA; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. e5dda59 Add news entry on removal of libvo-aacenc and libaacplus
The branch, master has been updated via e5dda59cdf8d4a82511a352efbb8194241a966b7 (commit) from f12f590648f81b31c3d608303f57f0f8d50e5449 (commit) - Log - commit e5dda59cdf8d4a82511a352efbb8194241a966b7 Author: Timothy Gu AuthorDate: Fri Jan 29 19:41:33 2016 -0800 Commit: Timothy Gu CommitDate: Sat Jan 30 09:25:49 2016 -0800 Add news entry on removal of libvo-aacenc and libaacplus Reviewed-by: Lou Logan diff --git a/src/index b/src/index index 8680ef0..827d803 100644 --- a/src/index +++ b/src/index @@ -37,6 +37,47 @@ News + January 30, 2016, Removing support for two external AAC encoders + +We have just removed support for VisualOn AAC encoder (libvo-aacenc) and +libaacplus in FFmpeg master. + + +Even before marking our internal AAC encoder as +stable, it was known that libvo-aacenc +was of an inferior quality compared to our native one for most samples. +However, the VisualOn encoder was used extensively by the Android Open +Source Project, and we would like to have a tested-and-true stable option +in our code base. + + +When first committed in 2011, libaacplus filled in the gap of encoding +High Efficiency AAC formats (HE-AAC and HE-AACv2), which was not supported +by any of the encoders in FFmpeg at that time. + + +The circumstances for both have changed. After the work spearheaded by +Rostislav Pehlivanov and Claudio Freire, the now-stable FFmpeg native AAC +encoder is ready to compete with much more mature encoders. The Fraunhofer +FDK AAC Codec Library for Android was added in 2012 as the fourth +supported external AAC encoder, and the one with the best quality and the +most features supported, including HE-AAC and HE-AACv2. + + +Therefore, we have decided that it is time to remove libvo-aacenc and +libaacplus. If you are currently using libvo-aacenc, prepare to transition +to the native encoder (aac) when updating to the next version +of FFmpeg. In most cases it is as simple as merely swapping the encoder +name. If you are currently using libaacplus, start using FDK AAC +(libfdk_aac) with an appropriate profile option +to select the exact AAC profile that fits your needs. In both cases, you +will enjoy an audible quality improvement and as well as fewer licensing +headaches. + + +Enjoy! + + January 16, 2016, FFmpeg 2.8.5, 2.7.5, 2.6.7, 2.5.10 We have made several new point releases (2.8.5, --- Summary of changes: src/index | 41 + 1 file changed, 41 insertions(+) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: Cineform HD Decoder
ffmpeg | branch: master | Kieran Kunhya | Sat Jan 30 17:39:48 2016 +| [3485332bf99602910fe8830b0230d02fc653135d] | committer: Kieran Kunhya avcodec: Cineform HD Decoder Decodes YUV 4:2:2 10-bit and RGB 12-bit files. Older files with more subbands, skips, Bayer, alpha not supported. Alpha requires addition of GBRAP12 pixel format. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3485332bf99602910fe8830b0230d02fc653135d --- libavcodec/Makefile |1 + libavcodec/allcodecs.c |1 + libavcodec/avcodec.h|1 + libavcodec/cfhd.c | 749 +++ libavcodec/cfhd.h | 112 +++ libavcodec/cfhddata.c | 323 libavcodec/codec_desc.c |7 + libavformat/riff.c |1 + 8 files changed, 1195 insertions(+) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 6e28069..de957d8 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -210,6 +210,7 @@ OBJS-$(CONFIG_CAVS_DECODER)+= cavs.o cavsdec.o cavsdsp.o \ OBJS-$(CONFIG_CCAPTION_DECODER)+= ccaption_dec.o OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o OBJS-$(CONFIG_CDXL_DECODER)+= cdxl.o +OBJS-$(CONFIG_CFHD_DECODER)+= cfhd.o cfhddata.o OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o OBJS-$(CONFIG_CINEPAK_ENCODER) += cinepakenc.o elbg.o OBJS-$(CONFIG_CLJR_DECODER)+= cljrdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7552eab..c7c1af5 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -148,6 +148,7 @@ void avcodec_register_all(void) REGISTER_DECODER(CAVS, cavs); REGISTER_DECODER(CDGRAPHICS,cdgraphics); REGISTER_DECODER(CDXL, cdxl); +REGISTER_DECODER(CFHD, cfhd); REGISTER_ENCDEC (CINEPAK, cinepak); REGISTER_ENCDEC (CLJR, cljr); REGISTER_DECODER(CLLC, cllc); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8fe9928..727b3a1 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -315,6 +315,7 @@ enum AVCodecID { AV_CODEC_ID_SMVJPEG, AV_CODEC_ID_APNG, AV_CODEC_ID_DAALA, +AV_CODEC_ID_CFHD, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c new file mode 100644 index 000..115081c --- /dev/null +++ b/libavcodec/cfhd.c @@ -0,0 +1,749 @@ +/* + * Copyright (c) 2015-2016 Kieran Kunhya + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ + +/** + * @file + * CFHD Video Decoder + */ + +#include "libavutil/buffer.h" +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/imgutils.h" +#include "libavutil/opt.h" + +#include "avcodec.h" +#include "internal.h" +#include "bytestream.h" +#include "thread.h" +#include "cfhd.h" + +#define SUBBAND_COUNT 10 + +static av_cold int cfhd_decode_init(AVCodecContext *avctx) +{ +CFHDContext *s = avctx->priv_data; + +avctx->bits_per_raw_sample = 10; +s->avctx = avctx; +avctx->width = 0; +avctx->height = 0; + +return ff_cfhd_init_vlcs(s); +} + +static void init_plane_defaults(CFHDContext *s) +{ +s->subband_num= 0; +s->level = 0; +s->subband_num_actual = 0; +} + +static void init_frame_defaults(CFHDContext *s) +{ +s->coded_width = 0; +s->coded_height = 0; +s->bpc = 10; +s->channel_cnt = 4; +s->subband_cnt = 10; +s->channel_num = 0; +s->lowpass_precision = 16; +s->quantisation = 1; +s->wavelet_depth = 3; +s->pshift= 1; +s->codebook = 0; +init_plane_defaults(s); +} + +/* TODO: merge with VLC tables or use LUT */ +static inline int dequant_and_decompand(int level, int quantisation) +{ +int64_t abslevel = abs(level); +return (abslevel + ((768 * abslevel * abslevel * abslevel) / (255 * 255 * 255))) * FFSIGN(level) * quantisation; +} + +static inline void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, +
[FFmpeg-cvslog] avcodec: Add forgotten minor bump, add Changelog and add Cineform to general.texi
ffmpeg | branch: master | Kieran Kunhya | Sat Jan 30 18:09:36 2016 +| [32bf4a72e326a2c18b45672e6b8ec9d4a71d47da] | committer: Kieran Kunhya avcodec: Add forgotten minor bump, add Changelog and add Cineform to general.texi > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32bf4a72e326a2c18b45672e6b8ec9d4a71d47da --- Changelog|1 + doc/general.texi |1 + libavcodec/version.h |2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index c0be305..2d7ad06 100644 --- a/Changelog +++ b/Changelog @@ -60,6 +60,7 @@ version : - libquvi support removed - support for dvaudio in wav and avi - libaacplus and libvo-aacenc support removed +- Cineform HD decoder version 2.8: diff --git a/doc/general.texi b/doc/general.texi index 4e6698c..59ea4f4 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -276,6 +276,7 @@ library: @item CD+G @tab @tab X @tab Video format used by CD+G karaoke disks @item Phantom Cine @tab @tab X +@item Cineform HD @tab @tab X @item Commodore CDXL@tab @tab X @tab Amiga CD video format @item Core Audio Format @tab X @tab X diff --git a/libavcodec/version.h b/libavcodec/version.h index ae8f2ba..5740137 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 23 +#define LIBAVCODEC_VERSION_MINOR 24 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/format: Replace nodat by enum
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 30 21:48:16 2016 +0100| [8619582bdf1be5ee58655a01d42da547f727b19b] | committer: Michael Niedermayer avformat/format: Replace nodat by enum This makes the code much more readable Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8619582bdf1be5ee58655a01d42da547f727b19b --- libavformat/format.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/libavformat/format.c b/libavformat/format.c index ffddb13..9d14c67 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -171,8 +171,13 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, { AVProbeData lpd = *pd; AVInputFormat *fmt1 = NULL, *fmt; -int score, nodat = 0, score_max = 0; +int score, score_max = 0; const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE]; +enum nodat { +NO_ID3, +ID3_GREATER_PROBE, +ID3_GREATER_MAX_PROBE, +} nodat = NO_ID3; if (!lpd.buf) lpd.buf = (unsigned char *) zerobuffer; @@ -183,9 +188,9 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, lpd.buf += id3len; lpd.buf_size -= id3len; } else if (id3len >= PROBE_BUF_MAX) { -nodat = 2; +nodat = ID3_GREATER_MAX_PROBE; } else -nodat = 1; +nodat = ID3_GREATER_PROBE; } fmt = NULL; @@ -198,9 +203,9 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, if (score) av_log(NULL, AV_LOG_TRACE, "Probing %s score:%d size:%d\n", fmt1->name, score, lpd.buf_size); if (fmt1->extensions && av_match_ext(lpd.filename, fmt1->extensions)) { -if (nodat == 0) score = FFMAX(score, 1); -else if (nodat == 1) score = FFMAX(score, AVPROBE_SCORE_EXTENSION / 2 - 1); -else score = FFMAX(score, AVPROBE_SCORE_EXTENSION); +if (nodat == NO_ID3)score = FFMAX(score, 1); +else if (nodat == ID3_GREATER_PROBE) score = FFMAX(score, AVPROBE_SCORE_EXTENSION / 2 - 1); +else score = FFMAX(score, AVPROBE_SCORE_EXTENSION); } } else if (fmt1->extensions) { if (av_match_ext(lpd.filename, fmt1->extensions)) @@ -214,7 +219,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, } else if (score == score_max) fmt = NULL; } -if (nodat == 1) +if (nodat == ID3_GREATER_PROBE) score_max = FFMIN(AVPROBE_SCORE_EXTENSION / 2 - 1, score_max); *score_ret = score_max; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/format: Weight the filename extension higher if there is nearly no data after an ID3 available
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 30 22:01:16 2016 +0100| [77864be44a0daeae846d7395b3cb682a22ce99a9] | committer: Michael Niedermayer avformat/format: Weight the filename extension higher if there is nearly no data after an ID3 available Fixes Ticket5205 Based-on-patch-by: Carl Eugen Hoyos Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77864be44a0daeae846d7395b3cb682a22ce99a9 --- libavformat/format.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/libavformat/format.c b/libavformat/format.c index 9d14c67..15fe167 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -175,6 +175,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE]; enum nodat { NO_ID3, +ID3_ALMOST_GREATER_PROBE, ID3_GREATER_PROBE, ID3_GREATER_MAX_PROBE, } nodat = NO_ID3; @@ -185,6 +186,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) { int id3len = ff_id3v2_tag_len(lpd.buf); if (lpd.buf_size > id3len + 16) { +if (lpd.buf_size < 2LL*id3len + 16) +nodat = ID3_ALMOST_GREATER_PROBE; lpd.buf += id3len; lpd.buf_size -= id3len; } else if (id3len >= PROBE_BUF_MAX) { @@ -203,9 +206,18 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, if (score) av_log(NULL, AV_LOG_TRACE, "Probing %s score:%d size:%d\n", fmt1->name, score, lpd.buf_size); if (fmt1->extensions && av_match_ext(lpd.filename, fmt1->extensions)) { -if (nodat == NO_ID3)score = FFMAX(score, 1); -else if (nodat == ID3_GREATER_PROBE) score = FFMAX(score, AVPROBE_SCORE_EXTENSION / 2 - 1); -else score = FFMAX(score, AVPROBE_SCORE_EXTENSION); +switch (nodat) { +case NO_ID3: +score = FFMAX(score, 1); +break; +case ID3_GREATER_PROBE: +case ID3_ALMOST_GREATER_PROBE: +score = FFMAX(score, AVPROBE_SCORE_EXTENSION / 2 - 1); +break; +case ID3_GREATER_MAX_PROBE: +score = FFMAX(score, AVPROBE_SCORE_EXTENSION); +break; +} } } else if (fmt1->extensions) { if (av_match_ext(lpd.filename, fmt1->extensions)) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale/x86/rgb2rgb_template: Fix planar2x() for short width
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 17 12:33:50 2016 +0100| [edc7ef376bbea64441d3756dcb7301c646dead20] | committer: Michael Niedermayer swscale/x86/rgb2rgb_template: Fix planar2x() for short width Fixes: 451b3e0cf956c0bd2f27ed753ac24050/asan_heap-oob_2873c01_3231_7ed10a9464d15f0d57277f5917c566a8.AVI Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit c8a9aaab2695e0f9921db946a3b9f14bea880167) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edc7ef376bbea64441d3756dcb7301c646dead20 --- libswscale/x86/rgb2rgb_template.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index a10f268..b56e15c 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1434,7 +1434,9 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, int srcWid dst+= dstStride; for (y=1; y> 2; +dst[dstStride] = (src[0] + 3 * src[srcStride]) >> 2; +} for (x=mmxSize-1; x>2; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale/swscale_unscaled: Fix odd height inputs for bayer_to_rgb24_wrapper ()
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 17 00:55:44 2016 +0100| [d3cefc271daa9b5829b14469b63fac8359241c3d] | committer: Michael Niedermayer swscale/swscale_unscaled: Fix odd height inputs for bayer_to_rgb24_wrapper() Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine Fixes out of array read Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit ad3b6fa7d83db7de951ed891649af93a47e74be5) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3cefc271daa9b5829b14469b63fac8359241c3d --- libswscale/swscale_unscaled.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 1dc42c8..56e3933 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -1059,6 +1059,8 @@ static int bayer_to_rgb24_wrapper(SwsContext *c, const uint8_t* src[], int srcSt default: return 0; } +av_assert0(srcSliceH > 1); + copy(srcPtr, srcStride[0], dstPtr, dstStride[0], c->srcW); srcPtr += 2 * srcStride[0]; dstPtr += 2 * dstStride[0]; @@ -1069,7 +1071,10 @@ static int bayer_to_rgb24_wrapper(SwsContext *c, const uint8_t* src[], int srcSt dstPtr += 2 * dstStride[0]; } -copy(srcPtr, srcStride[0], dstPtr, dstStride[0], c->srcW); +if (i + 1 == srcSliceH) { +copy(srcPtr, -srcStride[0], dstPtr, -dstStride[0], c->srcW); +} else if (i < srcSliceH) +copy(srcPtr, srcStride[0], dstPtr, dstStride[0], c->srcW); return srcSliceH; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpeg12enc: Move high resolution thread check to before initializing threads
ffmpeg | branch: release/2.7 | Michael Niedermayer | Thu Jan 21 00:36:51 2016 +0100| [302f11e719cc7fc59960f145b99b1f54a4ba0374] | committer: Michael Niedermayer avcodec/mpeg12enc: Move high resolution thread check to before initializing threads Cleaner solution is welcome! Signed-off-by: Michael Niedermayer (cherry picked from commit a53fbda9dc92273054a103db7539d2bb6e9632b2) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=302f11e719cc7fc59960f145b99b1f54a4ba0374 --- libavcodec/mpeg12enc.c |3 --- libavcodec/pthread_slice.c |6 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 5b8c4ec..ea3c784 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -144,9 +144,6 @@ static av_cold int encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; -if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && avctx->height > 2800) -avctx->thread_count = 1; - if (ff_mpv_encode_init(avctx) < 0) return -1; diff --git a/libavcodec/pthread_slice.c b/libavcodec/pthread_slice.c index c8e69f0..f9fc804 100644 --- a/libavcodec/pthread_slice.c +++ b/libavcodec/pthread_slice.c @@ -193,6 +193,12 @@ int ff_slice_thread_init(AVCodecContext *avctx) w32thread_init(); #endif +// We cannot do this in the encoder init as the threads are created before +if (av_codec_is_encoder(avctx->codec) && +avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && +avctx->height > 2800) +thread_count = avctx->thread_count = 1; + if (!thread_count) { int nb_cpus = av_cpu_count(); if (avctx->height) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat: Document urls a bit
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sat Jan 23 00:35:46 2016 +0100| [41f97fe378e3d2b79feaa1460e85865edafe08f9] | committer: Michael Niedermayer avformat: Document urls a bit Spell-checked-by: Moritz Barsnick Signed-off-by: Michael Niedermayer (cherry picked from commit 3130556c0eb09f3da3c9de6473a97937a4648d62) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41f97fe378e3d2b79feaa1460e85865edafe08f9 --- libavformat/avformat.h | 12 1 file changed, 12 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 35867a5..744bce2 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -78,6 +78,18 @@ * if its AVClass is non-NULL, and the protocols layer. See the discussion on * nesting in @ref avoptions documentation to learn how to access those. * + * @section urls + * URL strings in libavformat are made of a scheme/protocol, a ':', and a + * scheme specific string. URLs without a scheme and ':' used for local files + * are supported but deprecated. "file:" should be used for local files. + * + * It is important that the scheme string is not taken from untrusted + * sources without checks. + * + * Note that some schemes/protocols are quite powerful, allowing access to + * both local and remote files, parts of them, concatenations of them, local + * audio and video devices and so on. + * * @defgroup lavf_decoding Demuxing * @{ * Demuxers read a media file and split it into chunks of data (@em packets). A ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/img2dec: do not interpret the filename by default if a IO context has been opened
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 11:21:44 2016 +0100| [4180a83892b498ecd6e42cfc2c330e2684d2b817] | committer: Michael Niedermayer avformat/img2dec: do not interpret the filename by default if a IO context has been opened With this, user applications which use custom IO and have set a IO context will not have their already opened IO context ignored and glob/seq being interpreted Comments and tests from maintainers of user apps are welcome! Liked-by: wm4 Signed-off-by: Michael Niedermayer (cherry picked from commit 7ccedc1c78c9a5140758f515d46ce23de6e6a7d2) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4180a83892b498ecd6e42cfc2c330e2684d2b817 --- libavformat/img2.h|3 ++- libavformat/img2dec.c |9 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libavformat/img2.h b/libavformat/img2.h index f6b9dd9..a9678d1 100644 --- a/libavformat/img2.h +++ b/libavformat/img2.h @@ -34,7 +34,8 @@ enum PatternType { PT_GLOB_SEQUENCE, PT_GLOB, PT_SEQUENCE, -PT_NONE +PT_NONE, +PT_DEFAULT }; typedef struct VideoDemuxData { diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index f9ecf6f..67754f2 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -224,6 +224,13 @@ int ff_img_read_header(AVFormatContext *s1) } if (!s->is_pipe) { +if (s->pattern_type == PT_DEFAULT) { +if (s1->pb) { +s->pattern_type = PT_NONE; +} else +s->pattern_type = PT_GLOB_SEQUENCE; +} + if (s->pattern_type == PT_GLOB_SEQUENCE) { s->use_glob = is_glob(s->path); if (s->use_glob) { @@ -550,7 +557,7 @@ const AVOption ff_img_options[] = { { "framerate","set the video framerate", OFFSET(framerate),AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC }, { "loop", "force loop over input file sequence", OFFSET(loop), AV_OPT_TYPE_INT,{.i64 = 0 }, 0, 1, DEC }, -{ "pattern_type", "set pattern type", OFFSET(pattern_type), AV_OPT_TYPE_INT,{.i64=PT_GLOB_SEQUENCE}, 0, INT_MAX, DEC, "pattern_type"}, +{ "pattern_type", "set pattern type", OFFSET(pattern_type), AV_OPT_TYPE_INT,{.i64=PT_DEFAULT}, 0, INT_MAX, DEC, "pattern_type"}, { "glob_sequence","select glob/sequence pattern type", 0, AV_OPT_TYPE_CONST, {.i64=PT_GLOB_SEQUENCE}, INT_MIN, INT_MAX, DEC, "pattern_type" }, { "glob", "select glob pattern type",0, AV_OPT_TYPE_CONST, {.i64=PT_GLOB }, INT_MIN, INT_MAX, DEC, "pattern_type" }, { "sequence", "select sequence pattern type",0, AV_OPT_TYPE_CONST, {.i64=PT_SEQUENCE }, INT_MIN, INT_MAX, DEC, "pattern_type" }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/flacenc: fix calculation of bits required in case of custom sample rate
ffmpeg | branch: release/2.7 | Paul B Mahol | Sun Jan 24 20:47:49 2016 +0100| [d8b37664d524251ac524c780c0f978fb48ce4b2d] | committer: Michael Niedermayer avcodec/flacenc: fix calculation of bits required in case of custom sample rate Sample rate of 11025 takes 16 bits but previous code would pick only 8. Fixes assertion failure. Reviewed-by: Rostislav Pehlivanov Signed-off-by: Paul B Mahol (cherry picked from commit 3e7d6849120d61bb354376d52786c26f20e20835) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8b37664d524251ac524c780c0f978fb48ce4b2d --- libavcodec/flacenc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 29bd999..35904ab 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1021,7 +1021,7 @@ static int count_frame_header(FlacEncodeContext *s) count += 16; /* explicit sample rate */ -count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12)) * 8; +count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12) * 2) * 8; /* frame header CRC-8 */ count += 8; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale/swscale: Add some sanity checks for srcSlice* parameters
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 17 18:57:01 2016 +0100| [1b6390dd5be9f4edae0230c18c462d91d185ff16] | committer: Michael Niedermayer swscale/swscale: Add some sanity checks for srcSlice* parameters Signed-off-by: Michael Niedermayer (cherry picked from commit 321e85e1769ca1fc1567025ae264760790ee7fc9) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b6390dd5be9f4edae0230c18c462d91d185ff16 --- libswscale/swscale.c |8 1 file changed, 8 insertions(+) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 5312016..c3a14b7 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -919,12 +919,20 @@ int attribute_align_arg sws_scale(struct SwsContext *c, const uint8_t *src2[4]; uint8_t *dst2[4]; uint8_t *rgb0_tmp = NULL; +int macro_height = isBayer(c->srcFormat) ? 2 : (1 << c->chrSrcVSubSample); if (!srcStride || !dstStride || !dst || !srcSlice) { av_log(c, AV_LOG_ERROR, "One of the input parameters to sws_scale() is NULL, please check the calling code\n"); return 0; } +if ((srcSliceY & (macro_height-1)) || +((srcSliceH& (macro_height-1)) && srcSliceY + srcSliceH != c->srcH) || +srcSliceY + srcSliceH > c->srcH) { +av_log(c, AV_LOG_ERROR, "Slice parameters %d, %d are invalid\n", srcSliceY, srcSliceH); +return AVERROR(EINVAL); +} + if (c->gamma_flag && c->cascaded_context[0]) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov: Add an option to toggle dref opening
ffmpeg | branch: release/2.7 | Derek Buitenhuis | Fri Jan 15 17:03:49 2016 +| [c6ab367dbe7303c657835ff6d5ce2e66119e8ee7] | committer: Michael Niedermayer mov: Add an option to toggle dref opening This feature is mostly only used by NLE software, and is both of dubious value being enabled by default, and a possible security risk. Signed-off-by: Derek Buitenhuis Signed-off-by: Michael Niedermayer (cherry picked from commit 712d962a6a29b1099cd872cfb07867175a93ac4c) Conflicts: libavformat/isom.h libavformat/mov.c libavformat/version.h Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6ab367dbe7303c657835ff6d5ce2e66119e8ee7 --- libavformat/isom.h |1 + libavformat/mov.c | 22 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index 5d48989..da3285e 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -198,6 +198,7 @@ typedef struct MOVContext { MOVFragmentIndex** fragment_index_data; unsigned fragment_index_count; int atom_depth; +int enable_drefs; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index 65c4461..1f122b4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2801,13 +2801,23 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (sc->dref_id-1 < sc->drefs_count && sc->drefs[sc->dref_id-1].path) { MOVDref *dref = &sc->drefs[sc->dref_id - 1]; -if (mov_open_dref(c, &sc->pb, c->fc->filename, dref, - &c->fc->interrupt_callback) < 0) -av_log(c->fc, AV_LOG_ERROR, - "stream %d, error opening alias: path='%s', dir='%s', " - "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d\n", +if (c->enable_drefs) { +if (mov_open_dref(c, &sc->pb, c->fc->filename, dref, + &c->fc->interrupt_callback) < 0) +av_log(c->fc, AV_LOG_ERROR, + "stream %d, error opening alias: path='%s', dir='%s', " + "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d\n", + st->index, dref->path, dref->dir, dref->filename, + dref->volume, dref->nlvl_from, dref->nlvl_to); +} else { +av_log(c->fc, AV_LOG_WARNING, + "Skipped opening external track: " + "stream %d, alias: path='%s', dir='%s', " + "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d." + "Set enable_drefs to allow this.\n", st->index, dref->path, dref->dir, dref->filename, dref->volume, dref->nlvl_from, dref->nlvl_to); +} } else { sc->pb = c->fc->pb; sc->pb_is_copied = 1; @@ -4537,6 +4547,8 @@ static const AVOption mov_options[] = { AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS }, { "export_xmp", "Export full XMP metadata", OFFSET(export_xmp), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS }, +{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_INT, +{.i64 = 0}, 0, 1, FLAGS }, { NULL }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 17 15:39:11 2016 +0100| [6fabd858659994b98589bfaf42f700e1c5b85da8] | committer: Michael Niedermayer avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get() Fixes: 55d71971da50365d542ed14b65565fe1/signal_sigsegv_4765a4_8499_f146af090a94f591d6254515c7700ef5.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 158f0545d81b2aca1c936490f80d13988616910e) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fabd858659994b98589bfaf42f700e1c5b85da8 --- libavcodec/ass_split.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 2458cb9..5b6d7af 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -523,7 +523,7 @@ ASSStyle *ff_ass_style_get(ASSSplitContext *ctx, const char *style) if (!style || !*style) style = "Default"; for (i=0; istyles_count; i++) -if (!strcmp(ass->styles[i].name, style)) +if (ass->styles[i].name && !strcmp(ass->styles[i].name, style)) return ass->styles + i; return NULL; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/img2dec: Use AVOpenCallback
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 02:35:56 2016 +0100| [8c2f006d10c7e8df42d6ee57060bd1ce6ff3298f] | committer: Michael Niedermayer avformat/img2dec: Use AVOpenCallback Signed-off-by: Michael Niedermayer (cherry picked from commit b750b67d13696fdbcd62ce7238eb2826f2be4686) Conflicts: libavformat/img2dec.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c2f006d10c7e8df42d6ee57060bd1ce6ff3298f --- libavformat/img2dec.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 67754f2..1ee6a0f 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -376,6 +376,10 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) int size[3] = { 0 }, ret[3] = { 0 }; AVIOContext *f[3] = { NULL }; AVCodecContext *codec = s1->streams[0]->codec; +AVOpenCallback open_func = s1->open_cb; + +if (!open_func) +open_func = ffio_open2_wrapper; if (!s->is_pipe) { /* loop over input */ @@ -397,7 +401,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) return AVERROR(EIO); } for (i = 0; i < 3; i++) { -if (avio_open2(&f[i], filename, AVIO_FLAG_READ, +if (open_func(s1, &f[i], filename, AVIO_FLAG_READ, &s1->interrupt_callback, NULL) < 0) { if (i >= 1) break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/tiff: Check subsample & rps values more completely
ffmpeg | branch: release/2.7 | Michael Niedermayer | Mon Jan 18 03:31:25 2016 +0100| [eb0872335f0118d7081f05df7f441d8edf0171cd] | committer: Michael Niedermayer avcodec/tiff: Check subsample & rps values more completely Fixes out of array access Fixes: 83aedfb29af669c4d6e10f1bfad974d2/asan_heap-oob_1ab42fe_4984_9f6ec14462f8d8a00ea24b320572a963.tif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 89f464e9c229006e16f6bb5403c5529fdd0a9edd) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb0872335f0118d7081f05df7f441d8edf0171cd --- libavcodec/tiff.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 7a7f9b7..bdf5ed9 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1008,8 +1008,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) av_log(s->avctx, AV_LOG_ERROR, "subsample count invalid\n"); return AVERROR_INVALIDDATA; } -for (i = 0; i < count; i++) +for (i = 0; i < count; i++) { s->subsampling[i] = ff_tget(&s->gb, type, s->le); +if (s->subsampling[i] <= 0) { +av_log(s->avctx, AV_LOG_ERROR, "subsampling %d is invalid\n", s->subsampling[i]); +return AVERROR_INVALIDDATA; +} +} break; case TIFF_T4OPTIONS: if (s->compr == TIFF_G3) @@ -1257,7 +1262,7 @@ static int decode_frame(AVCodecContext *avctx, avpkt->size - s->strippos); } -if (s->rps <= 0) { +if (s->rps <= 0 || s->rps % s->subsampling[1]) { av_log(avctx, AV_LOG_ERROR, "rps %d invalid\n", s->rps); return AVERROR_INVALIDDATA; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/gif: Fix lzw buffer size
ffmpeg | branch: release/2.7 | Michael Niedermayer | Mon Jan 18 19:20:03 2016 +0100| [40e846bb3f8e6fcc0133f1da24ef30de0a6c5f16] | committer: Michael Niedermayer avcodec/gif: Fix lzw buffer size Fixes out of array access Fixes: aaa479088e6fb40b04837b3119f47b04/asan_heap-oob_e38c68_8576_9d653078b2470700e2834636f12ff557.tga Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 03d83ba34b2070878909eae18dfac0f519503777) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40e846bb3f8e6fcc0133f1da24ef30de0a6c5f16 --- libavcodec/gif.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/gif.c b/libavcodec/gif.c index cf5d438..e553375 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -43,6 +43,7 @@ typedef struct GIFContext { const AVClass *class; LZWState *lzw; uint8_t *buf; +int buf_size; AVFrame *last_frame; int flags; uint32_t palette[AVPALETTE_COUNT]; ///< local reference palette for !pal8 @@ -174,7 +175,7 @@ static int gif_image_write_image(AVCodecContext *avctx, bytestream_put_byte(bytestream, 0x08); -ff_lzw_encode_init(s->lzw, s->buf, 2 * width * height, +ff_lzw_encode_init(s->lzw, s->buf, s->buf_size, 12, FF_LZW_GIF, put_bits); ptr = buf + y_start*linesize + x_start; @@ -232,7 +233,8 @@ static av_cold int gif_encode_init(AVCodecContext *avctx) s->transparent_index = -1; s->lzw = av_mallocz(ff_lzw_encode_state_size); -s->buf = av_malloc(avctx->width*avctx->height*2); +s->buf_size = avctx->width*avctx->height*2 + 1000; +s->buf = av_malloc(s->buf_size); s->tmpl = av_malloc(avctx->width); if (!s->tmpl || !s->buf || !s->lzw) return AVERROR(ENOMEM); @@ -324,6 +326,7 @@ static int gif_encode_close(AVCodecContext *avctx) av_freep(&s->lzw); av_freep(&s->buf); +s->buf_size = 0; av_frame_free(&s->last_frame); av_freep(&s->tmpl); return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avformat: Replace some references to filenames by urls
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 21:01:08 2016 +0100| [874945c7b93e841b0fd1a8c9b209fb7d12f8255c] | committer: Michael Niedermayer avformat/avformat: Replace some references to filenames by urls Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 41e07390e04cf369d84f0cc7ff5858c273290770) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=874945c7b93e841b0fd1a8c9b209fb7d12f8255c --- libavformat/avformat.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 4b270db..35867a5 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -88,10 +88,10 @@ * cleanup. * * @section lavf_decoding_open Opening a media file - * The minimum information required to open a file is its URL or filename, which + * The minimum information required to open a file is its URL, which * is passed to avformat_open_input(), as in the following code: * @code - * const char*url = "in.mp3"; + * const char*url = "file:in.mp3"; * AVFormatContext *s = NULL; * int ret = avformat_open_input(&s, url, NULL, NULL); * if (ret < 0) @@ -2033,7 +2033,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score * * @param pb the bytestream to probe * @param fmt the input format is put here - * @param filename the filename of the stream + * @param url the url of the stream * @param logctx the log context * @param offset the offset within the bytestream to probe from * @param max_probe_size the maximum probe buffer size (zero for default) @@ -2042,14 +2042,14 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score * AVERROR code otherwise */ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, - const char *filename, void *logctx, + const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); /** * Like av_probe_input_buffer2() but returns 0 on success */ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, - const char *filename, void *logctx, + const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); /** @@ -2060,7 +2060,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, * May be a pointer to NULL, in which case an AVFormatContext is allocated by this * function and written into ps. * Note that a user-supplied AVFormatContext will be freed on failure. - * @param filename Name of the stream to open. + * @param url URL of the stream to open. * @param fmt If non-NULL, this parameter forces a specific input format. *Otherwise the format is autodetected. * @param options A dictionary filled with AVFormatContext and demuxer-private options. @@ -2071,7 +2071,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, * * @note If you want to use custom IO, preallocate the format context and set its pb field. */ -int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options); +int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options); attribute_deprecated int av_demuxer_open(AVFormatContext *ic); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/libquvi: Set default demuxer and protocol limitations
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 15:25:32 2016 +0100| [197c0f618acff6a7e386fb867114f6af6e91adac] | committer: Michael Niedermayer avformat/libquvi: Set default demuxer and protocol limitations Signed-off-by: Michael Niedermayer (cherry picked from commit 15cc98a0f38ac45444d177186cfbf28e14bd5f1f) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=197c0f618acff6a7e386fb867114f6af6e91adac --- libavformat/libquvi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c index 7151694..1e5c8bc 100644 --- a/libavformat/libquvi.c +++ b/libavformat/libquvi.c @@ -95,6 +95,20 @@ static int libquvi_read_header(AVFormatContext *s) goto err_quvi_cleanup; } +if (!qc->fmtctx->format_whitelist) { +qc->fmtctx->format_whitelist = av_strdup("avi,asf,flv,mov,mpeg,mpegts,aac,h264,hevc,mp3,ogg,matroska,mxf,mp2"); +if (!qc->fmtctx->format_whitelist) { +avformat_free_context(qc->fmtctx); +qc->fmtctx = NULL; +goto err_quvi_cleanup; +} +} +if (strncmp(media_url, "http:", 5) && strncmp(media_url, "https:", 6)) { +avformat_free_context(qc->fmtctx); +qc->fmtctx = NULL; +goto err_quvi_cleanup; +} + ret = avformat_open_input(&qc->fmtctx, media_url, NULL, NULL); if (ret < 0) goto err_quvi_cleanup; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/opt: check for and handle errors in av_opt_set_dict2()
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 24 03:42:46 2016 +0100| [b54b8a628c8baa3f599048e4161e7b9bd6f45c85] | committer: Michael Niedermayer avutil/opt: check for and handle errors in av_opt_set_dict2() Previously errors could result in random entries to be lost. Signed-off-by: Michael Niedermayer (cherry picked from commit f3ace85d8869c32d28d064002d0d912e3624) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b54b8a628c8baa3f599048e4161e7b9bd6f45c85 --- libavutil/opt.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 62db1b5..41741b5 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1464,10 +1464,11 @@ int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags) while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) { ret = av_opt_set(obj, t->key, t->value, search_flags); if (ret == AVERROR_OPTION_NOT_FOUND) -av_dict_set(&tmp, t->key, t->value, 0); -else if (ret < 0) { +ret = av_dict_set(&tmp, t->key, t->value, 0); +if (ret < 0) { av_log(obj, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value); -break; +av_dict_free(&tmp); +return ret; } ret = 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/wmaenc: Check ff_wma_init() for failure
ffmpeg | branch: release/2.7 | Michael Niedermayer | Thu Jan 21 02:38:05 2016 +0100| [974f9d255d28acfe8b482836e466135bc42a94d0] | committer: Michael Niedermayer avcodec/wmaenc: Check ff_wma_init() for failure Fixes null pointer dereference Fixes: c4faf8280ba366bf00a79d425f2910a8/signal_sigsegv_1f96477_5177_1448ba7e4125faceb966f44ceb69abfa.qcp Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 19e456d48c90a1e3ceeb9e6241383384cc73dfdf) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=974f9d255d28acfe8b482836e466135bc42a94d0 --- libavcodec/wmaenc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index b922acd..9361855 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -32,6 +32,7 @@ static av_cold int encode_init(AVCodecContext *avctx) WMACodecContext *s = avctx->priv_data; int i, flags1, flags2, block_align; uint8_t *extradata; +int ret; s->avctx = avctx; @@ -82,7 +83,8 @@ static av_cold int encode_init(AVCodecContext *avctx) if (avctx->channels == 2) s->ms_stereo = 1; -ff_wma_init(avctx, flags2); +if ((ret = ff_wma_init(avctx, flags2)) < 0) +return ret; /* init MDCT */ for (i = 0; i < s->nb_block_sizes; i++) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/concat: Check protocol prefix
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 11:10:27 2016 +0100| [573a7b4c670681fa31607201dfe1aa81aee01440] | committer: Michael Niedermayer avformat/concat: Check protocol prefix Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 8e32d014322eada1812af268d7ea9d53169d279c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=573a7b4c670681fa31607201dfe1aa81aee01440 --- libavformat/concat.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/concat.c b/libavformat/concat.c index 81fe970..7bcc279 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -65,7 +65,10 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) struct concat_data *data = h->priv_data; struct concat_nodes *nodes; -av_strstart(uri, "concat:", &uri); +if (!av_strstart(uri, "concat:", &uri)) { +av_log(h, AV_LOG_ERROR, "URL %s lacks prefix\n", uri); +return AVERROR(EINVAL); +} for (i = 0, len = 1; uri[i]; i++) { if (uri[i] == *AV_CAT_SEPARATOR) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Update for 2.7.6
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 31 00:42:09 2016 +0100| [bbea86d80922148598527018dc1e9488fdca73a2] | committer: Michael Niedermayer Update for 2.7.6 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbea86d80922148598527018dc1e9488fdca73a2 --- Changelog| 36 RELEASE |2 +- doc/Doxyfile |2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 990a348..482f7cb 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,42 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.7.6 +- avcodec/jpeg2000dec: More completely check cdef +- avutil/opt: check for and handle errors in av_opt_set_dict2() +- avcodec/flacenc: fix calculation of bits required in case of custom sample rate +- avformat: Document urls a bit +- avformat/libquvi: Set default demuxer and protocol limitations +- avformat/concat: Check protocol prefix +- doc/demuxers: Document enable_drefs and use_absolute_path +- avcodec/mjpegdec: Check for end for both bytes in unescaping +- avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer() +- avformat/avformat: Replace some references to filenames by urls +- avcodec/wmaenc: Check ff_wma_init() for failure +- avcodec/mpeg12enc: Move high resolution thread check to before initializing threads +- avformat/img2dec: Use AVOpenCallback +- avformat/avio: Limit url option parsing to the documented cases +- avformat/img2dec: do not interpret the filename by default if a IO context has been opened +- avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get() +- mov: Add an option to toggle dref opening +- avcodec/gif: Fix lzw buffer size +- avcodec/put_bits: Assert buf_ptr in flush_put_bits() +- avcodec/tiff: Check subsample & rps values more completely +- swscale/swscale: Add some sanity checks for srcSlice* parameters +- swscale/x86/rgb2rgb_template: Fix planar2x() for short width +- swscale/swscale_unscaled: Fix odd height inputs for bayer_to_yv12_wrapper() +- swscale/swscale_unscaled: Fix odd height inputs for bayer_to_rgb24_wrapper() +- avcodec/aacenc: Check both channels for finiteness +- swscale/swscale-test: Fix slice height in random reference data creation. +- dca: fix misaligned access in avpriv_dca_convert_bitstream +- brstm: fix missing closing brace +- brstm: also allocate b->table in read_packet +- brstm: make sure an ADPC chunk was read for adpcm_thp +- vorbisdec: reject rangebits 0 with non-0 partitions +- vorbisdec: reject channel mapping with less than two channels +- ffmdec: reset packet_end in case of failure +- avformat/ipmovie: put video decoding_map_size into packet and use it in decoder + version 2.7.5 - configure: bump copyright year to 2016 - avformat/hls: Even stricter URL checks diff --git a/RELEASE b/RELEASE index a603bb5..49cdd66 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.7.5 +2.7.6 diff --git a/doc/Doxyfile b/doc/Doxyfile index 1b8e500..32099c4 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.7.5 +PROJECT_NUMBER = 2.7.6 # 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] swscale/swscale-test: Fix slice height in random reference data creation.
ffmpeg | branch: release/2.7 | Michael Niedermayer | Mon Aug 17 03:08:10 2015 +0200| [4b17205c775608247e6726ecad018de0b6a8bc20] | committer: Michael Niedermayer swscale/swscale-test: Fix slice height in random reference data creation. Found-by: Pedro Arthur Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b17205c775608247e6726ecad018de0b6a8bc20 --- libswscale/swscale-test.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c index 661ff5b..b79bb23 100644 --- a/libswscale/swscale-test.c +++ b/libswscale/swscale-test.c @@ -399,7 +399,7 @@ bad_option: for (y = 0; y < H; y++) for (x = 0; x < W * 4; x++) rgb_data[ x + y * 4 * W] = av_lfg_get(&rand); -sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride); +sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, src, stride); sws_freeContext(sws); av_free(rgb_data); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avio: Limit url option parsing to the documented cases
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 09:43:54 2016 +0100| [3cd17b9b5c4301405c99bcb6897f7ebf975ad1ea] | committer: Michael Niedermayer avformat/avio: Limit url option parsing to the documented cases This feature is not know much or used much AFAIK, and it might be helpfull in exploits. No specific case is known where it can be used in an exploit though subsequent commits depend on this commit though Signed-off-by: Michael Niedermayer (cherry picked from commit 984d58a3440d513f66344b5332f6b589c0a6bbc6) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cd17b9b5c4301405c99bcb6897f7ebf975ad1ea --- libavformat/avio.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 261ff2a..822f87c 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -156,9 +156,16 @@ static int url_alloc_for_protocol(URLContext **puc, struct URLProtocol *up, char sep= *++p; char *key, *val; p++; + +if (strcmp(up->name, "subfile")) +ret = AVERROR(EINVAL); + while(ret >= 0 && (key= strchr(p, sep)) && ppriv_data, p, key+1, 0); +if (strcmp(p, "start") && strcmp(p, "end")) { +ret = AVERROR_OPTION_NOT_FOUND; +} else +ret= av_opt_set(uc->priv_data, p, key+1, 0); if (ret == AVERROR_OPTION_NOT_FOUND) av_log(uc, AV_LOG_ERROR, "Key '%s' not found.\n", p); *val= *key= sep; @@ -223,7 +230,7 @@ static struct URLProtocol *url_find_protocol(const char *filename) size_t proto_len = strspn(filename, URL_SCHEME_CHARS); if (filename[proto_len] != ':' && -(filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) || +(strncmp(filename, "subfile,", 8) || !strchr(filename + proto_len + 1, ':')) || is_dos_path(filename)) strcpy(proto_str, "file"); else ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/aacenc: Check both channels for finiteness
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sat Jan 16 18:32:07 2016 +0100| [9d230f4666ac98c35a1a42b1a91e934fa563a579] | committer: Michael Niedermayer avcodec/aacenc: Check both channels for finiteness Fixes null pointer dereference Fixes: 10412fc52ecc6eab40ed67f82ca7b372/signal_sigsegv_2618c99_2129_f808373959e46afb165593332799ffbc.aif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 057549a9ccc9fd32df71678e6abe69e10668186a) Conflicts: libavcodec/aacenc.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d230f4666ac98c35a1a42b1a91e934fa563a579 --- libavcodec/aacenc.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 897c3a1..47fc1be 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -589,8 +589,16 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ics->group_len[w] = wi[ch].grouping[w]; apply_window_and_mdct(s, &cpe->ch[ch], overlap); -if (isnan(cpe->ch->coeffs[0])) { -av_log(avctx, AV_LOG_ERROR, "Input contains NaN\n"); + +if (isnan(cpe->ch[ch].coeffs[0]) || isinf(cpe->ch[ch].coeffs[ 0]) || +isnan(cpe->ch[ch].coeffs[ 128]) || isinf(cpe->ch[ch].coeffs[ 128]) || +isnan(cpe->ch[ch].coeffs[2*128]) || isinf(cpe->ch[ch].coeffs[2*128]) || +isnan(cpe->ch[ch].coeffs[3*128]) || isinf(cpe->ch[ch].coeffs[3*128]) || +isnan(cpe->ch[ch].coeffs[4*128]) || isinf(cpe->ch[ch].coeffs[4*128]) || +isnan(cpe->ch[ch].coeffs[5*128]) || isinf(cpe->ch[ch].coeffs[5*128]) || +isnan(cpe->ch[ch].coeffs[6*128]) || isinf(cpe->ch[ch].coeffs[6*128]) || +isnan(cpe->ch[ch].coeffs[7*128]) || isinf(cpe->ch[ch].coeffs[7*128])) { +av_log(avctx, AV_LOG_ERROR, "Input contains NaN/+-Inf\n"); return AVERROR(EINVAL); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale/swscale_unscaled: Fix odd height inputs for bayer_to_yv12_wrapper( )
ffmpeg | branch: release/2.7 | Michael Niedermayer | Sun Jan 17 00:55:44 2016 +0100| [1a88eef93bd1a175465d61d162d42e4921549ba2] | committer: Michael Niedermayer swscale/swscale_unscaled: Fix odd height inputs for bayer_to_yv12_wrapper() Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine Fixes out of array read Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 757248ea3cd917a7755cb15f817a9b1f15578718) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a88eef93bd1a175465d61d162d42e4921549ba2 --- libswscale/swscale_unscaled.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 56e3933..1c75063 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -1110,6 +1110,8 @@ static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStr default: return 0; } +av_assert0(srcSliceH > 1); + copy(srcPtr, srcStride[0], dstY, dstU, dstV, dstStride[0], c->srcW, c->input_rgb2yuv_table); srcPtr += 2 * srcStride[0]; dstY += 2 * dstStride[0]; @@ -1124,7 +1126,10 @@ static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStr dstV += dstStride[1]; } -copy(srcPtr, srcStride[0], dstY, dstU, dstV, dstStride[0], c->srcW, c->input_rgb2yuv_table); +if (i + 1 == srcSliceH) { +copy(srcPtr, -srcStride[0], dstY, dstU, dstV, -dstStride[0], c->srcW, c->input_rgb2yuv_table); +} else if (i < srcSliceH) +copy(srcPtr, srcStride[0], dstY, dstU, dstV, dstStride[0], c->srcW, c->input_rgb2yuv_table); return srcSliceH; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/put_bits: Assert buf_ptr in flush_put_bits()
ffmpeg | branch: release/2.7 | Michael Niedermayer | Mon Jan 18 17:13:55 2016 +0100| [f6755e5e19eb84de3e9f6838406d9f1f240c02b9] | committer: Michael Niedermayer avcodec/put_bits: Assert buf_ptr in flush_put_bits() Signed-off-by: Michael Niedermayer (cherry picked from commit 3ef5de0f19774e2c3dd9b08ba2e8ab7241a4862a) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6755e5e19eb84de3e9f6838406d9f1f240c02b9 --- libavcodec/put_bits.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 0db8a03..68ed391 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -105,7 +105,7 @@ static inline void flush_put_bits(PutBitContext *s) s->bit_buf <<= s->bit_left; #endif while (s->bit_left < 32) { -/* XXX: should test end of buffer */ +av_assert0(s->buf_ptr < s->buf_end); #ifdef BITSTREAM_WRITER_LE *s->buf_ptr++ = s->bit_buf; s->bit_buf >>= 8; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/jpeg2000dec: More completely check cdef
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 27 17:13:10 2016 +0100| [12f256a729a8d9f1f1ae37dc14fb4437b935b133] | committer: Michael Niedermayer avcodec/jpeg2000dec: More completely check cdef Fixes out of array access Fixes: j2k-poc.bin Found-by: Lucas Leong Signed-off-by: Michael Niedermayer (cherry picked from commit 0aada30510d809bccfd539a90ea37b61188f2cb4) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12f256a729a8d9f1f1ae37dc14fb4437b935b133 --- libavcodec/jpeg2000dec.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 54006af..9e6e1b5 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1286,11 +1286,15 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, if (tile->codsty[0].mct) mct_decode(s, tile); -if (s->cdef[0] < 0) { -for (x = 0; x < s->ncomponents; x++) -s->cdef[x] = x + 1; -if ((s->ncomponents & 1) == 0) -s->cdef[s->ncomponents-1] = 0; +for (x = 0; x < s->ncomponents; x++) { +if (s->cdef[x] < 0) { +for (x = 0; x < s->ncomponents; x++) { +s->cdef[x] = x + 1; +} +if ((s->ncomponents & 1) == 0) +s->cdef[s->ncomponents-1] = 0; +break; +} } if (s->precision <= 8) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()
ffmpeg | branch: release/2.7 | Michael Niedermayer | Thu Jan 21 15:39:43 2016 +0100| [e229fbf5ce8400fde181758171c6ac911432ddfd] | committer: Michael Niedermayer avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer() Fixes assertion failure Fixes: 6568d187979ce17878b6fe5fbbb89142/signal_sigabrt_76ae7cb7_7176_564bbc6741bdcf907f5c4e685c9a77a2.mpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit b65efbc0f4195421c15d2a6c228d331eec5b31c3) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e229fbf5ce8400fde181758171c6ac911432ddfd --- libavcodec/mpegvideo_enc.c |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index c4e4482..b2112c1 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2740,6 +2740,11 @@ int ff_mpv_reallocate_putbitbuffer(MpegEncContext *s, size_t threshold, size_t s uint8_t *new_buffer = NULL; int new_buffer_size = 0; +if ((s->avctx->internal->byte_buffer_size + size_increase) >= INT_MAX/8) { +av_log(s->avctx, AV_LOG_ERROR, "Cannot reallocate putbit buffer\n"); +return AVERROR(ENOMEM); +} + av_fast_padded_malloc(&new_buffer, &new_buffer_size, s->avctx->internal->byte_buffer_size + size_increase); if (!new_buffer) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/demuxers: Document enable_drefs and use_absolute_path
ffmpeg | branch: release/2.7 | Michael Niedermayer | Wed Jan 20 16:49:43 2016 +0100| [3c7597f2e9c98fb4bcb62b0bd8262be36bbcd0b7] | committer: Michael Niedermayer doc/demuxers: Document enable_drefs and use_absolute_path Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 9a8034b8bc1d1cd7a8889dc385d41744be47b159) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c7597f2e9c98fb4bcb62b0bd8262be36bbcd0b7 --- doc/demuxers.texi | 17 + 1 file changed, 17 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 35a1561..6f9effc 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -369,6 +369,23 @@ ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv @end example @end itemize +@section mov/mp4/3gp/Quicktme + +Quicktime / MP4 demuxer. + +This demuxer accepts the following options: +@table @option +@item enable_drefs +Enable loading of external tracks, disabled by default. +Enabling this can theoretically leak information in some use cases. + +@item use_absolute_path +Allows loading of external tracks via absolute paths, disabled by default. +Enabling this poses a security risk. It should only be enabled if the source +is known to be non malicious. + +@end table + @section mpegts MPEG-2 transport stream demuxer. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mjpegdec: Check for end for both bytes in unescaping
ffmpeg | branch: release/2.7 | Michael Niedermayer | Thu Jan 21 21:01:47 2016 +0100| [965a8bda9422eb9fcb2940c0c9776c5af3f95d0f] | committer: Michael Niedermayer avcodec/mjpegdec: Check for end for both bytes in unescaping Fixes assertion failure Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_76ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 509c9e74e548139285f30ed8dcc9baf1d64359fa) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=965a8bda9422eb9fcb2940c0c9776c5af3f95d0f --- libavcodec/mjpegdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 2e0a568..9d080e8 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1961,7 +1961,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, while (b < t) { uint8_t x = src[b++]; put_bits(&pb, 8, x); -if (x == 0xFF) { +if (x == 0xFF && b < t) { x = src[b++]; if (x & 0x80) { av_log(s->avctx, AV_LOG_WARNING, "Invalid escape sequence\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/rawdec: Switch to monowhite if there is no palette & bpp=1
ffmpeg | branch: master | Michael Niedermayer | Sun Jan 31 04:10:02 2016 +0100| [6ffac5d33d334f847150356293ecb6f9eaf69e15] | committer: Michael Niedermayer avcodec/rawdec: Switch to monowhite if there is no palette & bpp=1 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ffac5d33d334f847150356293ecb6f9eaf69e15 --- libavcodec/rawdec.c | 19 ++- tests/ref/vsynth/vsynth1-bpp1 |4 ++-- tests/ref/vsynth/vsynth2-bpp1 |4 ++-- tests/ref/vsynth/vsynth3-bpp1 |4 ++-- tests/ref/vsynth/vsynth_lena-bpp1 |4 ++-- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 3536943..93cbedf 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -112,6 +112,9 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) avctx->pix_fmt == AV_PIX_FMT_YUYV422) context->is_yuv2 = 1; +if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && avctx->bits_per_coded_sample == 1) +avctx->pix_fmt = AV_PIX_FMT_NONE; + return 0; } @@ -152,7 +155,7 @@ MKSCALE16(scale16le, AV_RL16, AV_WL16) static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { -const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); +const AVPixFmtDescriptor *desc; RawVideoContext *context = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; @@ -173,6 +176,20 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, av_log(avctx, AV_LOG_ERROR, "Packet too small (%d) height (%d)\n", avpkt->size, avctx->height); return AVERROR_INVALIDDATA; } +if (avctx->pix_fmt == AV_PIX_FMT_NONE && +avctx->bits_per_coded_sample == 1 && +avctx->frame_number == 0 && +context->palette && +AV_RB64(context->palette->data) == 0x +) { +const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); +if (!pal) { +avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; +} else +avctx->pix_fmt = AV_PIX_FMT_PAL8; +} + +desc = av_pix_fmt_desc_get(avctx->pix_fmt); if ((avctx->bits_per_coded_sample == 8 || avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2 || avctx->bits_per_coded_sample == 1) && diff --git a/tests/ref/vsynth/vsynth1-bpp1 b/tests/ref/vsynth/vsynth1-bpp1 index 378f990..32dab11 100644 --- a/tests/ref/vsynth/vsynth1-bpp1 +++ b/tests/ref/vsynth/vsynth1-bpp1 @@ -1,4 +1,4 @@ 3e5e0f4afb3a0350440e86b1ea56cec9 *tests/data/fate/vsynth1-bpp1.avi 640452 tests/data/fate/vsynth1-bpp1.avi -853694f3c1aa3ef3807ab1fccbeefe7b *tests/data/fate/vsynth1-bpp1.out.rawvideo -stddev: 84.44 PSNR: 9.60 MAXDIFF: 221 bytes: 7603200/ 7603200 +ccef5f5d5b0392f1d01c200499dac657 *tests/data/fate/vsynth1-bpp1.out.rawvideo +stddev: 97.30 PSNR: 8.37 MAXDIFF: 237 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-bpp1 b/tests/ref/vsynth/vsynth2-bpp1 index ae8fd27..d010bbd 100644 --- a/tests/ref/vsynth/vsynth2-bpp1 +++ b/tests/ref/vsynth/vsynth2-bpp1 @@ -1,4 +1,4 @@ 771437c9038b44f4e2d4ff764c1c3821 *tests/data/fate/vsynth2-bpp1.avi 640452 tests/data/fate/vsynth2-bpp1.avi -94261fc8aa20130cbd4361e15b742ef7 *tests/data/fate/vsynth2-bpp1.out.rawvideo -stddev: 70.29 PSNR: 11.19 MAXDIFF: 221 bytes: 7603200/ 7603200 +ba70b5aebc786e625af6bd7f7ec82717 *tests/data/fate/vsynth2-bpp1.out.rawvideo +stddev: 81.63 PSNR: 9.89 MAXDIFF: 237 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth3-bpp1 b/tests/ref/vsynth/vsynth3-bpp1 index 6f71248..f84808a 100644 --- a/tests/ref/vsynth/vsynth3-bpp1 +++ b/tests/ref/vsynth/vsynth3-bpp1 @@ -1,4 +1,4 @@ a5e6d1eff2f6fc3bba31e3bb8753b905 *tests/data/fate/vsynth3-bpp1.avi 15352 tests/data/fate/vsynth3-bpp1.avi -79076b5fc43ee2a2284c0cde991d21f3 *tests/data/fate/vsynth3-bpp1.out.rawvideo -stddev: 84.88 PSNR: 9.55 MAXDIFF: 232 bytes:86700/86700 +75e8ee0c0b0ada4515455d9f29377a16 *tests/data/fate/vsynth3-bpp1.out.rawvideo +stddev: 97.70 PSNR: 8.33 MAXDIFF: 248 bytes:86700/86700 diff --git a/tests/ref/vsynth/vsynth_lena-bpp1 b/tests/ref/vsynth/vsynth_lena-bpp1 index 3e250a8..d4570c7 100644 --- a/tests/ref/vsynth/vsynth_lena-bpp1 +++ b/tests/ref/vsynth/vsynth_lena-bpp1 @@ -1,4 +1,4 @@ d53d08c755ffde5fca744f0f941bfcb1 *tests/data/fate/vsynth_lena-bpp1.avi 640452 tests/data/fate/vsynth_lena-bpp1.avi -dce624117fcd2b16f38e0a0a62b13fa7 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo -stddev: 83.18 PSNR: 9.73 MAXDIFF: 217 bytes: 7603200/ 7603200 +9a66df9009670b0a593d889975246c00 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo +stddev: 96.36 PSNR: 8.45 MAXDIFF: 233 bytes: 7603200/ 7603200 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmp