[FFmpeg-cvslog] avfilter/drawtext: fix frame mem leak
ffmpeg | branch: master | Ivan Efimov | Fri Apr 10 17:28:45 2015 +0300| [2051b401cc7e9ec9051c7f575d639944a9869b67] | committer: Michael Niedermayer avfilter/drawtext: fix frame mem leak Signed-off-by: Ivan Efimov Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2051b401cc7e9ec9051c7f575d639944a9869b67 --- libavfilter/vf_drawtext.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 37eb231..cf17a55 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1275,12 +1275,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) int ret; if (s->reload) { -if ((ret = load_textfile(ctx)) < 0) +if ((ret = load_textfile(ctx)) < 0) { +av_frame_free(&frame); return ret; +} #if CONFIG_LIBFRIBIDI if (s->text_shaping) -if ((ret = shape_text(ctx)) < 0) +if ((ret = shape_text(ctx)) < 0) { +av_frame_free(&frame); return ret; +} #endif } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mmal: Move system headers before local headers
ffmpeg | branch: master | wm4 | Mon Apr 13 19:17:59 2015 +0200| [2de7650451d90520135d8cf6f96caa0658824208] | committer: Diego Biurrun mmal: Move system headers before local headers Signed-off-by: Diego Biurrun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2de7650451d90520135d8cf6f96caa0658824208 --- libavcodec/mmaldec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index c59a496..1f29d2b 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -24,6 +24,12 @@ * MMAL Video Decoder */ +#include +#include +#include +#include +#include + #include "avcodec.h" #include "internal.h" #include "libavutil/atomic.h" @@ -33,12 +39,6 @@ #include "libavutil/opt.h" #include "libavutil/log.h" -#include -#include -#include -#include -#include - typedef struct FFBufferEntry { AVBufferRef *ref; void *data; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '2de7650451d90520135d8cf6f96caa0658824208'
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 13:28:19 2015 +0200| [7c521d4528927a51449ae8977413cda4d790c6fb] | committer: Michael Niedermayer Merge commit '2de7650451d90520135d8cf6f96caa0658824208' * commit '2de7650451d90520135d8cf6f96caa0658824208': mmal: Move system headers before local headers Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c521d4528927a51449ae8977413cda4d790c6fb --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mmal: Reference MMAL VC lib explicitly
ffmpeg | branch: master | wm4 | Mon Apr 13 19:18:00 2015 +0200| [49e531ff4706279c7eed774f2c8b896942924ce2] | committer: Diego Biurrun mmal: Reference MMAL VC lib explicitly This is optional, but ensures that linking with -Wl,--as-needed does not drop the library containing the MMAL VC driver. The driver normally "registers" itself in the library constructor, but since no symbols are explicitly referenced, the linker could remove it with --as-needed enabled. Signed-off-by: Diego Biurrun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49e531ff4706279c7eed774f2c8b896942924ce2 --- libavcodec/mmaldec.c |8 1 file changed, 8 insertions(+) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 1f29d2b..76d26bc 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "avcodec.h" #include "internal.h" @@ -182,6 +183,8 @@ static av_cold int ffmmal_close_decoder(AVCodecContext *avctx) if (ctx->bsfc) av_bitstream_filter_close(ctx->bsfc); +mmal_vc_deinit(); + return 0; } @@ -321,6 +324,11 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx) bcm_host_init(); +if (mmal_vc_init()) { +av_log(avctx, AV_LOG_ERROR, "Cannot initialize MMAL VC driver!\n"); +return AVERROR(ENOSYS); +} + if ((ret = ff_get_format(avctx, avctx->codec->pix_fmts)) < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '49e531ff4706279c7eed774f2c8b896942924ce2'
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 13:40:36 2015 +0200| [6e86ee97c8eeb44b6e428861a69f12f2074eeb0f] | committer: Michael Niedermayer Merge commit '49e531ff4706279c7eed774f2c8b896942924ce2' * commit '49e531ff4706279c7eed774f2c8b896942924ce2': mmal: Reference MMAL VC lib explicitly Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e86ee97c8eeb44b6e428861a69f12f2074eeb0f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea'
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 13:57:53 2015 +0200| [410317237663adf9d3f07dbbbf708a8dd49d693c] | committer: Michael Niedermayer Merge commit '13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea' * commit '13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea': mpeg4videodec: Remove useless messages Conflicts: libavcodec/mpeg4videodec.c not merged, the messages have been an important aid for debugging in old mpeg4 and help understanding bug reports Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=410317237663adf9d3f07dbbbf708a8dd49d693c --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpeg4videodec: Remove useless messages
ffmpeg | branch: master | wm4 | Mon Apr 13 19:35:54 2015 +0200| [13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea] | committer: Diego Biurrun mpeg4videodec: Remove useless messages They seem to sometimes trigger with old AVI files. They are just confusing, do not help anyone, and use sloppy language. Signed-off-by: Diego Biurrun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea --- libavcodec/mpeg4videodec.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 0966e07..50a6ae1 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2097,9 +2097,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) if (ctx->time_increment_bits == 0 || !(show_bits(gb, ctx->time_increment_bits + 1) & 1)) { -av_log(s->avctx, AV_LOG_ERROR, - "hmm, seems the headers are not complete, trying to guess time_increment_bits\n"); - +/* Headers seem incomplete; try to guess time_increment_bits. */ for (ctx->time_increment_bits = 1; ctx->time_increment_bits < 16; ctx->time_increment_bits++) { @@ -2111,9 +2109,6 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) } else if ((show_bits(gb, ctx->time_increment_bits + 5) & 0x1F) == 0x18) break; } - -av_log(s->avctx, AV_LOG_ERROR, - "my guess is %d bits ;)\n", ctx->time_increment_bits); } if (IS_3IV1) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpeg4videodec: change log level to waning for incomplete header messages
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 14:12:38 2015 +0200| [bca1577ed3c43d14e0a8f3bf92c15c710a565574] | committer: Michael Niedermayer avcodec/mpeg4videodec: change log level to waning for incomplete header messages Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bca1577ed3c43d14e0a8f3bf92c15c710a565574 --- libavcodec/mpeg4videodec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b8fd50b..8be68c6 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2241,7 +2241,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) if (ctx->time_increment_bits == 0 || !(show_bits(gb, ctx->time_increment_bits + 1) & 1)) { -av_log(s->avctx, AV_LOG_ERROR, +av_log(s->avctx, AV_LOG_WARNING, "hmm, seems the headers are not complete, trying to guess time_increment_bits\n"); for (ctx->time_increment_bits = 1; @@ -2256,7 +2256,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) break; } -av_log(s->avctx, AV_LOG_ERROR, +av_log(s->avctx, AV_LOG_WARNING, "my guess is %d bits ;)\n", ctx->time_increment_bits); if (s->avctx->framerate.num && 4*s->avctx->framerate.num < 1avctx->framerate.num = 1
[FFmpeg-cvslog] avcodec/mpeg4videodec: Improve wording of the missing header warning messages
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 14:17:07 2015 +0200| [4ba662b0320b36c1c3a28a9e10ddff861479e918] | committer: Michael Niedermayer avcodec/mpeg4videodec: Improve wording of the missing header warning messages Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ba662b0320b36c1c3a28a9e10ddff861479e918 --- libavcodec/mpeg4videodec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 8be68c6..664fd81 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2242,7 +2242,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) if (ctx->time_increment_bits == 0 || !(show_bits(gb, ctx->time_increment_bits + 1) & 1)) { av_log(s->avctx, AV_LOG_WARNING, - "hmm, seems the headers are not complete, trying to guess time_increment_bits\n"); + "time_increment_bits %d is invalid in relation to the current bitstream, this is likely caused by a missing VOL header\n", ctx->time_increment_bits); for (ctx->time_increment_bits = 1; ctx->time_increment_bits < 16; @@ -2257,7 +2257,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) } av_log(s->avctx, AV_LOG_WARNING, - "my guess is %d bits ;)\n", ctx->time_increment_bits); + "time_increment_bits set to %d bits, based on bitstream analysis\n", ctx->time_increment_bits); if (s->avctx->framerate.num && 4*s->avctx->framerate.num < 1avctx->framerate.num = 1 avctx->time_base = av_inv_q(av_mul_q(s->avctx->framerate, (AVRational){s->avctx->ticks_per_frame, 1})); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/get_bits: print details of the location of the missing bit in check_marker()
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 14:53:17 2015 +0200| [343f34c0b8f4cf8e6bfa429d7c190158b03c4fe8] | committer: Michael Niedermayer avcodec/get_bits: print details of the location of the missing bit in check_marker() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=343f34c0b8f4cf8e6bfa429d7c190158b03c4fe8 --- libavcodec/get_bits.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index b9dec4f..942689c 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -394,7 +394,7 @@ static inline int check_marker(GetBitContext *s, const char *msg) { int bit = get_bits1(s); if (!bit) -av_log(NULL, AV_LOG_INFO, "Marker bit missing %s\n", msg); +av_log(NULL, AV_LOG_INFO, "Marker bit missing at %d of %d %s\n", get_bits_count(s) - 1, s->size_in_bits, msg); return bit; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpeg12dec: Use check_marker()
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 15:08:11 2015 +0200| [37d93fdbf0fec0eac885974c01fba99826ae7763] | committer: Michael Niedermayer avcodec/mpeg12dec: Use check_marker() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37d93fdbf0fec0eac885974c01fba99826ae7763 --- libavcodec/mpeg12dec.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index a5622bf..285f45d 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -831,7 +831,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) s->last_mv[0][1][1] = mpeg_decode_motion(s, s->mpeg_f_code[0][1], s->last_mv[0][0][1]); -skip_bits1(&s->gb); /* marker */ +check_marker(&s->gb, "after concealment_motion_vectors"); } else { /* reset mv prediction */ memset(s->last_mv, 0, sizeof(s->last_mv)); @@ -1451,7 +1451,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) s->height |= (vert_size_ext << 12); bit_rate_ext = get_bits(&s->gb, 12); /* XXX: handle it */ s->bit_rate += (bit_rate_ext << 18) * 400; -skip_bits1(&s->gb); /* marker */ +check_marker(&s->gb, "after bit rate extension"); s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10; s->low_delay = get_bits1(&s->gb); @@ -2131,8 +2131,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, s->frame_rate_index = 1; } s->bit_rate = get_bits(&s->gb, 18) * 400; -if (get_bits1(&s->gb) == 0) { /* marker */ -av_log(avctx, AV_LOG_ERROR, "Marker in sequence header missing\n"); +if (check_marker(&s->gb, "in sequence header") == 0) { return AVERROR_INVALIDDATA; } s->width = width; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/alsdec: use av_malloc(z)_array()
ffmpeg | branch: master | Paul B Mahol | Mon Apr 13 18:44:49 2015 +| [c2fc466351316195fcd3fd00c8d37e2976e7bfbf] | committer: Paul B Mahol avcodec/alsdec: use av_malloc(z)_array() Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2fc466351316195fcd3fd00c8d37e2976e7bfbf --- libavcodec/alsdec.c | 61 +-- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index bac434f..65aa7d2 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -352,7 +352,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx) if (get_bits_left(&gb) < bits_needed) return AVERROR_INVALIDDATA; -if (!(sconf->chan_pos = av_malloc(avctx->channels * sizeof(*sconf->chan_pos +if (!(sconf->chan_pos = av_malloc_array(avctx->channels, sizeof(*sconf->chan_pos return AVERROR(ENOMEM); ctx->cs_switch = 1; @@ -1680,14 +1680,14 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate quantized parcor coefficient buffer num_buffers = sconf->mc_coding ? avctx->channels : 1; -ctx->quant_cof= av_malloc(sizeof(*ctx->quant_cof) * num_buffers); -ctx->lpc_cof = av_malloc(sizeof(*ctx->lpc_cof) * num_buffers); -ctx->quant_cof_buffer = av_malloc(sizeof(*ctx->quant_cof_buffer) * - num_buffers * sconf->max_order); -ctx->lpc_cof_buffer = av_malloc(sizeof(*ctx->lpc_cof_buffer) * - num_buffers * sconf->max_order); -ctx->lpc_cof_reversed_buffer = av_malloc(sizeof(*ctx->lpc_cof_buffer) * - sconf->max_order); +ctx->quant_cof= av_malloc_array(num_buffers, sizeof(*ctx->quant_cof)); +ctx->lpc_cof = av_malloc_array(num_buffers, sizeof(*ctx->lpc_cof)); +ctx->quant_cof_buffer = av_malloc_array(num_buffers * sconf->max_order, +sizeof(*ctx->quant_cof_buffer)); +ctx->lpc_cof_buffer = av_malloc_array(num_buffers * sconf->max_order, +sizeof(*ctx->lpc_cof_buffer)); +ctx->lpc_cof_reversed_buffer = av_malloc_array(sconf->max_order, + sizeof(*ctx->lpc_cof_buffer)); if (!ctx->quant_cof || !ctx->lpc_cof|| !ctx->quant_cof_buffer || !ctx->lpc_cof_buffer || @@ -1704,15 +1704,14 @@ static av_cold int decode_init(AVCodecContext *avctx) } // allocate and assign lag and gain data buffer for ltp mode -ctx->const_block = av_malloc (sizeof(*ctx->const_block) * num_buffers); -ctx->shift_lsbs = av_malloc (sizeof(*ctx->shift_lsbs) * num_buffers); -ctx->opt_order = av_malloc (sizeof(*ctx->opt_order) * num_buffers); -ctx->store_prev_samples = av_malloc(sizeof(*ctx->store_prev_samples) * num_buffers); -ctx->use_ltp = av_mallocz(sizeof(*ctx->use_ltp) * num_buffers); -ctx->ltp_lag = av_malloc (sizeof(*ctx->ltp_lag) * num_buffers); -ctx->ltp_gain= av_malloc (sizeof(*ctx->ltp_gain) * num_buffers); -ctx->ltp_gain_buffer = av_malloc (sizeof(*ctx->ltp_gain_buffer) * - num_buffers * 5); +ctx->const_block = av_malloc_array(num_buffers, sizeof(*ctx->const_block)); +ctx->shift_lsbs = av_malloc_array(num_buffers, sizeof(*ctx->shift_lsbs)); +ctx->opt_order = av_malloc_array(num_buffers, sizeof(*ctx->opt_order)); +ctx->store_prev_samples = av_malloc_array(num_buffers, sizeof(*ctx->store_prev_samples)); +ctx->use_ltp = av_mallocz_array(num_buffers, sizeof(*ctx->use_ltp)); +ctx->ltp_lag = av_malloc_array(num_buffers, sizeof(*ctx->ltp_lag)); +ctx->ltp_gain= av_malloc_array(num_buffers, sizeof(*ctx->ltp_gain)); +ctx->ltp_gain_buffer = av_malloc_array(num_buffers * 5, sizeof(*ctx->ltp_gain_buffer)); if (!ctx->const_block || !ctx->shift_lsbs || !ctx->opt_order || !ctx->store_prev_samples || @@ -1728,12 +1727,12 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate and assign channel data buffer for mcc mode if (sconf->mc_coding) { -ctx->chan_data_buffer = av_malloc(sizeof(*ctx->chan_data_buffer) * - num_buffers * num_buffers); -ctx->chan_data = av_malloc(sizeof(*ctx->chan_data) * - num_buffers); -ctx->reverted_channels = av_malloc(sizeof(*ctx->reverted_channels) * - num_buffers); +ctx->chan_data_buffer = av_malloc_array(num_buffers * num_buffers, + sizeof(*ctx->chan_data_buffer)); +ctx->chan_data = av_malloc_array(n
[FFmpeg-cvslog] aacdec: Use macros for constants
ffmpeg | branch: master | Rostislav Pehlivanov | Tue Apr 14 00:33:52 2015 +0100| [a61c75e9f77a063cdcf2e68ee752c08a3ff8173d] | committer: Michael Niedermayer aacdec: Use macros for constants This commit replaces the previous hardcoded constants with both new and previously defined macros from aac.h. This change makes it easy for anyone reading the code to know how encoding and decoding scalefactors works. It's also possibly a step in unifying some of the code across both the encoder and decoder. Reviewed-by: Claudio Freire Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a61c75e9f77a063cdcf2e68ee752c08a3ff8173d --- libavcodec/aacdec.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 5a0c05a..1a2ddc2 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -1394,7 +1394,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, int band_type_run_end[120]) { int g, i, idx = 0; -int offset[3] = { global_gain, global_gain - 90, 0 }; +int offset[3] = { global_gain, global_gain - NOISE_OFFSET, 0 }; int clipped_offset; int noise_flag = 1; for (g = 0; g < ics->num_window_groups; g++) { @@ -1406,7 +1406,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, } else if ((band_type[idx] == INTENSITY_BT) || (band_type[idx] == INTENSITY_BT2)) { for (; i < run_end; i++, idx++) { -offset[2] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; +offset[2] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - SCALE_DIFF_ZERO; clipped_offset = av_clip(offset[2], -155, 100); if (offset[2] != clipped_offset) { avpriv_request_sample(ac->avctx, @@ -1419,9 +1419,9 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, } else if (band_type[idx] == NOISE_BT) { for (; i < run_end; i++, idx++) { if (noise_flag-- > 0) -offset[1] += get_bits(gb, 9) - 256; +offset[1] += get_bits(gb, NOISE_PRE_BITS) - NOISE_PRE; else -offset[1] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; +offset[1] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - SCALE_DIFF_ZERO; clipped_offset = av_clip(offset[1], -100, 155); if (offset[1] != clipped_offset) { avpriv_request_sample(ac->avctx, @@ -1433,7 +1433,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, } } else { for (; i < run_end; i++, idx++) { -offset[0] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; +offset[0] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - SCALE_DIFF_ZERO; if (offset[0] > 255U) { av_log(ac->avctx, AV_LOG_ERROR, "Scalefactor (%d) out of range.\n", offset[0]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'a6a45e5a9a9dfb725456f62e053532e505aadcfc'
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 20:07:07 2015 +0200| [64b37d3e08e48419c85f35724d119267e89d575d] | committer: Michael Niedermayer Merge commit 'a6a45e5a9a9dfb725456f62e053532e505aadcfc' * commit 'a6a45e5a9a9dfb725456f62e053532e505aadcfc': avisynth: Fix detection of AviSynth 2.5 See: d858c3a18f193a54fb083223f1a7fa0470ddfac6 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64b37d3e08e48419c85f35724d119267e89d575d --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avisynth: Fix detection of AviSynth 2.5
ffmpeg | branch: master | Stephen Hutchinson | Thu Apr 2 15:39:25 2015 -0400| [a6a45e5a9a9dfb725456f62e053532e505aadcfc] | committer: Diego Biurrun avisynth: Fix detection of AviSynth 2.5 In order to safely exit when the user tries to use AviSynth 2.5, the continue_on_fail value for 2.6's functions need to be set to 1. Otherwise, the library loader fails before the 'upgrade to 2.6' log message appears. Signed-off-by: Diego Biurrun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6a45e5a9a9dfb725456f62e053532e505aadcfc --- libavformat/avisynth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index fb7441c..a2f0550 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -140,15 +140,15 @@ static av_cold int avisynth_load_library(void) LOAD_AVS_FUNC(avs_release_video_frame, 0); LOAD_AVS_FUNC(avs_take_clip, 0); #ifdef USING_AVISYNTH -LOAD_AVS_FUNC(avs_bits_per_pixel, 0); -LOAD_AVS_FUNC(avs_get_height_p, 0); -LOAD_AVS_FUNC(avs_get_pitch_p, 0); -LOAD_AVS_FUNC(avs_get_read_ptr_p, 0); -LOAD_AVS_FUNC(avs_get_row_size_p, 0); -LOAD_AVS_FUNC(avs_is_yv24, 0); -LOAD_AVS_FUNC(avs_is_yv16, 0); -LOAD_AVS_FUNC(avs_is_yv411, 0); -LOAD_AVS_FUNC(avs_is_y8, 0); +LOAD_AVS_FUNC(avs_bits_per_pixel, 1); +LOAD_AVS_FUNC(avs_get_height_p, 1); +LOAD_AVS_FUNC(avs_get_pitch_p, 1); +LOAD_AVS_FUNC(avs_get_read_ptr_p, 1); +LOAD_AVS_FUNC(avs_get_row_size_p, 1); +LOAD_AVS_FUNC(avs_is_yv24, 1); +LOAD_AVS_FUNC(avs_is_yv16, 1); +LOAD_AVS_FUNC(avs_is_yv411, 1); +LOAD_AVS_FUNC(avs_is_y8, 1); #endif #undef LOAD_AVS_FUNC ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avisynth: Bump minimum required version to interface version 6
ffmpeg | branch: master | Stephen Hutchinson | Thu Apr 2 15:39:26 2015 -0400| [7a5f44476696b495e0de658ed859bcb8520b93d4] | committer: Diego Biurrun avisynth: Bump minimum required version to interface version 6 The AVSC_API changes in the new headers mean that the 2.6 alphas are just as incompatible as 2.5 is. Signed-off-by: Diego Biurrun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a5f44476696b495e0de658ed859bcb8520b93d4 --- doc/general.texi |4 ++-- libavformat/avisynth.c | 11 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index 3fa4377..6b76f7f 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -151,8 +151,8 @@ by Libav. Once you have the appropriate header, pass @code{--enable-avisynth} to configure to enable AviSynth support. For Windows, supported AviSynth variants are -@url{http://avisynth.nl, AviSynth 2.6} for 32-bit builds and -@url{http://avs-plus.net, AviSynth+ 0.1} for 32-bit and 64-bit builds. +@url{http://avisynth.nl, AviSynth 2.6 RC1 or higher} for 32-bit builds and +@url{http://avs-plus.net, AviSynth+ r1718 or higher} for 32-bit and 64-bit builds. @url{https://github.com/AviSynth/AviSynthPlus, AviSynth+'s git repository} provides a GNU-style Makefile which can install just the headers using @code{make install PREFIX=/install/prefix}. diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index a2f0550..a5cf4e7 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -407,13 +407,14 @@ static int avisynth_open_file(AVFormatContext *s) avs->vi = avs_library.avs_get_video_info(avs->clip); #ifdef USING_AVISYNTH -/* libav only supports AviSynth 2.6 on Windows. Since AvxSynth - * identifies itself as interface version 3 like 2.5.8, this - * needs to be special-cased. */ +/* On Windows, libav supports AviSynth interface version 6 or higher. + * This includes AviSynth 2.6 RC1 or higher, and AviSynth+ r1718 or higher, + * and excludes 2.5 and the 2.6 alphas. Since AvxSynth identifies itself + * as interface version 3 like 2.5.8, this needs to be special-cased. */ -if (avs_library.avs_get_version(avs->clip) == 3) { +if (avs_library.avs_get_version(avs->clip) < 6) { av_log(s, AV_LOG_ERROR, - "AviSynth 2.5.8 not supported. Please upgrade to 2.6.\n"); + "AviSynth version is too old. Please upgrade to either AviSynth 2.6 >= RC1 or AviSynth+ >= r1718.\n"); ret = AVERROR_UNKNOWN; goto fail; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7a5f44476696b495e0de658ed859bcb8520b93d4'
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 14 20:09:44 2015 +0200| [ee69229dd806709a51b70184640c2f298cd99d2b] | committer: Michael Niedermayer Merge commit '7a5f44476696b495e0de658ed859bcb8520b93d4' * commit '7a5f44476696b495e0de658ed859bcb8520b93d4': avisynth: Bump minimum required version to interface version 6 Conflicts: doc/general.texi libavformat/avisynth.c See: 3723a183103718352b37ec2617f71e96ee2c3846 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee69229dd806709a51b70184640c2f298cd99d2b --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] webdashenc: replace unchecked av_malloc with stack allocation
ffmpeg | branch: master | Vignesh Venkatasubramanian | Tue Apr 14 10:54:23 2015 -0700| [30e2f87d2eac8f7d932698b344b32617c05e73f4] | committer: Michael Niedermayer webdashenc: replace unchecked av_malloc with stack allocation Replace an unchecked av_malloc call with stack allocation as the size is always a constant. Signed-off-by: Vignesh Venkatasubramanian Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30e2f87d2eac8f7d932698b344b32617c05e73f4 --- libavformat/webmdashenc.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index c5347a9..c5d7158 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -109,7 +109,7 @@ static void write_header(AVFormatContext *s) time_t local_time = time(NULL); struct tm gmt_buffer; struct tm *gmt = gmtime_r(&local_time, &gmt_buffer); -char *gmt_iso = av_malloc(21); +char gmt_iso[21]; strftime(gmt_iso, 21, "%Y-%m-%dT%H:%M:%SZ", gmt); if (w->debug_mode) { av_strlcpy(gmt_iso, "", 1); @@ -122,7 +122,6 @@ static void write_header(AVFormatContext *s) w->utc_timing_url ? "urn:mpeg:dash:utc:http-iso:2014" : "urn:mpeg:dash:utc:direct:2012"); avio_printf(s->pb, " value=\"%s\"/>\n", w->utc_timing_url ? w->utc_timing_url : gmt_iso); -av_free(gmt_iso); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat, avcodec: log discard padding
ffmpeg | branch: master | wm4 | Tue Apr 14 21:24:33 2015 +0200| [2b5f34f788d8419c39c9108e1ab1f5fa0d0f3e0d] | committer: Michael Niedermayer avformat, avcodec: log discard padding Useful for debugging. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b5f34f788d8419c39c9108e1ab1f5fa0d0f3e0d --- libavcodec/utils.c |4 ++-- libavformat/utils.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 99f254b..d2b8631 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2549,9 +2549,9 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, side= av_packet_get_side_data(avctx->internal->pkt, AV_PKT_DATA_SKIP_SAMPLES, &side_size); if(side && side_size>=10) { avctx->internal->skip_samples = AV_RL32(side); -av_log(avctx, AV_LOG_DEBUG, "skip %d samples due to side data\n", - avctx->internal->skip_samples); discard_padding = AV_RL32(side + 4); +av_log(avctx, AV_LOG_DEBUG, "skip %d / discard %d samples due to side data\n", + avctx->internal->skip_samples, (int)discard_padding); skip_reason = AV_RL8(side + 8); discard_reason = AV_RL8(side + 9); } diff --git a/libavformat/utils.c b/libavformat/utils.c index c6e4627..a7440f5 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1415,7 +1415,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) if (p) { AV_WL32(p, st->skip_samples); AV_WL32(p + 4, discard_padding); -av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d\n", st->skip_samples); +av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d / discard %d\n", st->skip_samples, discard_padding); } st->skip_samples = 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc: use correct type for printf() argument
ffmpeg | branch: master | wm4 | Tue Apr 14 21:24:34 2015 +0200| [95f524aff513cbb6af4acb7d88fc52bf50efc349] | committer: Michael Niedermayer lavc: use correct type for printf() argument This was passing uint32_t for %d. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95f524aff513cbb6af4acb7d88fc52bf50efc349 --- libavcodec/utils.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d2b8631..fe435fd 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2600,7 +2600,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, av_log(avctx, AV_LOG_WARNING, "Could not update timestamps for discarded samples.\n"); } av_log(avctx, AV_LOG_DEBUG, "discard %d/%d samples\n", - discard_padding, frame->nb_samples); + (int)discard_padding, frame->nb_samples); frame->nb_samples -= discard_padding; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ituh263dec: Use check_marker()
ffmpeg | branch: master | Michael Niedermayer | Wed Apr 15 03:22:27 2015 +0200| [fbdaebb29861d32acc93fa55fd13554a2ae32eb4] | committer: Michael Niedermayer avcodec/ituh263dec: Use check_marker() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fbdaebb29861d32acc93fa55fd13554a2ae32eb4 --- libavcodec/ituh263dec.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index bf9bd34..f36124e 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -170,17 +170,17 @@ static int h263_decode_gob_header(MpegEncContext *s) return -1; if(s->h263_slice_structured){ -if(get_bits1(&s->gb)==0) +if(check_marker(&s->gb, "before MBA")==0) return -1; ff_h263_decode_mba(s); if(s->mb_num > 1583) -if(get_bits1(&s->gb)==0) +if(check_marker(&s->gb, "after MBA")==0) return -1; s->qscale = get_bits(&s->gb, 5); /* SQUANT */ -if(get_bits1(&s->gb)==0) +if(check_marker(&s->gb, "after SQUANT")==0) return -1; skip_bits(&s->gb, 2); /* GFID */ }else{ @@ -899,9 +899,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s) s->picture_number= (s->picture_number&~0xFF) + i; /* PTYPE starts here */ -if (get_bits1(&s->gb) != 1) { -/* marker */ -av_log(s->avctx, AV_LOG_ERROR, "Bad marker\n"); +if (check_marker(&s->gb, "in PTYPE") != 1) { return -1; } if (get_bits1(&s->gb) != 0) { @@ -1022,7 +1020,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s) 6-14 - reserved */ width = (get_bits(&s->gb, 9) + 1) * 4; -skip_bits1(&s->gb); +check_marker(&s->gb, "in dimensions"); height = get_bits(&s->gb, 9) * 4; av_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height); if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) { @@ -1118,15 +1116,13 @@ int ff_h263_decode_picture_header(MpegEncContext *s) return AVERROR_INVALIDDATA; if(s->h263_slice_structured){ -if (get_bits1(&s->gb) != 1) { -av_log(s->avctx, AV_LOG_ERROR, "SEPB1 marker missing\n"); +if (check_marker(&s->gb, "SEPB1") != 1) { return -1; } ff_h263_decode_mba(s); -if (get_bits1(&s->gb) != 1) { -av_log(s->avctx, AV_LOG_ERROR, "SEPB2 marker missing\n"); +if (check_marker(&s->gb, "SEPB2") != 1) { return -1; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog