[FFmpeg-cvslog] nutdec: check av_new_packet return value
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 14:11:19 2014 +0100| [af7ca6ea124b82b337a6b96e10963e88eba57ebe] | committer: Vittorio Giovara nutdec: check av_new_packet return value CC: libav-sta...@libav.org Bug-Id: CID 733713 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af7ca6ea124b82b337a6b96e10963e88eba57ebe --- libavformat/nutdec.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 56d208f..c3f5f4b 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -823,7 +823,7 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code) { AVFormatContext *s = nut->avf; AVIOContext *bc= s->pb; -int size, stream_id, discard; +int size, stream_id, discard, ret; int64_t pts, last_IP_pts; StreamContext *stc; uint8_t header_idx; @@ -848,7 +848,9 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code) return 1; } -av_new_packet(pkt, size + nut->header_len[header_idx]); +ret = av_new_packet(pkt, size + nut->header_len[header_idx]); +if (ret < 0) +return ret; memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]); pkt->pos = avio_tell(bc); // FIXME avio_read(bc, pkt->data + nut->header_len[header_idx], size); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/cinedec: Fix a typo in the file header.
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Oct 22 01:37:02 2014 +0200| [b6e8f10bcbf29a0395fba2a4f60343f605bc5c31] | committer: Carl Eugen Hoyos lavf/cinedec: Fix a typo in the file header. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6e8f10bcbf29a0395fba2a4f60343f605bc5c31 --- libavformat/cinedec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 9eed006..5776708 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -1,5 +1,5 @@ /* - * Phanton Cine demuxer + * Phantom Cine demuxer * Copyright (c) 2010-2011 Peter Ross * * This file is part of FFmpeg. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/utils: Add case for jv to avcodec_align_dimensions2()
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 04:30:58 2014 +0200| [e2c5f88237e74694c56a5954e579de055166f9c6] | committer: Michael Niedermayer avcodec/utils: Add case for jv to avcodec_align_dimensions2() Fixes out of array accesses Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 105654e376a736d243aef4a1d121abebce912e6b) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2c5f88237e74694c56a5954e579de055166f9c6 --- libavcodec/utils.c |4 1 file changed, 4 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6771464..cb51e48 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -405,6 +405,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, w_align = 4; h_align = 4; } +if (s->codec_id == AV_CODEC_ID_JV) { +w_align = 8; +h_align = 8; +} break; case AV_PIX_FMT_BGR24: if ((s->codec_id == AV_CODEC_ID_MSZH) || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 14:45:04 2014 +0200| [01817d508ba59246f203b9299a3cab13d0a78145] | committer: Michael Niedermayer avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks Fixes out of array access Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01817d508ba59246f203b9299a3cab13d0a78145 --- libavcodec/mmvideo.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index ab59b58..baedccd 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -111,7 +111,7 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert) if (color) { memset(s->frame->data[0] + y*s->frame->linesize[0] + x, color, run_length); -if (half_vert) +if (half_vert && y + half_vert < s->avctx->height) memset(s->frame->data[0] + (y+1)*s->frame->linesize[0] + x, color, run_length); } x+= run_length; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/svq3: Dont memcpy AVFrame
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 00:13:26 2014 +0200| [603f4ecd14a170104d97ad5ffd64f7d394ed4d07] | committer: Michael Niedermayer avcodec/svq3: Dont memcpy AVFrame This avoids out of array accesses Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 075a165d2715837d125a9cc714fb430ccf6c9d6b) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=603f4ecd14a170104d97ad5ffd64f7d394ed4d07 --- libavcodec/svq3.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 97233b1..9459329 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1176,7 +1176,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, h->cur_pic_ptr = s->cur_pic; av_frame_unref(&h->cur_pic.f); -h->cur_pic = *s->cur_pic; +memcpy(&h->cur_pic.tf, &s->cur_pic->tf, sizeof(h->cur_pic) - offsetof(H264Picture, tf)); ret = av_frame_ref(&h->cur_pic.f, &s->cur_pic->f); if (ret < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h263dec: Fix decoding messenger.h263
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 12:32:21 2014 +0200| [b5ef1eee4527d563f081d4dedd0290ab41f9e6bf] | committer: Michael Niedermayer avcodec/h263dec: Fix decoding messenger.h263 Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263 Fixes regression since b239f3f6 Found-by: Josh Allmann Signed-off-by: Michael Niedermayer (cherry picked from commit d225b0f7aaa65eafccc87165130e1c4bab71708b) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5ef1eee4527d563f081d4dedd0290ab41f9e6bf --- libavcodec/h263dec.c |8 1 file changed, 8 insertions(+) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 31ec642..7680858 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -336,6 +336,14 @@ static int decode_slice(MpegEncContext *s) s->padding_bug_score += 32; } +if (s->codec_id == AV_CODEC_ID_H263 && +(s->workaround_bugs & FF_BUG_AUTODETECT) && +get_bits_left(&s->gb) >= 64 && +AV_RB64(s->gb.buffer_end - 8) == 0xCDCDCDCDFC7F) { + +s->padding_bug_score += 32; +} + if (s->workaround_bugs & FF_BUG_AUTODETECT) { if (s->padding_bug_score > -2 && !s->data_partitioning) s->workaround_bugs |= FF_BUG_NO_PADDING; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/gifdec: factorize interleave end handling out
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 20:15:52 2014 +0200| [6fb9bfb1a356aa4f711e7c45bbf79eaa18e4d522] | committer: Michael Niedermayer avcodec/gifdec: factorize interleave end handling out also change it to a loop Fixes out of array access Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 8f1457864be8fb9653643519dea1c6492f1dde57) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fb9bfb1a356aa4f711e7c45bbf79eaa18e4d522 --- libavcodec/gifdec.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 78c8900..6d9b926 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -258,26 +258,21 @@ static int gif_read_image(GifState *s, AVFrame *frame) case 1: y1 += 8; ptr += linesize * 8; -if (y1 >= height) { -y1 = pass ? 2 : 4; -ptr = ptr1 + linesize * y1; -pass++; -} break; case 2: y1 += 4; ptr += linesize * 4; -if (y1 >= height) { -y1 = 1; -ptr = ptr1 + linesize; -pass++; -} break; case 3: y1 += 2; ptr += linesize * 2; break; } +while (y1 >= height) { +y1 = 4 >> pass; +ptr = ptr1 + linesize * y1; +pass++; +} } else { ptr += linesize; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/pngdec: Calculate MPNG bytewidth more defensively
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 17:54:21 2014 +0200| [9806028fbba5dc7a2af6dd5b0a0805718079] | committer: Michael Niedermayer avcodec/pngdec: Calculate MPNG bytewidth more defensively Signed-off-by: Michael Niedermayer (cherry picked from commit e830902934a29df05c7af65aef2a480b15f572c4) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9806028fbba5dc7a2af6dd5b0a0805718079 --- libavcodec/pngdec.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index faf938b..8f3da77 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -851,10 +851,11 @@ exit_loop: int i, j; uint8_t *pd = p->data[0]; uint8_t *pd_last = s->last_picture.f->data[0]; +int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp); ff_thread_await_progress(&s->last_picture, INT_MAX, 0); for (j = 0; j < s->height; j++) { -for (i = 0; i < s->width * s->bpp; i++) +for (i = 0; i < ls; i++) pd[i] += pd_last[i]; pd += s->image_linesize; pd_last += s->image_linesize; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/qpeg: fix off by 1 error in MV bounds check
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 21:08:52 2014 +0200| [3998071039b22f8a620b98d027b16f87c76f01ce] | committer: Michael Niedermayer avcodec/qpeg: fix off by 1 error in MV bounds check Fixes out of array access Fixes: asan_heap-oob_153760f_4_asan_heap-oob_1d7a4cf_164_VWbig6.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit dd3bfe3cc1ca26d0fff3a3baf61a40207032143f) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3998071039b22f8a620b98d027b16f87c76f01ce --- libavcodec/qpeg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 94cb5bd..d61bcea 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -163,7 +163,7 @@ static void av_noinline qpeg_decode_inter(QpegContext *qctx, uint8_t *dst, /* check motion vector */ if ((me_x + filled < 0) || (me_x + me_w + filled > width) || - (height - me_y - me_h < 0) || (height - me_y > orig_height) || + (height - me_y - me_h < 0) || (height - me_y >= orig_height) || (filled + me_w > width) || (height - me_h < 0)) av_log(NULL, AV_LOG_ERROR, "Bogus motion vector (%i,%i), block size %ix%i at %i,%i\n", me_x, me_y, me_w, me_h, filled, height); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/cinepak: fix integer underflow
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 19:33:01 2014 +0200| [693faadd30c569d772cae2c6702895745348c5bd] | committer: Michael Niedermayer avcodec/cinepak: fix integer underflow Fixes out of array access Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e7e5114c506957f40aafd794e06de1a7e341e9d5) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=693faadd30c569d772cae2c6702895745348c5bd --- libavcodec/cinepak.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 082d0b2..d0d07bc 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -135,7 +135,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip, const uint8_t *eod = (data + size); uint32_t flag, mask; uint8_t *cb0, *cb1, *cb2, *cb3; -unsigned int x, y; +int x, y; char*ip0, *ip1, *ip2, *ip3; flag = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/smc: fix off by 1 error
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 22:50:45 2014 +0200| [1ac4ae2a32d16c97792f40df660cd8c4a9e049b2] | committer: Michael Niedermayer avcodec/smc: fix off by 1 error Fixes out of array access Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit c727401aa9d62335e89d118a5b4e202edf39d905) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ac4ae2a32d16c97792f40df660cd8c4a9e049b2 --- libavcodec/smc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 31e6c88..791612e 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -70,7 +70,7 @@ typedef struct SmcContext { row_ptr += stride * 4; \ } \ total_blocks--; \ -if (total_blocks < 0) \ +if (total_blocks < 0 + !!n_blocks) \ { \ av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \ return; \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/pngdec: Check bits per pixel before setting monoblack pixel format
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 17:35:58 2014 +0200| [433e15bb873f7ba54d8895de7e74c43205551084] | committer: Michael Niedermayer avcodec/pngdec: Check bits per pixel before setting monoblack pixel format Fixes out of array accesses Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=433e15bb873f7ba54d8895de7e74c43205551084 --- libavcodec/pngdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index c92087f..faf938b 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -644,7 +644,7 @@ static int decode_frame(AVCodecContext *avctx, } else if ((s->bits_per_pixel == 1 || s->bits_per_pixel == 2 || s->bits_per_pixel == 4 || s->bits_per_pixel == 8) && s->color_type == PNG_COLOR_TYPE_PALETTE) { avctx->pix_fmt = AV_PIX_FMT_PAL8; -} else if (s->bit_depth == 1) { +} else if (s->bit_depth == 1 && s->bits_per_pixel == 1) { avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; } else if (s->bit_depth == 8 && s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swresample/swresample: fix sample drop loop end condition
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Oct 6 01:08:20 2014 +0200| [1ebd7d2ccfe1b7196894b245416b0aa913681e22] | committer: Michael Niedermayer swresample/swresample: fix sample drop loop end condition Fixes Ticket3985 Signed-off-by: Michael Niedermayer (cherry picked from commit f9fefa499f0af48f47ea73c8ce0b25df0976c315) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ebd7d2ccfe1b7196894b245416b0aa913681e22 --- libswresample/swresample.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 91baca6..bba628b 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -639,6 +639,8 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun in_count = 0; if(ret>0) { s->drop_output -= ret; +if (!s->drop_output && !out_arg) +return 0; continue; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] utvideoenc: properly set slice height/last line
ffmpeg | branch: release/2.3 | Christophe Gisquet | Thu Oct 9 23:27:38 2014 +0200| [f2fba0749486d42453288626b7842ad383add398] | committer: Michael Niedermayer utvideoenc: properly set slice height/last line Mimic decoder and obey sampling. Does not affect fate tests for utvideo. Fixes ticket #3949. Signed-off-by: Michael Niedermayer (cherry picked from commit cb530dda7d76790b08ee3b7f67e251f3ce48c359) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2fba0749486d42453288626b7842ad383add398 --- libavcodec/utvideoenc.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index cbd34d0..355fdb1 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -389,7 +389,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size, } static int encode_plane(AVCodecContext *avctx, uint8_t *src, -uint8_t *dst, int stride, +uint8_t *dst, int stride, int plane_no, int width, int height, PutByteContext *pb) { UtvideoContext *c= avctx->priv_data; @@ -399,6 +399,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, HuffEntry he[256]; uint32_t offset = 0, slice_len = 0; +const int cmask = ~(!plane_no && avctx->pix_fmt == AV_PIX_FMT_YUV420P); int i, sstart, send = 0; int symbol; int ret; @@ -408,7 +409,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, case PRED_NONE: for (i = 0; i < c->slices; i++) { sstart = send; -send = height * (i + 1) / c->slices; +send = height * (i + 1) / c->slices & cmask; av_image_copy_plane(dst + sstart * width, width, src + sstart * stride, stride, width, send - sstart); @@ -417,7 +418,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, case PRED_LEFT: for (i = 0; i < c->slices; i++) { sstart = send; -send = height * (i + 1) / c->slices; +send = height * (i + 1) / c->slices & cmask; left_predict(src + sstart * stride, dst + sstart * width, stride, width, send - sstart); } @@ -425,7 +426,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, case PRED_MEDIAN: for (i = 0; i < c->slices; i++) { sstart = send; -send = height * (i + 1) / c->slices; +send = height * (i + 1) / c->slices & cmask; median_predict(c, src + sstart * stride, dst + sstart * width, stride, width, send - sstart); } @@ -489,7 +490,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, send = 0; for (i = 0; i < c->slices; i++) { sstart = send; -send= height * (i + 1) / c->slices; +send= height * (i + 1) / c->slices & cmask; /* * Write the huffman codes to a buffer, @@ -571,7 +572,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, case AV_PIX_FMT_RGBA: for (i = 0; i < c->planes; i++) { ret = encode_plane(avctx, c->slice_buffer[i] + 2 * c->slice_stride, - c->slice_buffer[i], c->slice_stride, + c->slice_buffer[i], c->slice_stride, i, width, height, &pb); if (ret) { @@ -583,7 +584,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, case AV_PIX_FMT_YUV422P: for (i = 0; i < c->planes; i++) { ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0], - pic->linesize[i], width >> !!i, height, &pb); + pic->linesize[i], i, width >> !!i, height, &pb); if (ret) { av_log(avctx, AV_LOG_ERROR, "Error encoding plane %d.\n", i); @@ -594,7 +595,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, case AV_PIX_FMT_YUV420P: for (i = 0; i < c->planes; i++) { ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0], - pic->linesize[i], width >> !!i, height >> !!i, + pic->linesize[i], i, width >> !!i, height >> !!i, &pb); if (ret) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] postproc/postprocess: fix quant store for fq mode
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sun Oct 12 20:26:27 2014 +0200| [d887a12145884553e8ef4f94c28ffe65aec26411] | committer: Michael Niedermayer postproc/postprocess: fix quant store for fq mode Signed-off-by: Michael Niedermayer (cherry picked from commit 941aaa39e8cd78ba4d16dfcec767290aec9a0136) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d887a12145884553e8ef4f94c28ffe65aec26411 --- libpostproc/postprocess.c |2 +- tests/ref/fate/filter-pp3 |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index da586ff..54163c8 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -1004,7 +1004,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/fate/filter-pp3 b/tests/ref/fate/filter-pp3 index 00d4595..c2f2b4c 100644 --- a/tests/ref/fate/filter-pp3 +++ b/tests/ref/fate/filter-pp3 @@ -1 +1 @@ -pp3 f38fdc2dfa4c8d889918efe6d7a7ac3a +pp3 ef0f10f1859af2f75717e8c9d64ee38a ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/tiff: more completely check bpp/bppcount
ffmpeg | branch: release/2.3 | Michael Niedermayer | Fri Oct 3 16:08:32 2014 +0200| [c3af801c63024c2fcd7a5fbb571b6f8a9c9790dc] | committer: Michael Niedermayer avcodec/tiff: more completely check bpp/bppcount Fixes pixel format selection Fixes out of array accesses Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3af801c63024c2fcd7a5fbb571b6f8a9c9790dc --- libavcodec/tiff.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 1caad84..a57dee1 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -712,13 +712,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) s->height = value; break; case TIFF_BPP: -s->bppcount = count; -if (count > 4) { +if (count > 4U) { av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, %d components)\n", - s->bpp, count); + value, count); return AVERROR_INVALIDDATA; } +s->bppcount = count; if (count == 1) s->bpp = value; else { @@ -736,6 +736,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) s->bpp = -1; } } +if (s->bpp > 64U) { +av_log(s->avctx, AV_LOG_ERROR, + "This format is not supported (bpp=%d, %d components)\n", + s->bpp, count); +s->bpp = 0; +return AVERROR_INVALIDDATA; +} break; case TIFF_SAMPLES_PER_PIXEL: if (count != 1) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mpegts: use a padded buffer in read_sl_header()
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 05:14:08 2014 +0200| [5926bea980ad42a7b4a613c7d922468ba128b0e4] | committer: Michael Niedermayer avformat/mpegts: use a padded buffer in read_sl_header() Fixes overread Fixes: asan_heap-oob_84f75d_8_asan_heap-oob_a2a00a_341_mbc.ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 27f6da292118850ca7900de64d06b56e0ebb5070) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5926bea980ad42a7b4a613c7d922468ba128b0e4 --- libavformat/mpegts.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index bf97602..b1dd8c6 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -852,8 +852,12 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl, int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0; int dts_flag = -1, cts_flag = -1; int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE; +uint8_t buf_padded[128 + FF_INPUT_BUFFER_PADDING_SIZE]; +int buf_padded_size = FFMIN(buf_size, sizeof(buf_padded) - FF_INPUT_BUFFER_PADDING_SIZE); -init_get_bits(&gb, buf, buf_size * 8); +memcpy(buf_padded, buf, buf_padded_size); + +init_get_bits(&gb, buf_padded, buf_padded_size * 8); if (sl->use_au_start) au_start_flag = get_bits1(&gb); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc: fix chroma transform_add size
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 16:17:32 2014 +0200| [e2e0c5b7f64d526907955b27e5682c8bf4de7700] | committer: Michael Niedermayer avcodec/hevc: fix chroma transform_add size Fixes accessing misaligned address Fixes: signal_sigsegv_1feb99c_10_signal_sigsegv_2d1d35c_79_cov_691940146_EXT_A_ericsson_3.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit df8394c693d3c1e13b7ebf6af01c5e55321cf952) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2e0c5b7f64d526907955b27e5682c8bf4de7700 --- libavcodec/hevc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index afb2baa..3fb8a8a 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -978,7 +978,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); } -s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride); +s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride); } } @@ -1007,7 +1007,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); } -s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride); +s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride); } } } else if (blk_idx == 3) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h264: Check mode before considering mixed mode intra prediction
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 14:51:46 2014 +0200| [279003eb9edeeaa3967b8773cc85ecb8a19b53a8] | committer: Michael Niedermayer avcodec/h264: Check mode before considering mixed mode intra prediction Fixes out of array read Fixes: asan_heap-oob_e476fc_2_asan_heap-oob_1333ec6_61_CAMACI3_Sony_C.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 9734a7a1de3043f012ad0f1ef11027d9488067e6) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=279003eb9edeeaa3967b8773cc85ecb8a19b53a8 --- libavcodec/h264.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 22fd829..99a5577 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -215,18 +215,18 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode, int is_chroma) if ((h->left_samples_available & 0x8080) != 0x8080) { mode = left[mode]; -if (is_chroma && (h->left_samples_available & 0x8080)) { -// mad cow disease mode, aka MBAFF + constrained_intra_pred -mode = ALZHEIMER_DC_L0T_PRED8x8 + - (!(h->left_samples_available & 0x8000)) + - 2 * (mode == DC_128_PRED8x8); -} if (mode < 0) { av_log(h->avctx, AV_LOG_ERROR, "left block unavailable for requested intra mode at %d %d\n", h->mb_x, h->mb_y); return AVERROR_INVALIDDATA; } +if (is_chroma && (h->left_samples_available & 0x8080)) { +// mad cow disease mode, aka MBAFF + constrained_intra_pred +mode = ALZHEIMER_DC_L0T_PRED8x8 + + (!(h->left_samples_available & 0x8000)) + + 2 * (mode == DC_128_PRED8x8); +} } return mode; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/on2avc: Check number of channels
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 22:15:07 2014 +0200| [5f7e48a113918b59b50b88a80ee0c0dfc39b6fab] | committer: Michael Niedermayer avcodec/on2avc: Check number of channels Fixes out of array access Fixes: asan_heap-oob_4da4f3_7_asan_heap-oob_4da4f3_173_Xmen_avc_500.vp6 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 550f3e9df3410b3dd975e590042c0d83e20a8da3) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f7e48a113918b59b50b88a80ee0c0dfc39b6fab --- libavcodec/on2avc.c |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index ab6048b..e5e7cc3 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -908,6 +908,11 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx) On2AVCContext *c = avctx->priv_data; int i; +if (avctx->channels > 2U) { +avpriv_request_sample(avctx, "Decoding more than 2 channels"); +return AVERROR_PATCHWELCOME; +} + c->avctx = avctx; avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mpegts: Check desc_len / get8() return code
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 04:29:40 2014 +0200| [cbfd6b1fa4b199824a3e2cb0bd294a70856424b8] | committer: Michael Niedermayer avformat/mpegts: Check desc_len / get8() return code Fixes out of array read Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit c3d7f00ee3e09801f56f25db8b5961f25e842bd2) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbfd6b1fa4b199824a3e2cb0bd294a70856424b8 --- libavformat/mpegts.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 93344d7..bf97602 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1988,7 +1988,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len break; desc_len = get8(&p, desc_list_end); desc_end = p + desc_len; -if (desc_end > desc_list_end) +if (desc_len < 0 || desc_end > desc_list_end) break; av_dlog(ts->stream, "tag: 0x%02x len=%d\n", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vorbisdec: Fix off by 1 error in ptns_to_read
ffmpeg | branch: release/2.3 | Michael Niedermayer | Sat Oct 4 03:12:34 2014 +0200| [fdc8f4e5b4f12ba5ef2d7645d5ba628f6ddf14c9] | committer: Michael Niedermayer avcodec/vorbisdec: Fix off by 1 error in ptns_to_read Fixes read of uninitialized memory Fixes: asan_heap-uaf_18dac2b_9_asan_heap-uaf_22eb375_208_beta3_test_small.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 8c50704ebf1777bee76772c4835d9760b3721057) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fdc8f4e5b4f12ba5ef2d7645d5ba628f6ddf14c9 --- libavcodec/vorbisdec.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 87d1bbb..354ab0e 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1314,7 +1314,9 @@ static av_always_inline int setup_classifs(vorbis_context *vc, vorbis_residue *vr, uint8_t *do_not_decode, unsigned ch_used, - int partition_count) + int partition_count, + int ptns_to_read + ) { int p, j, i; unsigned c_p_c = vc->codebooks[vr->classbook].dimensions; @@ -1336,7 +1338,7 @@ static av_always_inline int setup_classifs(vorbis_context *vc, for (i = partition_count + c_p_c - 1; i >= partition_count; i--) { temp2 = (((uint64_t)temp) * inverse_class) >> 32; -if (i < vr->ptns_to_read) +if (i < ptns_to_read) vr->classifs[p + i] = temp - temp2 * vr->classifications; temp = temp2; } @@ -1344,13 +1346,13 @@ static av_always_inline int setup_classifs(vorbis_context *vc, for (i = partition_count + c_p_c - 1; i >= partition_count; i--) { temp2 = temp / vr->classifications; -if (i < vr->ptns_to_read) +if (i < ptns_to_read) vr->classifs[p + i] = temp - temp2 * vr->classifications; temp = temp2; } } } -p += vr->ptns_to_read; +p += ptns_to_read; } return 0; } @@ -1404,7 +1406,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, for (partition_count = 0; partition_count < ptns_to_read;) { // SPEC error if (!pass) { int ret; -if ((ret = setup_classifs(vc, vr, do_not_decode, ch_used, partition_count)) < 0) +if ((ret = setup_classifs(vc, vr, do_not_decode, ch_used, partition_count, ptns_to_read)) < 0) return ret; } for (i = 0; (i < c_p_c) && (partition_count < ptns_to_read); ++i) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavd: export all symbols with av_ prefix
ffmpeg | branch: release/2.3 | Lukasz Marek | Mon Oct 20 12:12:20 2014 +0200| [4fbdac00e94e6a5ca8c9d2b05f93503f6bbf8fc3] | committer: Michael Niedermayer lavd: export all symbols with av_ prefix Signed-off-by: Lukasz Marek (cherry picked from commit e493814d6191c6dd2900296df546b5f5c7e4452d) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fbdac00e94e6a5ca8c9d2b05f93503f6bbf8fc3 --- libavdevice/libavdevice.v |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/libavdevice.v b/libavdevice/libavdevice.v index 663af85..de7278c 100644 --- a/libavdevice/libavdevice.v +++ b/libavdevice/libavdevice.v @@ -1,4 +1,4 @@ LIBAVDEVICE_$MAJOR { -global: avdevice_*; +global: avdevice_*; av_*; local: *; }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] postproc: fix qp count
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Oct 13 16:02:42 2014 +0200| [0f4c149730f1b68df8f83a6211906ae26ed0507c] | 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=0f4c149730f1b68df8f83a6211906ae26ed0507c --- libpostproc/postprocess.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 54163c8..37206c5 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -979,7 +979,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; } @@ -1004,7 +1004,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/mjpegdec: use FF_CEIL_RSHIFT() for width
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 22 02:28:54 2014 +0200| [c5ffd7aee5a6d60b29721046f94507dcaaae966c] | committer: Michael Niedermayer avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width No testcase known Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5ffd7aee5a6d60b29721046f94507dcaaae966c --- libavcodec/mjpegdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 17421dd..cdb75af 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2101,7 +2101,7 @@ the_end: if (!(s->upscale_h & (1<>= hshift; +w = FF_CEIL_RSHIFT(w, hshift); h = FF_CEIL_RSHIFT(h, vshift); } if (s->upscale_v & (1
[FFmpeg-cvslog] tools/crypto_bench: add CAST5 support
ffmpeg | branch: master | James Almer | Sat Oct 18 18:10:33 2014 -0300| [e397edbfbab099ef63e292156a11d4cd733146c6] | committer: James Almer tools/crypto_bench: add CAST5 support Reviewed-by: Michael Niedermayer Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e397edbfbab099ef63e292156a11d4cd733146c6 --- tools/crypto_bench.c | 45 + 1 file changed, 45 insertions(+) diff --git a/tools/crypto_bench.c b/tools/crypto_bench.c index 0f62068..6037ead 100644 --- a/tools/crypto_bench.c +++ b/tools/crypto_bench.c @@ -75,6 +75,7 @@ struct hash_impl { #include "libavutil/sha512.h" #include "libavutil/ripemd.h" #include "libavutil/aes.h" +#include "libavutil/cast5.h" #define IMPL_USE_lavu IMPL_USE @@ -111,6 +112,16 @@ static void run_lavu_aes128(uint8_t *output, av_aes_crypt(aes, output, input, size >> 4, NULL, 0); } +static void run_lavu_cast128(uint8_t *output, + const uint8_t *input, unsigned size) +{ +static struct AVCAST5 *cast; +if (!cast && !(cast = av_cast5_alloc())) +fatal_error("out of memory"); +av_cast5_init(cast, hardcoded_key, 128); +av_cast5_crypt(cast, output, input, size >> 3, 0); +} + /*** * crypto: OpenSSL's libcrypto ***/ @@ -121,6 +132,7 @@ static void run_lavu_aes128(uint8_t *output, #include #include #include +#include #define DEFINE_CRYPTO_WRAPPER(suffix, function) \ static void run_crypto_ ## suffix(uint8_t *output, \ @@ -147,6 +159,17 @@ static void run_crypto_aes128(uint8_t *output, AES_encrypt(input + i, output + i, &aes); } +static void run_crypto_cast128(uint8_t *output, + const uint8_t *input, unsigned size) +{ +CAST_KEY cast; +unsigned i; + +CAST_set_key(&cast, 16, hardcoded_key); +for (i = 0; i < size; i += 8) +CAST_ecb_encrypt(input + i, output + i, &cast, 1); +} + #define IMPL_USE_crypto(...) IMPL_USE(__VA_ARGS__) #else #define IMPL_USE_crypto(...) /* ignore */ @@ -183,6 +206,16 @@ static void run_gcrypt_aes128(uint8_t *output, gcry_cipher_encrypt(aes, output, size, input, size); } +static void run_gcrypt_cast128(uint8_t *output, + const uint8_t *input, unsigned size) +{ +static gcry_cipher_hd_t cast; +if (!cast) +gcry_cipher_open(&cast, GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_ECB, 0); +gcry_cipher_setkey(cast, hardcoded_key, 16); +gcry_cipher_encrypt(cast, output, size, input, size); +} + #define IMPL_USE_gcrypt(...) IMPL_USE(__VA_ARGS__) #else #define IMPL_USE_gcrypt(...) /* ignore */ @@ -224,6 +257,17 @@ static void run_tomcrypt_aes128(uint8_t *output, aes_ecb_encrypt(input + i, output + i, &aes); } +static void run_tomcrypt_cast128(uint8_t *output, +const uint8_t *input, unsigned size) +{ +symmetric_key cast; +unsigned i; + +cast5_setup(hardcoded_key, 16, 0, &cast); +for (i = 0; i < size; i += 8) +cast5_ecb_encrypt(input + i, output + i, &cast); +} + #define IMPL_USE_tomcrypt(...) IMPL_USE(__VA_ARGS__) #else #define IMPL_USE_tomcrypt(...) /* ignore */ @@ -306,6 +350,7 @@ struct hash_impl implementations[] = { "7c25b9e118c200a189fcd5a01ef106a4e200061f3e97dbf50ba065745fd46bef") IMPL_ALL("RIPEMD-160", ripemd160, "62a5321e4fc8784903bb43ab7752c75f8b25af00") IMPL_ALL("AES-128",aes128,"crc:ff6bc888") +IMPL_ALL("CAST-128", cast128, "crc:456aa584") }; int main(int argc, char **argv) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mov.c: Prevent memory leak in case of invalid metadata reads.
ffmpeg | branch: master | Thilo Borgmann | Tue Oct 21 10:10:55 2014 +0200| [6e6b79e7b8093189fd416670c4e0a7e399705cc1] | committer: Michael Niedermayer lavf/mov.c: Prevent memory leak in case of invalid metadata reads. Reviewed-by: Derek Buitenhuis Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e6b79e7b8093189fd416670c4e0a7e399705cc1 --- libavformat/mov.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index a7ec910..80549ec 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -355,16 +355,16 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) } #endif -str_size_alloc = str_size << 1; // worst-case requirement for output string in case of utf8 coded input -str = av_malloc(str_size_alloc); -if (!str) -return AVERROR(ENOMEM); - if (!key) return 0; if (atom.size < 0) return AVERROR_INVALIDDATA; +str_size_alloc = str_size << 1; // worst-case requirement for output string in case of utf8 coded input +str = av_malloc(str_size_alloc); +if (!str) +return AVERROR(ENOMEM); + if (parse) parse(c, pb, str_size, key); else { @@ -372,8 +372,10 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) mov_read_mac_string(c, pb, str_size, str, str_size_alloc); } else { int ret = avio_read(pb, str, str_size); -if (ret != str_size) +if (ret != str_size) { +av_freep(&str); return ret < 0 ? ret : AVERROR_INVALIDDATA; +} str[str_size] = 0; } c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi/afade: fix cur_sample computation
ffmpeg | branch: master | Stefano Sabatini | Tue Oct 21 11:43:56 2014 +0200| [7ba2e134fb781af4557a4cfbe616084f124de16e] | committer: Stefano Sabatini lavfi/afade: fix cur_sample computation Use the correct timebase conversion. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ba2e134fb781af4557a4cfbe616084f124de16e --- libavfilter/af_afade.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index fbf9802..806f6f6 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -230,7 +230,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) AVFilterLink *outlink = inlink->dst->outputs[0]; int nb_samples = buf->nb_samples; AVFrame *out_buf; -int64_t cur_sample = av_rescale_q(buf->pts, (AVRational){1, outlink->sample_rate}, outlink->time_base); +int64_t cur_sample = av_rescale_q(buf->pts, inlink->time_base, (AVRational){1, inlink->sample_rate}); if ((!s->type && (s->start_sample + s->nb_samples < cur_sample)) || ( s->type && (cur_sample + s->nb_samples < s->start_sample))) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi/concat: accept a single segment
ffmpeg | branch: master | Stefano Sabatini | Tue Oct 21 11:45:30 2014 +0200| [843d7bb3a60dfabec33eb5f0aa03e203e897a0fb] | committer: Stefano Sabatini lavfi/concat: accept a single segment Simplify scripting operations, so that n=1 is not to be considered as a special case. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=843d7bb3a60dfabec33eb5f0aa03e203e897a0fb --- libavfilter/avf_concat.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 18f373c..266bb36 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -59,7 +59,7 @@ typedef struct { static const AVOption concat_options[] = { { "n", "specify the number of segments", OFFSET(nb_segments), - AV_OPT_TYPE_INT, { .i64 = 2 }, 2, INT_MAX, V|A|F}, + AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, V|A|F}, { "v", "specify the number of video streams", OFFSET(nb_streams[AVMEDIA_TYPE_VIDEO]), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, V|F }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/ffmpeg.texi: document the new -start_at_zero option
ffmpeg | branch: master | Rodger Combs | Tue Oct 21 01:23:55 2014 -0500| [1372c557866ad4f1406a42033ab859fae6f909a0] | committer: Michael Niedermayer doc/ffmpeg.texi: document the new -start_at_zero option Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1372c557866ad4f1406a42033ab859fae6f909a0 --- doc/ffmpeg.texi |6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 4fc7682..38dca86 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1016,6 +1016,12 @@ processing (e.g. in case the format option @option{avoid_negative_ts} is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected. +@item -start_at_zero +When used with @option{copyts}, shift input timestamps so they start at zero. + +This means that using e.g. @code{-ss 50} will make output timestamps start at +50 seconds, regardless of what timestamp the input file started at. + @item -copytb @var{mode} Specify how to set the encoder timebase when stream copying. @var{mode} is an integer numeric value, and can assume one of the following values: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mjpegdec: Support 24111100 pix fmt id
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 16:41:47 2014 +0200| [059c842818a11cfa714cb2007ed0aab95f2ff765] | committer: Michael Niedermayer avcodec/mjpegdec: Support 2400 pix fmt id Fixes 129533924_640.jpg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=059c842818a11cfa714cb2007ed0aab95f2ff765 --- libavcodec/mjpegdec.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 271c05e..2f9fe39 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -515,12 +515,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) break; case 0x2200: case 0x4200: +case 0x2400: if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUVJ420P; else s->avctx->pix_fmt = AV_PIX_FMT_YUV420P16; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; if (pix_fmt_id == 0x4200) { s->upscale_h = 6; s->chroma_height = (s->height + 1) / 2; +} else if (pix_fmt_id == 0x2400) { +s->upscale_v = 6; } break; case 0x4100: @@ -2124,21 +2127,27 @@ the_end: avctx->pix_fmt == AV_PIX_FMT_YUV444P || avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || avctx->pix_fmt == AV_PIX_FMT_YUV422P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || + avctx->pix_fmt == AV_PIX_FMT_YUV420P || avctx->pix_fmt == AV_PIX_FMT_YUVA444P || avctx->pix_fmt == AV_PIX_FMT_GBRAP ); avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift); for (p = 0; p < 4; p++) { -uint8_t *dst = &((uint8_t *)s->picture_ptr->data[p])[(s->height - 1) * s->linesize[p]]; +uint8_t *dst; int w = s->width; +int h = s->height; if (!(s->upscale_v & (1picture_ptr->data[p])[(h - 1) * s->linesize[p]]; +for (i = h - 1; i; i--) { uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[p])[i / 2 * s->linesize[p]]; uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[p])[(i + 1) / 2 * s->linesize[p]]; -if (src1 == src2 || i == s->height - 1) { +if (src1 == src2 || i == h - 1) { memcpy(dst, src1, w); } else { for (index = 0; index < w; index++) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov.c: reasonable bitrate for fragmented mp4
ffmpeg | branch: master | Mika Raento | Tue Oct 21 15:04:10 2014 +0300| [17702f1fc58464e9ca4fd5a5b2cf24207a65c4fd] | committer: Michael Niedermayer mov.c: reasonable bitrate for fragmented mp4 If using MFRA for timestamps, the stream may start from a large offset and/or have gaps. With this change we calculate the bitrate based on frames we've seen. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17702f1fc58464e9ca4fd5a5b2cf24207a65c4fd --- libavformat/mov.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 80549ec..1444bce 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3943,6 +3943,17 @@ static int mov_read_header(AVFormatContext *s) } } +if (mov->use_mfra_for > 0) { +for (i = 0; i < s->nb_streams; i++) { +AVStream *st = s->streams[i]; +MOVStreamContext *sc = st->priv_data; +if (sc->duration_for_fps > 0) { +st->codec->bit_rate = sc->data_size * 8 * sc->time_scale / +sc->duration_for_fps; +} +} +} + for (i = 0; i < mov->bitrates_count && i < s->nb_streams; i++) { if (mov->bitrates[i]) { s->streams[i]->codec->bit_rate = mov->bitrates[i]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mjpegdec: simplify chroma_height calculation
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 20:56:17 2014 +0200| [d5a3a20d1e19e819b4f4e17831c30d236407c334] | committer: Michael Niedermayer avcodec/mjpegdec: simplify chroma_height calculation Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5a3a20d1e19e819b4f4e17831c30d236407c334 --- libavcodec/mjpegdec.c | 15 +++ libavcodec/mjpegdec.h |1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 2f9fe39..17421dd 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -444,12 +444,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->avctx->pix_fmt = AV_PIX_FMT_GBRAP; s->upscale_v = 6; s->upscale_h = 6; -s->chroma_height = s->height; } else if (s->adobe_transform == 2 && s->bits <= 8) { s->avctx->pix_fmt = AV_PIX_FMT_YUVA444P; s->upscale_v = 6; s->upscale_h = 6; -s->chroma_height = s->height; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; } else { if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_YUVA420P; @@ -466,7 +464,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) else goto unk_pixfmt; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; -s->chroma_height = s->height; break; case 0x1100: case 0x22112200: @@ -475,7 +472,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) else goto unk_pixfmt; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; -s->chroma_height = (s->height + 1) / 2; break; case 0x1100: case 0x1300: @@ -499,7 +495,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) else goto unk_pixfmt; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; -s->chroma_height = (s->height + 1) / 2; break; case 0x2100: if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; @@ -521,7 +516,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; if (pix_fmt_id == 0x4200) { s->upscale_h = 6; -s->chroma_height = (s->height + 1) / 2; } else if (pix_fmt_id == 0x2400) { s->upscale_v = 6; } @@ -2103,12 +2097,17 @@ the_end: for (p = 0; p<4; p++) { uint8_t *line = s->picture_ptr->data[p]; int w = s->width; +int h = s->height; if (!(s->upscale_h & (1<>= hshift; +h = FF_CEIL_RSHIFT(h, vshift); +} +if (s->upscale_v & (1<>1; av_assert0(w > 0); -for (i = 0; i < s->chroma_height; i++) { +for (i = 0; i < h; i++) { if (is16bit) ((uint16_t*)line)[w - 1] = ((uint16_t*)line)[(w - 1) / 2]; else line[w - 1] = line[(w - 1) / 2]; for (index = w - 2; index > 0; index--) { diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 53a412c..deacabe 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -63,7 +63,6 @@ typedef struct MJpegDecodeContext { int progressive; int rgb; int upscale_h; -int chroma_height; int upscale_v; int rct;/* standard rct */ int pegasus_rct;/* pegasus reversible colorspace transform */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '04d8af5f17961b9b7076b8c974e360feb08787c2'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 21:43:42 2014 +0200| [2f74b8d0edbe20a12f30385b4354bf5cbb48c80e] | committer: Michael Niedermayer Merge commit '04d8af5f17961b9b7076b8c974e360feb08787c2' * commit '04d8af5f17961b9b7076b8c974e360feb08787c2': fate-mpeg4: use TARGET_SAMPLES for resize tests Conflicts: tests/fate/mpeg4.mak See: c40a1bd253f673d821a5df2a7a863a1837446123 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f74b8d0edbe20a12f30385b4354bf5cbb48c80e --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate-mpeg4: use TARGET_SAMPLES for resize tests
ffmpeg | branch: master | Janne Grunau | Tue Oct 21 09:56:23 2014 +0200| [04d8af5f17961b9b7076b8c974e360feb08787c2] | committer: Janne Grunau fate-mpeg4: use TARGET_SAMPLES for resize tests > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04d8af5f17961b9b7076b8c974e360feb08787c2 --- tests/fate/mpeg4.mak |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/mpeg4.mak b/tests/fate/mpeg4.mak index 1565247..f9b94e6 100644 --- a/tests/fate/mpeg4.mak +++ b/tests/fate/mpeg4.mak @@ -1,7 +1,7 @@ MPEG4_RESOLUTION_CHANGE = down-down down-up up-down up-up -fate-mpeg4-resolution-change-%: CMD = framemd5 -flags +bitexact -idct simple -i $(SAMPLES)/mpeg4/resize_$(@:fate-mpeg4-resolution-change-%=%).h263 +fate-mpeg4-resolution-change-%: CMD = framemd5 -flags +bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg4/resize_$(@:fate-mpeg4-resolution-change-%=%).h263 FATE_MPEG4-$(call DEMDEC, H263, H263) := $(addprefix fate-mpeg4-resolution-change-, $(MPEG4_RESOLUTION_CHANGE)) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 22:00:04 2014 +0200| [4542615063fbb100864fa499aca8cf4e36a38231] | committer: Michael Niedermayer Merge commit 'e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2' * commit 'e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2': smoothstreamingenc: explict cast to avoid overflow Conflicts: libavformat/smoothstreamingenc.c See: b399816d9c3d0fc3efd742b04f269c1055cc6e2b Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4542615063fbb100864fa499aca8cf4e36a38231 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] smoothstreamingenc: explict cast to avoid overflow
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 12:56:40 2014 +0100| [e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2] | committer: Vittorio Giovara smoothstreamingenc: explict cast to avoid overflow CC: libav-sta...@libav.org Bug-Id: CID 732248 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2 --- libavformat/smoothstreamingenc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index a6d0a36..e3e4abb 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -576,7 +576,7 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt) SmoothStreamingContext *c = s->priv_data; AVStream *st = s->streams[pkt->stream_index]; OutputStream *os = &c->streams[pkt->stream_index]; -int64_t end_dts = (c->nb_fragments + 1) * c->min_frag_duration; +int64_t end_dts = (c->nb_fragments + 1) * (int64_t) c->min_frag_duration; int ret; if (st->first_dts == AV_NOPTS_VALUE) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'f22aa6b841dc54fa1dd804303885b1e230a5f629'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 22:06:46 2014 +0200| [1922357e5a05eb5a3e6859097264224d8878fa9c] | committer: Michael Niedermayer Merge commit 'f22aa6b841dc54fa1dd804303885b1e230a5f629' * commit 'f22aa6b841dc54fa1dd804303885b1e230a5f629': flvdec: avoid unitialized use of a struct member See: 396ddcf22d55fa7e735d69eed22a4a4b1649b73c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1922357e5a05eb5a3e6859097264224d8878fa9c --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] flvdec: avoid unitialized use of a struct member
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 12:56:42 2014 +0100| [f22aa6b841dc54fa1dd804303885b1e230a5f629] | committer: Vittorio Giovara flvdec: avoid unitialized use of a struct member CC: libav-sta...@libav.org Bug-Id: CID 718141 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f22aa6b841dc54fa1dd804303885b1e230a5f629 --- libavformat/flvdec.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 56c932c..1c92cc5 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -879,6 +879,7 @@ skip: } else { AVCodecContext ctx; ctx.sample_rate = sample_rate; +ctx.bits_per_coded_sample = bits_per_coded_sample; flv_set_audio_codec(s, st, &ctx, flags & FLV_AUDIO_CODECID_MASK); sample_rate = ctx.sample_rate; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 22:35:30 2014 +0200| [3099008f07808dcf6edb2311fb1ee050444ffd1d] | committer: Michael Niedermayer Merge commit '629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae' * commit '629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae': flvdec: make sure to check create_stream and report the same error Conflicts: libavformat/flvdec.c See: d7d5b5dfc1b6f29646d2c1908c9bac8677f34256 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3099008f07808dcf6edb2311fb1ee050444ffd1d --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] flvdec: make sure to check create_stream and report the same error
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 12:56:41 2014 +0100| [629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae] | committer: Vittorio Giovara flvdec: make sure to check create_stream and report the same error CC: libav-sta...@libav.org Bug-Id: CID 732242 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae --- libavformat/flvdec.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 1c92cc5..2d5e50e 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -717,7 +717,7 @@ static int flv_data_packet(AVFormatContext *s, AVPacket *pkt, if (i == s->nb_streams) { st = create_stream(s, AVMEDIA_TYPE_DATA); if (!st) -return AVERROR_INVALIDDATA; +return AVERROR(ENOMEM); st->codec->codec_id = AV_CODEC_ID_TEXT; } @@ -817,9 +817,12 @@ skip: break; } } -if (i == s->nb_streams) +if (i == s->nb_streams) { st = create_stream(s, is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO); +if (!st) +return AVERROR(ENOMEM); +} av_dlog(s, "%d %X %d \n", is_audio, flags, st->discard); if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavd/fbdev_dec: use default device when not provided
ffmpeg | branch: master | Lukasz Marek | Sat Oct 18 19:35:47 2014 +0200| [da833a6d090f95f607f9c8cb00c2b55740d9120c] | committer: Lukasz Marek lavd/fbdev_dec: use default device when not provided Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da833a6d090f95f607f9c8cb00c2b55740d9120c --- libavdevice/fbdev_dec.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavdevice/fbdev_dec.c b/libavdevice/fbdev_dec.c index 1593b10..7b13a85 100644 --- a/libavdevice/fbdev_dec.c +++ b/libavdevice/fbdev_dec.c @@ -68,6 +68,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) AVStream *st = NULL; enum AVPixelFormat pix_fmt; int ret, flags = O_RDONLY; +const char* device; if (!(st = avformat_new_stream(avctx, NULL))) return AVERROR(ENOMEM); @@ -77,11 +78,16 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) if (avctx->flags & AVFMT_FLAG_NONBLOCK) flags |= O_NONBLOCK; -if ((fbdev->fd = avpriv_open(avctx->filename, flags)) == -1) { +if (avctx->filename[0]) +device = avctx->filename; +else +device = ff_fbdev_default_device(); + +if ((fbdev->fd = avpriv_open(device, flags)) == -1) { ret = AVERROR(errno); av_log(avctx, AV_LOG_ERROR, "Could not open framebuffer device '%s': %s\n", - avctx->filename, av_err2str(ret)); + device, av_err2str(ret)); return ret; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavd/fbdev_common: report error during probing fbdev device
ffmpeg | branch: master | Lukasz Marek | Sat Oct 18 20:22:35 2014 +0200| [6aa1cfed0b2266bb2340644c9e617c69f436fa5c] | committer: Lukasz Marek lavd/fbdev_common: report error during probing fbdev device Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6aa1cfed0b2266bb2340644c9e617c69f436fa5c --- libavdevice/fbdev_common.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavdevice/fbdev_common.c b/libavdevice/fbdev_common.c index 634780d..713e4fd 100644 --- a/libavdevice/fbdev_common.c +++ b/libavdevice/fbdev_common.c @@ -84,8 +84,13 @@ int ff_fbdev_get_device_list(AVDeviceInfoList *device_list) for (i = 0; i <= 31; i++) { snprintf(device_file, sizeof(device_file), "/dev/fb%d", i); -if ((fd = avpriv_open(device_file, O_RDWR)) < 0) +if ((fd = avpriv_open(device_file, O_RDWR)) < 0) { +int err = AVERROR(errno); +if (err != AVERROR(ENOENT)) +av_log(NULL, AV_LOG_ERROR, "Could not open framebuffer device '%s': %s\n", + device_file, av_err2str(err)); continue; +} if (ioctl(fd, FBIOGET_VSCREENINFO, &varinfo) == -1) goto fail_device; if (ioctl(fd, FBIOGET_FSCREENINFO, &fixinfo) == -1) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rmdec: check av_new_packet return value
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 14:11:17 2014 +0100| [7207dd8f829baee58b4df6c97c19ffde77039e8d] | committer: Vittorio Giovara rmdec: check av_new_packet return value CC: libav-sta...@libav.org Bug-Id: CID 733714 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7207dd8f829baee58b4df6c97c19ffde77039e8d --- libavformat/rmdec.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 79a0756..40cc357 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -816,7 +816,9 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb, ast->deint_id == DEINT_ID_VBRS) av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]); else { -av_new_packet(pkt, st->codec->block_align); +int ret = av_new_packet(pkt, st->codec->block_align); +if (ret < 0) +return ret; memcpy(pkt->data, ast->pkt.data + st->codec->block_align * //FIXME avoid this (ast->sub_packet_h * ast->audio_framesize / st->codec->block_align - rm->audio_pkt_cnt), st->codec->block_align); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7207dd8f829baee58b4df6c97c19ffde77039e8d'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 22:48:19 2014 +0200| [840bc8e284c8eead7f0f319e846f911dfb3fd48f] | committer: Michael Niedermayer Merge commit '7207dd8f829baee58b4df6c97c19ffde77039e8d' * commit '7207dd8f829baee58b4df6c97c19ffde77039e8d': rmdec: check av_new_packet return value Conflicts: libavformat/rmdec.c See: c01a462cda8d7f298a3ac6d20752d23a11e43a8a Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=840bc8e284c8eead7f0f319e846f911dfb3fd48f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rmdec: stricter error check to avoid theoretical unitialized use
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 14:11:16 2014 +0100| [be42c0b8d57fe2ea769892d102ffd5561dc18709] | committer: Vittorio Giovara rmdec: stricter error check to avoid theoretical unitialized use CC: libav-sta...@libav.org Bug-Id: CID 90558 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be42c0b8d57fe2ea769892d102ffd5561dc18709 --- libavformat/rmdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 40cc357..38fb1ec 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -865,7 +865,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) st = s->streams[i]; } -if(len<0 || s->pb->eof_reached) +if (len <= 0 || s->pb->eof_reached) return AVERROR(EIO); res = ff_rm_parse_packet (s, s->pb, st, st->priv_data, len, pkt, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'be42c0b8d57fe2ea769892d102ffd5561dc18709'
ffmpeg | branch: master | Michael Niedermayer | Tue Oct 21 23:47:44 2014 +0200| [979062fe2febb502e8b75e944e61673cf70c79b7] | committer: Michael Niedermayer Merge commit 'be42c0b8d57fe2ea769892d102ffd5561dc18709' * commit 'be42c0b8d57fe2ea769892d102ffd5561dc18709': rmdec: stricter error check to avoid theoretical unitialized use Conflicts: libavformat/rmdec.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=979062fe2febb502e8b75e944e61673cf70c79b7 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba'
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 22 00:09:00 2014 +0200| [dd3f1563d7666b631035644ea690c20b00ec91de] | committer: Michael Niedermayer Merge commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba' * commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba': nutenc: check for negative index rather than assert Conflicts: libavformat/nutenc.c Not merged, the assert is correct Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd3f1563d7666b631035644ea690c20b00ec91de --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] nutenc: check for negative index rather than assert
ffmpeg | branch: master | Vittorio Giovara | Mon Oct 20 14:11:20 2014 +0100| [b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba] | committer: Vittorio Giovara nutenc: check for negative index rather than assert CC: libav-sta...@libav.org Bug-Id: CID 703721 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba --- libavformat/nutenc.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index b68e00e..08907ef 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -906,7 +906,10 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) frame_code = i; } } -assert(frame_code != -1); + +if (frame_code < 0) +return AVERROR_BUG; + fc = &nut->frame_code[frame_code]; flags= fc->flags; needed_flags = get_needed_flags(nut, nus, fc, pkt); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe'
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 22 00:17:29 2014 +0200| [42316907b874fc7bc73ec227d2ad21774a662fc9] | committer: Michael Niedermayer Merge commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe' * commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe': nutdec: check av_new_packet return value Conflicts: libavformat/nutdec.c See: bb502411ddb9fe1928d4a999693a3a49b83f8698 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42316907b874fc7bc73ec227d2ad21774a662fc9 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog