[FFmpeg-cvslog] postproc/postprocess: fix quant store for fq mode
ffmpeg | branch: release/1.2 | Michael Niedermayer | Sun Oct 12 20:26:27 2014 +0200| [42669252e8f57b82f734036b5dbdd2af23b4dc05] | committer: Michael Niedermayer postproc/postprocess: fix quant store for fq mode Signed-off-by: Michael Niedermayer (cherry picked from commit 941aaa39e8cd78ba4d16dfcec767290aec9a0136) Conflicts: tests/ref/fate/filter-pp3 (cherry picked from commit 705748caf3f6a4a3e74ad3d2fc547a5a0213a521) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42669252e8f57b82f734036b5dbdd2af23b4dc05 --- libpostproc/postprocess.c |2 +- tests/ref/lavfi/pp3 |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index facfd2c..3a1b78d 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -1000,7 +1000,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3], if((pict_type&7)!=3){ if (QPStride >= 0){ int i; -const int count= mbHeight * QPStride; +const int count= mbHeight * FFMAX(QPStride, mbWidth); for(i=0; i<(count>>2); i++){ ((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F; } diff --git a/tests/ref/lavfi/pp3 b/tests/ref/lavfi/pp3 index ccf2eeb..1af8761 100644 --- a/tests/ref/lavfi/pp3 +++ b/tests/ref/lavfi/pp3 @@ -1 +1 @@ -pp3 39af1a30d0ea0e906df264773adfcaa6 +pp3 c8277ef31ab01bad51356841c9634522 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dxa: check dimensions
ffmpeg | branch: release/1.2 | Michael Niedermayer | Tue Oct 28 15:26:42 2014 +0100| [d59804bafbaf8ce4bb194f04a4692271a8f8f875] | committer: Michael Niedermayer avcodec/dxa: check dimensions Fixes out of array access Fixes: asan_heap-oob_11222fb_21_020.dxa Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e70312dfc22c4e54d5716f28f28db8f99c74cc90) Conflicts: libavcodec/dxa.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d59804bafbaf8ce4bb194f04a4692271a8f8f875 --- libavcodec/dxa.c |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 7bd74f3..52a0fef 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -308,6 +308,11 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; +if (avctx->width%4 || avctx->height%4) { +av_log(avctx, AV_LOG_ERROR, "dimensions are not a multiple of 4"); +return AVERROR_INVALIDDATA; +} + avcodec_get_frame_defaults(&c->pic); avcodec_get_frame_defaults(&c->prev); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/diracdec: Tighter checks on CODEBLOCKS_X/Y
ffmpeg | branch: release/1.2 | Michael Niedermayer | Tue Oct 28 01:23:40 2014 +0100| [341cf9ed8167d8319aff8d814a1a1f5f580deaf5] | committer: Michael Niedermayer avcodec/diracdec: Tighter checks on CODEBLOCKS_X/Y Fixes very long but finite loop Fixes: asan_heap-oob_107866c_42_041.drc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 5145d22b88b9835db81c4d286b931a78e08ab76a) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=341cf9ed8167d8319aff8d814a1a1f5f580deaf5 --- libavcodec/diracdec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 75a1f93..02cb046 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -990,8 +990,8 @@ static int dirac_unpack_idwt_params(DiracContext *s) /* Codeblock parameters (core syntax only) */ if (get_bits1(gb)) { for (i = 0; i <= s->wavelet_depth; i++) { -CHECKEDREAD(s->codeblock[i].width , tmp < 1, "codeblock width invalid\n") -CHECKEDREAD(s->codeblock[i].height, tmp < 1, "codeblock height invalid\n") +CHECKEDREAD(s->codeblock[i].width , tmp < 1 || tmp > (s->avctx->width >>s->wavelet_depth-i), "codeblock width invalid\n") +CHECKEDREAD(s->codeblock[i].height, tmp < 1 || tmp > (s->avctx->height>>s->wavelet_depth-i), "codeblock height invalid\n") } CHECKEDREAD(s->codeblock_mode, tmp > 1, "unknown codeblock mode\n") ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] postproc: fix qp count
ffmpeg | branch: release/1.2 | Michael Niedermayer | Mon Oct 13 16:02:42 2014 +0200| [23b3fe00bb0d44a073f7a8e0a51f5c42d05facb4] | committer: Michael Niedermayer postproc: fix qp count Found-by: ubitux Signed-off-by: Michael Niedermayer (cherry picked from commit 0b7e5d0d75e7d8762dd04d35f8c0821736164372) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23b3fe00bb0d44a073f7a8e0a51f5c42d05facb4 --- libpostproc/postprocess.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 3a1b78d..78404e8 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -975,7 +975,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3], if(pict_type & PP_PICT_TYPE_QP2){ int i; -const int count= mbHeight * absQPStride; +const int count= FFMAX(mbHeight * absQPStride, mbWidth); for(i=0; i<(count>>2); i++){ ((uint32_t*)c->stdQPTable)[i] = (((const uint32_t*)QP_store)[i]>>1) & 0x7F7F7F7F; } @@ -1000,7 +1000,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3], if((pict_type&7)!=3){ if (QPStride >= 0){ int i; -const int count= mbHeight * FFMAX(QPStride, mbWidth); +const int count= FFMAX(mbHeight * QPStride, mbWidth); for(i=0; i<(count>>2); i++){ ((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h264_slice: Clear table pointers to avoid stale pointers
ffmpeg | branch: release/1.2 | Michael Niedermayer | Sun Nov 2 01:55:40 2014 +0100| [25a9823eb44a9e77b3568c93751fb002ffb2ae48] | committer: Michael Niedermayer avcodec/h264_slice: Clear table pointers to avoid stale pointers Might fix Ticket3889 Signed-off-by: Michael Niedermayer (cherry picked from commit 547fce95858ef83f8c25ae347e3ae3b8ba437fd9) Conflicts: libavcodec/h264_slice.c Conflicts: libavcodec/h264.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25a9823eb44a9e77b3568c93751fb002ffb2ae48 --- libavcodec/h264.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 21fcabe..dbed0f0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1600,6 +1600,17 @@ static int decode_update_thread_context(AVCodecContext *dst, memset(&h->me, 0, sizeof(h->me)); h->avctx = dst; h->DPB = NULL; +h->intra4x4_pred_mode= NULL; +h->non_zero_count= NULL; +h->slice_table_base = NULL; +h->slice_table = NULL; +h->cbp_table = NULL; +h->chroma_pred_mode_table = NULL; +memset(h->mvd_table, 0, sizeof(h->mvd_table)); +h->direct_table = NULL; +h->list_counts = NULL; +h->mb2b_xy = NULL; +h->mb2br_xy = NULL; if (h1->context_initialized) { h->context_initialized = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dirac_arith: fix integer overflow
ffmpeg | branch: release/1.2 | Michael Niedermayer | Tue Oct 28 02:14:41 2014 +0100| [35cf24eee996c6233dde42e93e2a0ff6049f604b] | committer: Michael Niedermayer avcodec/dirac_arith: fix integer overflow Fixes: asan_heap-oob_1078676_9_008.drc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 39680caceebfc6abf09b17032048752c014e57a8) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35cf24eee996c6233dde42e93e2a0ff6049f604b --- libavcodec/dirac_arith.h |4 1 file changed, 4 insertions(+) diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h index 089c71a..a1fa96b 100644 --- a/libavcodec/dirac_arith.h +++ b/libavcodec/dirac_arith.h @@ -171,6 +171,10 @@ static inline int dirac_get_arith_uint(DiracArith *c, int follow_ctx, int data_c { int ret = 1; while (!dirac_get_arith_bit(c, follow_ctx)) { +if (ret >= 0x4000) { +av_log(NULL, AV_LOG_ERROR, "dirac_get_arith_uint overflow\n"); +return -1; +} ret <<= 1; ret += dirac_get_arith_bit(c, data_ctx); follow_ctx = ff_dirac_next_ctx[follow_ctx]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/svq1dec: zero terminate embedded message before printing
ffmpeg | branch: release/1.2 | Michael Niedermayer | Thu Oct 30 18:16:25 2014 +0100| [96dac432f790a6e73d8af10ba84cdbd2f38005b2] | committer: Michael Niedermayer avcodec/svq1dec: zero terminate embedded message before printing Fixes out of array access Fixes: asan_stack-oob_49b1e5_10_009.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e91ba2efa949470e9157b652535d207a101f91e0) Conflicts: libavcodec/svq1dec.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96dac432f790a6e73d8af10ba84cdbd2f38005b2 --- libavcodec/svq1dec.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 5b9a620..a5d35f9 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -497,7 +497,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, DSPContext *dsp, return result; } -static void svq1_parse_string(GetBitContext *bitbuf, uint8_t *out) +static void svq1_parse_string(GetBitContext *bitbuf, uint8_t out[257]) { uint8_t seed; int i; @@ -509,6 +509,7 @@ static void svq1_parse_string(GetBitContext *bitbuf, uint8_t *out) out[i] = get_bits(bitbuf, 8) ^ seed; seed = string_table[out[i] ^ seed]; } +out[i] = 0; } static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame) @@ -551,12 +552,12 @@ static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame) } if ((s->frame_code ^ 0x10) >= 0x50) { -uint8_t msg[256]; +uint8_t msg[257]; svq1_parse_string(bitbuf, msg); av_log(avctx, AV_LOG_INFO, - "embedded message: \"%s\"\n", (char *)msg); + "embedded message: \"%s\"\n", ((char *)msg) + 1); } skip_bits(bitbuf, 2); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/diracdec: Use 64bit in calculation of codeblock coordinates
ffmpeg | branch: release/1.2 | Michael Niedermayer | Tue Oct 28 01:23:40 2014 +0100| [c36f5df34aca867af08313a885cc1131b489c57e] | committer: Michael Niedermayer avcodec/diracdec: Use 64bit in calculation of codeblock coordinates Fixes integer overflow Fixes out of array read Fixes: asan_heap-oob_107866c_42_041.drc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 526886e6069636a918c8c04db17e864e3d8151c1) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c36f5df34aca867af08313a885cc1131b489c57e --- libavcodec/diracdec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 08771e5..75a1f93 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -598,10 +598,10 @@ static av_always_inline void decode_subband_internal(DiracContext *s, SubBand *b top = 0; for (cb_y = 0; cb_y < cb_height; cb_y++) { -bottom = (b->height * (cb_y+1)) / cb_height; +bottom = (b->height * (cb_y+1LL)) / cb_height; left = 0; for (cb_x = 0; cb_x < cb_width; cb_x++) { -right = (b->width * (cb_x+1)) / cb_width; +right = (b->width * (cb_x+1LL)) / cb_width; codeblock(s, b, &gb, &c, left, right, top, bottom, blockcnt_one, is_arith); left = right; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dnxhddec: treat pix_fmt like width/height
ffmpeg | branch: release/1.2 | Michael Niedermayer | Wed Oct 29 00:57:07 2014 +0100| [6e45a99a7cc485cb91e23b9760912b964cb1ef6c] | committer: Michael Niedermayer avcodec/dnxhddec: treat pix_fmt like width/height Fixes out of array accesses Fixes: asan_heap-oob_22c9a39_16_015.mxf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit f3c0e0bf6f53df0977f3878d4f5cec99dff8de9e) Conflicts: libavcodec/dnxhddec.c Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e45a99a7cc485cb91e23b9760912b964cb1ef6c --- libavcodec/dnxhddec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 429d9a5..a1dacee 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -39,6 +39,7 @@ typedef struct DNXHDContext { GetBitContext gb; int64_t cid;///< compression id unsigned int width, height; +enum AVPixelFormat pix_fmt; unsigned int mb_width, mb_height; uint32_t mb_scan_index[68]; /* max for 1080p */ int cur_field; ///< current interlaced field @@ -135,7 +136,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si av_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height); if (buf[0x21] & 0x40) { -ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; +ctx->pix_fmt = AV_PIX_FMT_YUV422P10; ctx->avctx->bits_per_raw_sample = 10; if (ctx->bit_depth != 10) { ff_dsputil_init(&ctx->dsp, ctx->avctx); @@ -143,7 +144,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si ctx->decode_dct_block = dnxhd_decode_dct_block_10; } } else { -ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P; +ctx->pix_fmt = AV_PIX_FMT_YUV422P; ctx->avctx->bits_per_raw_sample = 8; if (ctx->bit_depth != 8) { ff_dsputil_init(&ctx->dsp, ctx->avctx); @@ -381,9 +382,15 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, avctx->width, avctx->height, ctx->width, ctx->height); first_field = 1; } +if (avctx->pix_fmt != AV_PIX_FMT_NONE && avctx->pix_fmt != ctx->pix_fmt) { +av_log(avctx, AV_LOG_WARNING, "pix_fmt changed: %s -> %s\n", + av_get_pix_fmt_name(avctx->pix_fmt), av_get_pix_fmt_name(ctx->pix_fmt)); +first_field = 1; +} if (av_image_check_size(ctx->width, ctx->height, 0, avctx)) return -1; +avctx->pix_fmt = ctx->pix_fmt; avcodec_set_dimensions(avctx, ctx->width, ctx->height); if (first_field) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/utils: Align dimensions by at least their chroma sub-sampling factors.
ffmpeg | branch: release/1.2 | Michael Niedermayer | Wed Oct 29 14:15:29 2014 +0100| [b92ccfefc3a3d9a43c6de78ea51c080bb22d7ef3] | committer: Michael Niedermayer avcodec/utils: Align dimensions by at least their chroma sub-sampling factors. Fixes: out of array accesses Fixes: asan_heap-oob_112c6b3_13_012.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit df74811cd53e45fcbbd3b77a1c42416816687c5c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b92ccfefc3a3d9a43c6de78ea51c080bb22d7ef3 --- libavcodec/utils.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 33ff8e0..7cceafa 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -193,6 +193,12 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int i; int w_align = 1; int h_align = 1; +AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt); + +if (desc) { +w_align = 1 << desc->log2_chroma_w; +h_align = 1 << desc->log2_chroma_h; +} switch (s->pix_fmt) { case AV_PIX_FMT_YUV420P: @@ -293,8 +299,6 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } break; default: -w_align = 1; -h_align = 1; break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] update for 1.2.10
ffmpeg | branch: release/1.2 | Michael Niedermayer | Sun Nov 2 11:34:41 2014 +0100| [7e8b4506e0aac9dd00ab2aa750c4ad0858a90792] | committer: Michael Niedermayer update for 1.2.10 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e8b4506e0aac9dd00ab2aa750c4ad0858a90792 --- RELEASE |2 +- doc/Doxyfile |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 9d4f823..963ed7c 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -1.2.9 +1.2.10 diff --git a/doc/Doxyfile b/doc/Doxyfile index f7cfc25..d8952ea 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 = 1.2.9 +PROJECT_NUMBER = 1.2.10 # With the PROJECT_LOGO tag one can specify an 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] avformat/webpenc: removed unused variable
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 11:43:48 2014 +0100| [70b7cf9c39d0b476f07262db0283fcd22ff9a4f0] | committer: Michael Niedermayer avformat/webpenc: removed unused variable Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70b7cf9c39d0b476f07262db0283fcd22ff9a4f0 --- libavformat/webpenc.c |1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c index 5c0b8a3..a9549cd 100644 --- a/libavformat/webpenc.c +++ b/libavformat/webpenc.c @@ -114,7 +114,6 @@ static int webp_write_packet(AVFormatContext *s, AVPacket *pkt) static int webp_write_trailer(AVFormatContext *s) { -WebpContext *w = s->priv_data; unsigned filesize; int ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_drawtext: use gm_time_r() for thread saftey
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 19:20:26 2014 +0100| [013c3eb05cbb58add0650165828d5cbf2e2e5e39] | committer: Michael Niedermayer avfilter/vf_drawtext: use gm_time_r() for thread saftey Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=013c3eb05cbb58add0650165828d5cbf2e2e5e39 --- libavfilter/vf_drawtext.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 857dee6..d20f805 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -855,7 +855,7 @@ static int func_strftime(AVFilterContext *ctx, AVBPrint *bp, if (tag == 'L') localtime_r(&now, &tm); else -tm = *gmtime(&now); +tm = *gmtime_r(&now, &tm); av_bprint_strftime(bp, fmt, &tm); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/matroskadec: use gmtime_r() for thread saftey
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 19:19:07 2014 +0100| [a52cb42ba662971cd4b65c06fec5c742368d38d8] | committer: Michael Niedermayer avformat/matroskadec: use gmtime_r() for thread saftey Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a52cb42ba662971cd4b65c06fec5c742368d38d8 --- libavformat/matroskadec.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 100e697..f29a290 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -46,6 +46,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/lzo.h" #include "libavutil/mathematics.h" +#include "libavutil/time_internal.h" #include "libavcodec/bytestream.h" #include "libavcodec/flac.h" @@ -1507,7 +1508,7 @@ static void matroska_metadata_creation_time(AVDictionary **metadata, int64_t dat char buffer[32]; /* Convert to seconds and adjust by number of seconds between 2001-01-01 and Epoch */ time_t creation_time = date_utc / 10 + 978307200; -struct tm *ptm = gmtime(&creation_time); +struct tm tmpbuf, *ptm = gmtime_r(&creation_time, &tmpbuf); if (!ptm) return; if (strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm)) av_dict_set(metadata, "creation_time", buffer, 0); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/sbgdec: Use localtime_r() for thread saftey
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 20:08:59 2014 +0100| [5ece4f8b7362653c932e58a1c7a0456897d06702] | committer: Michael Niedermayer avformat/sbgdec: Use localtime_r() for thread saftey Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ece4f8b7362653c932e58a1c7a0456897d06702 --- libavformat/sbgdec.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index 36cd8a3..32822fb 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -25,6 +25,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/log.h" #include "libavutil/opt.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "internal.h" @@ -905,14 +906,14 @@ static void expand_timestamps(void *log, struct sbg_script *s) } else { /* Mixed relative/absolute ts: expand */ time_t now0; -struct tm *tm; +struct tm *tm, tmpbuf; av_log(log, AV_LOG_WARNING, "Scripts with mixed absolute and relative timestamps can give " "unexpected results (pause, seeking, time zone change).\n"); #undef time time(&now0); -tm = localtime(&now0); +tm = localtime_r(&now0, &tmpbuf); now = tm ? tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec : now0 % DAY; av_log(log, AV_LOG_INFO, "Using %02d:%02d:%02d as NOW.\n", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/img2enc: Use localtime_r() for thread saftey
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 20:09:16 2014 +0100| [63e62cfbe23de8b362d94f783668620a2cd2b571] | committer: Michael Niedermayer avformat/img2enc: Use localtime_r() for thread saftey Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63e62cfbe23de8b362d94f783668620a2cd2b571 --- libavformat/img2enc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index b64ef07..2b8b2d0 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -26,6 +26,7 @@ #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "avio_internal.h" #include "internal.h" @@ -83,9 +84,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) av_strlcpy(filename, img->path, sizeof(filename)); } else if (img->use_strftime) { time_t now0; -struct tm *tm; +struct tm *tm, tmpbuf; time(&now0); -tm = localtime(&now0); +tm = localtime_r(&now0, &tmpbuf); if (!strftime(filename, sizeof(filename), img->path, tm)) { av_log(s, AV_LOG_ERROR, "Could not get frame filename with strftime\n"); return AVERROR(EINVAL); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/jacosubdec: use time_internal.h, simplify code
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 20:06:08 2014 +0100| [bab09864b423bf177e8af6e465e1a01a241eac62] | committer: Michael Niedermayer avcodec/jacosubdec: use time_internal.h, simplify code Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bab09864b423bf177e8af6e465e1a01a241eac62 --- libavcodec/jacosubdec.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c index ef999ca..2f94956 100644 --- a/libavcodec/jacosubdec.c +++ b/libavcodec/jacosubdec.c @@ -29,6 +29,7 @@ #include "jacosub.h" #include "libavutil/avstring.h" #include "libavutil/bprint.h" +#include "libavutil/time_internal.h" #undef time @@ -44,11 +45,7 @@ static int insert_datetime(AVBPrint *dst, const char *in, const char *arg) time_t now = time(0); struct tm ltime; -#if HAVE_LOCALTIME_R localtime_r(&now,
[FFmpeg-cvslog] avformat/segment: use time_internal.h, simplify code
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 20:07:34 2014 +0100| [32a2876b12f6e839292b0ee699ff7bd0f11ed4d4] | committer: Michael Niedermayer avformat/segment: use time_internal.h, simplify code Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32a2876b12f6e839292b0ee699ff7bd0f11ed4d4 --- libavformat/segment.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 9db2607..4e0af7c 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -39,6 +39,7 @@ #include "libavutil/parseutils.h" #include "libavutil/mathematics.h" #include "libavutil/time.h" +#include "libavutil/time_internal.h" #include "libavutil/timestamp.h" typedef struct SegmentListEntry { @@ -716,11 +717,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) if (seg->use_clocktime) { int64_t avgt = av_gettime(); time_t sec = avgt / 100; -#if HAVE_LOCALTIME_R localtime_r(&sec, &ti); -#else -ti = *localtime(&sec); -#endif usecs = (int64_t)(ti.tm_hour*3600 + ti.tm_min*60 + ti.tm_sec) * 100 + (avgt % 100); wrapped_val = usecs % seg->time; if (seg->last_cut != usecs && wrapped_val < seg->last_val) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/wavenc: Use localtime_r() for thread saftey
ffmpeg | branch: master | Michael Niedermayer | Sun Nov 2 20:08:12 2014 +0100| [76886589eea7172f3a1fe8535e2c679abcc3ea51] | committer: Michael Niedermayer avformat/wavenc: Use localtime_r() for thread saftey Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76886589eea7172f3a1fe8535e2c679abcc3ea51 --- libavformat/wavenc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index c73c900..bce4876 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -38,6 +38,7 @@ #include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/time.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "avio.h" @@ -267,10 +268,11 @@ static void peak_write_chunk(AVFormatContext *s) memset(timestamp, 0, sizeof(timestamp)); if (!(s->flags & AVFMT_FLAG_BITEXACT)) { +struct tm tmpbuf; av_log(s, AV_LOG_INFO, "Writing local time and date to Peak Envelope Chunk\n"); now0 = av_gettime(); now_secs = now0 / 100; -strftime(timestamp, sizeof(timestamp), "%Y:%m:%d:%H:%M:%S:", localtime(&now_secs)); +strftime(timestamp, sizeof(timestamp), "%Y:%m:%d:%H:%M:%S:", localtime_r(&now_secs, &tmpbuf)); av_strlcatf(timestamp, sizeof(timestamp), "%03d", (int)((now0 / 1000) % 1000)); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: improve error handling
ffmpeg | branch: master | Lukasz Marek | Sat Nov 1 02:09:44 2014 +0100| [2121e3e1306181acc39316639bb731919af5bab7] | committer: Lukasz Marek ffserver_config: improve error handling Replace atoi with more advanced parsing routine. Set maximum port value to 65535 (not 65536). Other checks. Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2121e3e1306181acc39316639bb731919af5bab7 --- ffserver_config.c | 47 ++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index 8d93d74..f2e8b6f 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -411,9 +411,7 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, if (!av_strcasecmp(cmd, "Port")) WARNING("Port option is deprecated, use HTTPPort instead\n"); ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("Invalid port: %s\n", arg); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid port: %s\n", arg); if (val < 1024) WARNING("Trying to use IETF assigned system port: %d\n", val); config->http_addr.sin_port = htons(val); @@ -422,37 +420,38 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, WARNING("BindAddress option is deprecated, use HTTPBindAddress instead\n"); ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(&config->http_addr.sin_addr, arg) != 0) -ERROR("%s:%d: Invalid host/IP address: %s\n", arg); +ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "NoDaemon")) { WARNING("NoDaemon option has no effect, you should remove it\n"); } else if (!av_strcasecmp(cmd, "RTSPPort")) { ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("%s:%d: Invalid port: %s\n", arg); -config->rtsp_addr.sin_port = htons(atoi(arg)); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid port: %s\n", arg); +config->rtsp_addr.sin_port = htons(val); } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) { ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(&config->rtsp_addr.sin_addr, arg) != 0) ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) { ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("Invalid MaxHTTPConnections: %s\n", arg); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid MaxHTTPConnections: %s\n", arg); config->nb_max_http_connections = val; +if (config->nb_max_connections > config->nb_max_http_connections) +ERROR("Inconsistent configuration: MaxClients(%d) > MaxHTTPConnections(%d)\n", + config->nb_max_connections, config->nb_max_http_connections); } else if (!av_strcasecmp(cmd, "MaxClients")) { ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > config->nb_max_http_connections) -ERROR("Invalid MaxClients: %s\n", arg); -else -config->nb_max_connections = val; +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid MaxClients: %s\n", arg); +config->nb_max_connections = val; +if (config->nb_max_connections > config->nb_max_http_connections) +ERROR("Inconsistent configuration: MaxClients(%d) > MaxHTTPConnections(%d)\n", + config->nb_max_connections, config->nb_max_http_connections); } else if (!av_strcasecmp(cmd, "MaxBandwidth")) { int64_t llval; +char *tailp; ffserver_get_arg(arg, sizeof(arg), p); -llval = strtoll(arg, NULL, 10); -if (llval < 10 || llval > 1000) +errno = 0; +llval = strtoll(arg, &tailp, 10); +if (llval < 10 || llval > 1000 || tailp[0] || errno) ERROR("Invalid MaxBandwidth: %s\n", arg); else config->max_bandwidth = llval; @@ -460,7 +459,7 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, if (!config->debug) ffserver_get_arg(config->logfilename, sizeof(config->logfilename), p); } else if (!av_strcasecmp(cmd, "LoadModule")) { -ERROR("Loadable modules no longer supported\n"); +ERROR("Loadable modules are no longer supported\n"); } else ERROR("Incorrect keyword: '%s'\n", cmd); return 0; @@ -555,6 +554,9 @@ static int ffserver_parse_config_feed(FFServerConfig *config, const char *cmd, c case 'G': fsize *= 1024 * 1024 * 1024;
[FFmpeg-cvslog] ffserver_config: improve AVOption handing
ffmpeg | branch: master | Lukasz Marek | Sat Nov 1 19:17:01 2014 +0100| [9c097f1cfc1825882353dc73e24a0d707d2495f2] | committer: Lukasz Marek ffserver_config: improve AVOption handing AVOption are checked right after found in config file. It allows to report exact line in config file. Options provided more than once are threated as errors. It also fixes flag options handing. Flags may occur more than once in config file. Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c097f1cfc1825882353dc73e24a0d707d2495f2 --- ffserver_config.c | 52 +++- ffserver_config.h |1 + 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index f2e8b6f..cd83614 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -399,6 +399,27 @@ static int ffserver_set_float_param(float *dest, const char *value, float factor return AVERROR(EINVAL); } +static int ffserver_save_avoption(const char *opt, const char *arg, AVDictionary **dict, + int type, FFServerConfig *config, int line_num) +{ +int ret = 0; +AVDictionaryEntry *e; +const AVOption *o = av_opt_find(config->dummy_ctx, opt, NULL, type | AV_OPT_FLAG_ENCODING_PARAM, AV_OPT_SEARCH_CHILDREN); +if (!o) { +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Option not found: %s\n", opt); +} else if ((ret = av_opt_set(config->dummy_ctx, opt, arg, AV_OPT_SEARCH_CHILDREN)) < 0) { +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Invalid value for option %s (%s): %s\n", opt, arg, av_err2str(ret)); +} else if ((e = av_dict_get(*dict, opt, NULL, 0))) { +if ((o->type == AV_OPT_TYPE_FLAGS) && arg && (arg[0] == '+' || arg[0] == '-')) +return av_dict_set(dict, opt, arg, AV_DICT_APPEND); +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, +"Redeclaring value of the option %s, previous value: %s\n", opt, e->value); +} else if (av_dict_set(dict, opt, arg, 0) < 0) { +return AVERROR(ENOMEM); +} +return 0; +} + #define ERROR(...) report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, __VA_ARGS__) #define WARNING(...) report_config_error(config->filename, line_num, AV_LOG_WARNING, &config->warnings, __VA_ARGS__) @@ -569,10 +590,9 @@ static int ffserver_parse_config_feed(FFServerConfig *config, const char *cmd, c return 0; } -static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts) +static void ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts) { AVDictionaryEntry *e; -int ret = 0; /* Return values from ffserver_set_*_param are ignored. Values are initially parsed and checked before inserting to AVDictionary. */ @@ -644,13 +664,6 @@ static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary ffserver_set_int_param(&enc->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); av_opt_set_dict2(enc, opts, AV_OPT_SEARCH_CHILDREN); -e = NULL; -while (e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX)) { -av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key); -ret = AVERROR(EINVAL); -} - -return ret; } static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, const char **p, @@ -669,6 +682,11 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, stream = av_mallocz(sizeof(FFServerStream)); if (!stream) return AVERROR(ENOMEM); +config->dummy_ctx = avcodec_alloc_context3(NULL); +if (!config->dummy_ctx) { +av_free(stream); +return AVERROR(ENOMEM); +} ffserver_get_arg(stream->filename, sizeof(stream->filename), p); q = strrchr(stream->filename, '>'); if (q) @@ -864,14 +882,14 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, goto nomem; } else if (!av_strcasecmp(cmd, "AVOptionVideo") || !av_strcasecmp(cmd, "AVOptionAudio")) { -AVDictionary **dict; +int ret; ffserver_get_arg(arg, sizeof(arg), p); ffserver_get_arg(arg2, sizeof(arg2), p); if (!av_strcasecmp(cmd, "AVOptionVideo")) -dict = &config->video_opts; +ret = ffserver_save_avoption(arg, arg2, &config->video_opts, AV_OPT_FLAG_VIDEO_PARAM ,config, line_num); else -dict = &config->audio_opts; -if (av_dict_set(dict, arg, arg2, 0) < 0) +ret = ffserver_save_avoption(arg, arg2, &config->audio_opts, AV_OPT_FLAG_AUDIO_PARAM ,config, line_num)
[FFmpeg-cvslog] Silence warnings for fic files with zero-sized cursors.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon Nov 3 00:43:08 2014 +0100| [d457478fb0283d13886d433345ea323b862af9ae] | committer: Carl Eugen Hoyos Silence warnings for fic files with zero-sized cursors. Fixes ticket #4072. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d457478fb0283d13886d433345ea323b862af9ae --- libavcodec/fic.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 5615e69..adc8a25 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -308,7 +308,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } -if (tsize < 32) { +if (!tsize) +skip_cursor = 1; + +if (!skip_cursor && tsize < 32) { av_log(avctx, AV_LOG_WARNING, "Cursor data too small. Skipping cursor.\n"); skip_cursor = 1; @@ -317,14 +320,14 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, /* Cursor position. */ cur_x = AV_RL16(src + 33); cur_y = AV_RL16(src + 35); -if (cur_x > avctx->width || cur_y > avctx->height) { +if (!skip_cursor && (cur_x > avctx->width || cur_y > avctx->height)) { av_log(avctx, AV_LOG_WARNING, "Invalid cursor position: (%d,%d). Skipping cusor.\n", cur_x, cur_y); skip_cursor = 1; } -if (AV_RL16(src + 37) != 32 || AV_RL16(src + 39) != 32) { +if (!skip_cursor && (AV_RL16(src + 37) != 32 || AV_RL16(src + 39) != 32)) { av_log(avctx, AV_LOG_WARNING, "Invalid cursor size. Skipping cursor.\n"); skip_cursor = 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/movenc: Write G.726 bitrate to make the files decodable.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon Nov 3 00:38:13 2014 +0100| [e6b7246a688bfd7e3a52c3ec639fa0f92c4bfc09] | committer: Carl Eugen Hoyos lavf/movenc: Write G.726 bitrate to make the files decodable. Fixes ticket #4069. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6b7246a688bfd7e3a52c3ec639fa0f92c4bfc09 --- libavformat/movenc.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 974edea..b9576dc 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -938,6 +938,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) if (track->enc->codec_id == AV_CODEC_ID_PCM_U8 || track->enc->codec_id == AV_CODEC_ID_PCM_S8) avio_wb16(pb, 8); /* bits per sample */ +else if (track->enc->codec_id == AV_CODEC_ID_ADPCM_G726) +avio_wb16(pb, track->enc->bits_per_coded_sample); else avio_wb16(pb, 16); avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: fix line lengths
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Sun Nov 2 21:54:23 2014 -0300| [200270cc8b2879ef05d534d9cb2ab513f0e0a1c1] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: fix line lengths Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=200270cc8b2879ef05d534d9cb2ab513f0e0a1c1 --- ffserver_config.c | 190 +++-- 1 file changed, 127 insertions(+), 63 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index cd83614..cb5649e 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -130,7 +130,8 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed, if (arg[0]) { if (resolve_host(&acl.last, arg) != 0) { -fprintf(stderr, "%s:%d: ACL refers to invalid host or IP address '%s'\n", +fprintf(stderr, +"%s:%d: ACL refers to invalid host or IP address '%s'\n", filename, line_num, arg); errors++; } @@ -297,7 +298,8 @@ static int ffserver_opt_preset(const char *arg, } else if(!strcmp(tmp, "scodec")) { /* opt_subtitle_codec(tmp2); */ } else if (avctx && (ret = ffserver_opt_default(tmp, tmp2, avctx, type)) < 0) { -fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2); +fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as " +"'%s' = '%s'\n", filename, line, tmp, tmp2); break; } } @@ -315,7 +317,8 @@ static AVOutputFormat *ffserver_guess_format(const char *short_name, const char AVOutputFormat *stream_fmt; char stream_format_name[64]; -snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name); +snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", +fmt->name); stream_fmt = av_guess_format(stream_format_name, NULL, NULL); if (stream_fmt) @@ -365,7 +368,8 @@ static int ffserver_set_int_param(int *dest, const char *value, int factor, int if (config) { va_list vl; va_start(vl, error_msg); -vreport_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, error_msg, vl); +vreport_config_error(config->filename, line_num, AV_LOG_ERROR, +&config->errors, error_msg, vl); va_end(vl); } return AVERROR(EINVAL); @@ -393,7 +397,8 @@ static int ffserver_set_float_param(float *dest, const char *value, float factor if (config) { va_list vl; va_start(vl, error_msg); -vreport_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, error_msg, vl); +vreport_config_error(config->filename, line_num, AV_LOG_ERROR, +&config->errors, error_msg, vl); va_end(vl); } return AVERROR(EINVAL); @@ -406,14 +411,19 @@ static int ffserver_save_avoption(const char *opt, const char *arg, AVDictionary AVDictionaryEntry *e; const AVOption *o = av_opt_find(config->dummy_ctx, opt, NULL, type | AV_OPT_FLAG_ENCODING_PARAM, AV_OPT_SEARCH_CHILDREN); if (!o) { -report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Option not found: %s\n", opt); +report_config_error(config->filename, line_num, AV_LOG_ERROR, +&config->errors, "Option not found: %s\n", opt); } else if ((ret = av_opt_set(config->dummy_ctx, opt, arg, AV_OPT_SEARCH_CHILDREN)) < 0) { -report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Invalid value for option %s (%s): %s\n", opt, arg, av_err2str(ret)); +report_config_error(config->filename, line_num, AV_LOG_ERROR, +&config->errors, "Invalid value for option %s (%s): %s\n", opt, +arg, av_err2str(ret)); } else if ((e = av_dict_get(*dict, opt, NULL, 0))) { if ((o->type == AV_OPT_TYPE_FLAGS) && arg && (arg[0] == '+' || arg[0] == '-')) return av_dict_set(dict, opt, arg, AV_DICT_APPEND); -report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, -"Redeclaring value of the option %s, previous value: %s\n", opt, e->value); +report_config_error(config->filename, line_num, AV_LOG_ERROR, +&config->errors, +"Redeclaring value of the option %s, previous value: %s\n", +opt, e->value); } else if (av_dict_set(dict, opt, arg, 0) < 0) { return AVERROR(ENOMEM); } @@ -432,7 +442,8 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, if (!av_strcasecmp(cmd, "Port")) WARNING("Port option is deprecated, use HTTPPort instead\n"); ffserver_get_arg(arg, sizeof(arg), p); -
[FFmpeg-cvslog] ffserver_config: simplify some if true conditions
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Sun Nov 2 21:56:04 2014 -0300| [17cc78505c336fddc68a6d29fc0bdc9051271012] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: simplify some if true conditions Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17cc78505c336fddc68a6d29fc0bdc9051271012 --- ffserver_config.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index cb5649e..75998d1 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -119,7 +119,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed, ffserver_get_arg(arg, sizeof(arg), &p); -if (resolve_host(&acl.first, arg) != 0) { +if (resolve_host(&acl.first, arg)) { fprintf(stderr, "%s:%d: ACL refers to invalid host or IP address '%s'\n", filename, line_num, arg); errors++; @@ -129,7 +129,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed, ffserver_get_arg(arg, sizeof(arg), &p); if (arg[0]) { -if (resolve_host(&acl.last, arg) != 0) { +if (resolve_host(&acl.last, arg)) { fprintf(stderr, "%s:%d: ACL refers to invalid host or IP address '%s'\n", filename, line_num, arg); @@ -451,7 +451,7 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, if (!av_strcasecmp(cmd, "BindAddress")) WARNING("BindAddress option is deprecated, use HTTPBindAddress instead\n"); ffserver_get_arg(arg, sizeof(arg), p); -if (resolve_host(&config->http_addr.sin_addr, arg) != 0) +if (resolve_host(&config->http_addr.sin_addr, arg)) ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "NoDaemon")) { WARNING("NoDaemon option has no effect, you should remove it\n"); @@ -462,7 +462,7 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, config->rtsp_addr.sin_port = htons(val); } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) { ffserver_get_arg(arg, sizeof(arg), p); -if (resolve_host(&config->rtsp_addr.sin_addr, arg) != 0) +if (resolve_host(&config->rtsp_addr.sin_addr, arg)) ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) { ffserver_get_arg(arg, sizeof(arg), p); @@ -1020,7 +1020,7 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, stream->rtsp_option = av_strdup(arg); } else if (!av_strcasecmp(cmd, "MulticastAddress")) { ffserver_get_arg(arg, sizeof(arg), p); -if (resolve_host(&stream->multicast_ip, arg) != 0) +if (resolve_host(&stream->multicast_ip, arg)) ERROR("Invalid host/IP address: %s\n", arg); stream->is_multicast = 1; stream->loop = 1; /* default is looping */ @@ -1037,7 +1037,7 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, } else if (!av_strcasecmp(cmd, "NoLoop")) { stream->loop = 0; } else if (!av_strcasecmp(cmd, "")) { -if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { +if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm")) { if (config->audio_id != AV_CODEC_ID_NONE) { AVCodecContext *audio_enc = avcodec_alloc_context3(avcodec_find_encoder(config->audio_id)); if (config->audio_preset && ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: add fixme on buffer_aggressivity/eq deprecation
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Sun Nov 2 22:10:54 2014 -0300| [33aacb775013a600f1e1bc26c6ca13fd5d92e959] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: add fixme on buffer_aggressivity/eq deprecation Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33aacb775013a600f1e1bc26c6ca13fd5d92e959 --- ffserver_config.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/ffserver_config.c b/ffserver_config.c index 75998d1..c8180ef 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -214,6 +214,8 @@ static void add_codec(FFServerStream *stream, AVCodecContext *av) av->frame_skip_cmp = FF_CMP_DCTMAX; if (!av->me_method) av->me_method = ME_EPZS; + +/* FIXME: rc_buffer_aggressivity and rc_eq are deprecated */ av->rc_buffer_aggressivity = 1.0; if (!av->rc_eq) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n1.2.10 : FFmpeg 1.2.10 release
[ffmpeg] [branch: refs/tags/n1.2.10] Tag:7a9a0078f3d319de4f6ef79a315dc77b05591bfd > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=7a9a0078f3d319de4f6ef79a315dc77b05591bfd Tagger: Michael Niedermayer Date: Mon Nov 3 03:05:05 2014 +0100 FFmpeg 1.2.10 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 5b7dcbf web/download: Add FFmpeg 1.2.10
The branch, master has been updated via 5b7dcbfbdc92f71b68823ad1936b0951de1909ef (commit) from 22d95605a8809174809fb5fc88a8307e78c08712 (commit) - Log - commit 5b7dcbfbdc92f71b68823ad1936b0951de1909ef Author: Michael Niedermayer AuthorDate: Mon Nov 3 03:21:22 2014 +0100 Commit: Michael Niedermayer CommitDate: Mon Nov 3 03:21:22 2014 +0100 web/download: Add FFmpeg 1.2.10 diff --git a/src/download b/src/download index 230c24e..86560fb 100644 --- a/src/download +++ b/src/download @@ -330,10 +330,10 @@ libpostproc52. 3.100 -FFmpeg 1.2.9 "Magic" +FFmpeg 1.2.10 "Magic" -1.2.9 was released on 2014-10-07. It is the latest stable FFmpeg release +1.2.10 was released on 2014-11-03. It is the latest stable FFmpeg release from the 1.2 release branch, which was cut from master on 2013-03-07. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2013-03-07, libav 9 as of 2013-03-07. @@ -353,15 +353,15 @@ libpostproc52. 2.100 - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n1.2.9";>Changelog + http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n1.2.10";>Changelog --- Summary of changes: src/download | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog