From f87ce262f68a33153b9a66018cd997f633e745f1 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 19 Feb 2014 20:33:28 +0100 Subject: [PATCH 001/822] build: The MPEG-4 video parser depends on h263dsp The dependency is indirect through the h263/mpegvideo code. CC: libav-stable@libav.org (cherry picked from commit 192ccc5034ad4ac1b5022fc16c1162267add6a0f) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 292da47f72..4c35ab9c29 100755 --- a/configure +++ b/configure @@ -1844,7 +1844,7 @@ wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel" # parsers h264_parser_select="golomb h264chroma h264dsp h264pred h264qpel videodsp" -mpeg4video_parser_select="error_resilience mpegvideo" +mpeg4video_parser_select="error_resilience h263dsp mpegvideo" mpegvideo_parser_select="error_resilience mpegvideo" vc1_parser_select="mpegvideo" From ecc5e42d92eb9c82b808d3b1bbff3ae00d9d5cce Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Mar 2014 03:53:09 +0100 Subject: [PATCH 002/822] Update for 2.2-rc1 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 1 + doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 VERSION diff --git a/RELEASE b/RELEASE index 7f9e2dc607..bd861e1397 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.1.git +2.2-rc1 diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000..bd861e1397 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.2-rc1 diff --git a/doc/Doxyfile b/doc/Doxyfile index 96327ff6e5..40840026c9 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 = +PROJECT_NUMBER = 2.2-rc1 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 3503ec8461543c02ae8dab4f9b2ea735ea021410 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Mar 2014 18:26:04 +0100 Subject: [PATCH 003/822] Changelog: remove Found-by: Timothy Signed-off-by: Michael Niedermayer --- Changelog | 3 --- 1 file changed, 3 deletions(-) diff --git a/Changelog b/Changelog index bed77a80b8..fe2f052bed 100644 --- a/Changelog +++ b/Changelog @@ -1,9 +1,6 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version - - version 2.2: - HNM version 4 demuxer and video decoder From db6b2ca0b3afe898e8c15176f57b85fdf27cede1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 28 Feb 2014 11:41:55 +0200 Subject: [PATCH 004/822] qt-faststart: Increase the copy buffer size to 64 KB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copying data in chunks of 1 KB is a little wasteful. 64 KB should still easily fit on the stack, so there's no need to allocate it dynamically. Signed-off-by: Martin Storsjö (cherry picked from commit 3cbc7ef3d60b6af3617079f24a4f401d83353003) --- tools/qt-faststart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index f33d6fa80c..88f5b48785 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -77,7 +77,7 @@ #define CO64_ATOM QT_ATOM('c', 'o', '6', '4') #define ATOM_PREAMBLE_SIZE 8 -#define COPY_BUFFER_SIZE 1024 +#define COPY_BUFFER_SIZE 65536 int main(int argc, char *argv[]) { From c9f015f1c6887ffcbfef119ea1e4846b800fdfff Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 30 Sep 2012 21:53:26 +0200 Subject: [PATCH 005/822] qt-faststart: Simplify code by using a MIN() macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qt-faststart doesn't use the normal libav headers at all since it's supposed to be a completely standalone tool, so we implement the macro locally in this file. Signed-off-by: Martin Storsjö (cherry picked from commit ea15a9a5d8fa6a71af3101b2af18c4dcac07987f) --- tools/qt-faststart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 88f5b48785..69818be2da 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -37,6 +37,8 @@ #define ftello(x) _ftelli64(x) #endif +#define MIN(a,b) ((a) > (b) ? (b) : (a)) + #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) #define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ @@ -295,10 +297,7 @@ int main(int argc, char *argv[]) /* copy the remainder of the infile, from offset 0 -> last_offset - 1 */ printf(" copying rest of file...\n"); while (last_offset) { - if (last_offset > COPY_BUFFER_SIZE) - bytes_to_copy = COPY_BUFFER_SIZE; - else - bytes_to_copy = last_offset; + bytes_to_copy = MIN(COPY_BUFFER_SIZE, last_offset); if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) { perror(argv[1]); From 92edc13d69188de1f12197996334c1cc6e2d12c5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 22 Oct 2012 22:42:51 +0200 Subject: [PATCH 006/822] qt-faststart: Check fseeko() return codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö (cherry picked from commit 5612244351b2eb3cb4e6225861a0f55aa5d0c475) --- tools/qt-faststart.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 69818be2da..0abcd2b67c 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -136,22 +136,27 @@ int main(int argc, char *argv[]) atom_size); goto error_out; } - fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR); - if (fread(ftyp_atom, atom_size, 1, infile) != 1) { + if (fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) || + fread(ftyp_atom, atom_size, 1, infile) != 1) { perror(argv[1]); goto error_out; } start_offset = ftello(infile); } else { + int ret; /* 64-bit special case */ if (atom_size == 1) { if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { break; } atom_size = BE_64(&atom_bytes[0]); - fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR); + ret = fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR); } else { - fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR); + ret = fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR); + } + if (ret) { + perror(argv[1]); + goto error_out; } } printf("%c%c%c%c %10"PRIu64" %"PRIu64"\n", @@ -192,7 +197,10 @@ int main(int argc, char *argv[]) /* moov atom was, in fact, the last atom in the chunk; load the whole * moov atom */ - fseeko(infile, -atom_size, SEEK_END); + if (fseeko(infile, -atom_size, SEEK_END)) { + perror(argv[1]); + goto error_out; + } last_offset = ftello(infile); moov_atom_size = atom_size; moov_atom = malloc(moov_atom_size); @@ -268,7 +276,11 @@ int main(int argc, char *argv[]) } if (start_offset > 0) { /* seek after ftyp atom */ - fseeko(infile, start_offset, SEEK_SET); + if (fseeko(infile, start_offset, SEEK_SET)) { + perror(argv[1]); + goto error_out; + } + last_offset -= start_offset; } From 4be1b68d52c7969a371a63c077cc240c08fbb28c Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 2 Mar 2014 11:33:50 -0500 Subject: [PATCH 007/822] Prepare for 10_beta2 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index 79e098e4dd..f6f1ff6eaa 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10_beta1 +10_beta2 From 298d66c8de1d4faa152f4ef557566aa0519223d8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 29 Oct 2012 22:05:33 +0100 Subject: [PATCH 008/822] qt-faststart: Fix the signedness of variables keeping the ftello return values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These variables are assigned the return values of ftello, which returns an off_t, which is a signed type. On errors, ftello returns -1, thus make sure this error return value can be stored properly. Signed-off-by: Martin Storsjö (cherry picked from commit 03c2a66fcff9707f71ffef7e61ce5e3973220d4b) --- tools/qt-faststart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 0abcd2b67c..2b2e00ca57 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) uint32_t atom_type = 0; uint64_t atom_size = 0; uint64_t atom_offset = 0; - uint64_t last_offset; + int64_t last_offset; unsigned char *moov_atom = NULL; unsigned char *ftyp_atom = NULL; uint64_t moov_atom_size; @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) uint64_t i, j; uint32_t offset_count; uint64_t current_offset; - uint64_t start_offset = 0; + int64_t start_offset = 0; unsigned char copy_buffer[COPY_BUFFER_SIZE]; int bytes_to_copy; From 9b6ccf0f243c5764e3889126f5e8316d48667284 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 18 Feb 2014 23:58:59 +0100 Subject: [PATCH 009/822] hevc: Always consider VLC NALU type mismatch fatal Sample-Id: 00001667-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit 521726ff577ca80b399d1abb687e3e1fd4840e4a) --- libavcodec/hevc.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 8d9324a707..65ad6d9730 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2521,9 +2521,7 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) if (ret < 0) { av_log(s->avctx, AV_LOG_ERROR, "Invalid NAL unit %d, skipping.\n", s->nal_unit_type); - if (s->avctx->err_recognition & AV_EF_EXPLODE) - return ret; - return 0; + goto fail; } else if (!ret) return 0; @@ -2531,23 +2529,23 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) case NAL_VPS: ret = ff_hevc_decode_nal_vps(s); if (ret < 0) - return ret; + goto fail; break; case NAL_SPS: ret = ff_hevc_decode_nal_sps(s); if (ret < 0) - return ret; + goto fail; break; case NAL_PPS: ret = ff_hevc_decode_nal_pps(s); if (ret < 0) - return ret; + goto fail; break; case NAL_SEI_PREFIX: case NAL_SEI_SUFFIX: ret = ff_hevc_decode_nal_sei(s); if (ret < 0) - return ret; + goto fail; break; case NAL_TRAIL_R: case NAL_TRAIL_N: @@ -2593,7 +2591,7 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) return ret; } else if (!s->ref) { av_log(s->avctx, AV_LOG_ERROR, "First slice in a frame missing.\n"); - return AVERROR_INVALIDDATA; + goto fail; } if (s->nal_unit_type != s->first_nal_type) { @@ -2609,8 +2607,7 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) if (ret < 0) { av_log(s->avctx, AV_LOG_WARNING, "Error constructing the reference lists for the current slice.\n"); - if (s->avctx->err_recognition & AV_EF_EXPLODE) - return ret; + goto fail; } } @@ -2623,8 +2620,10 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) restore_tqb_pixels(s); } - if (ctb_addr_ts < 0) - return ctb_addr_ts; + if (ctb_addr_ts < 0) { + ret = ctb_addr_ts; + goto fail; + } break; case NAL_EOS_NUT: case NAL_EOB_NUT: @@ -2640,6 +2639,10 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) } return 0; +fail: + if (s->avctx->err_recognition & AV_EF_EXPLODE) + return ret; + return 0; } /* FIXME: This is adapted from ff_h264_decode_nal, avoiding duplication @@ -2820,8 +2823,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) if (ret < 0) { av_log(s->avctx, AV_LOG_WARNING, "Error parsing NAL unit #%d.\n", i); - if (s->avctx->err_recognition & AV_EF_EXPLODE) - goto fail; + goto fail; } } From b3f106cb1f0036ce54ead5b59120fed7d7aa11d7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 25 Oct 2012 00:39:33 +0200 Subject: [PATCH 010/822] qt-faststart: Check the ftello() return codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This silences a warning in the coverity static analyzer. Signed-off-by: Martin Storsjö (cherry picked from commit 63848854256a024a19435e87d6bc76fffa65e81e) --- tools/qt-faststart.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 2b2e00ca57..5c511a0154 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -137,11 +137,11 @@ int main(int argc, char *argv[]) goto error_out; } if (fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) || - fread(ftyp_atom, atom_size, 1, infile) != 1) { + fread(ftyp_atom, atom_size, 1, infile) != 1 || + (start_offset = ftello(infile)) < 0) { perror(argv[1]); goto error_out; } - start_offset = ftello(infile); } else { int ret; /* 64-bit special case */ @@ -202,6 +202,10 @@ int main(int argc, char *argv[]) goto error_out; } last_offset = ftello(infile); + if (last_offset < 0) { + perror(argv[1]); + goto error_out; + } moov_atom_size = atom_size; moov_atom = malloc(moov_atom_size); if (!moov_atom) { From 63169474b3927e6a1b8ef21728cad6034b09d302 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 20 Feb 2014 02:38:32 +0100 Subject: [PATCH 011/822] h264: Lower bound check for slice offsets And use the value from the specification. Sample-Id: 00000451-google Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Luca Barbato (cherry picked from commit f777504f640260337974848c7d5d7a3f064bbb45) --- libavcodec/h264.c | 18 ++++++++++-------- libavcodec/h264_loopfilter.c | 8 ++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 421e12a2b3..2ca331ada0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3836,8 +3836,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0) get_se_golomb(&h->gb); /* slice_qs_delta */ h->deblocking_filter = 1; - h->slice_alpha_c0_offset = 52; - h->slice_beta_offset = 52; + h->slice_alpha_c0_offset = 0; + h->slice_beta_offset = 0; if (h->pps.deblocking_filter_parameters_present) { tmp = get_ue_golomb_31(&h->gb); if (tmp > 2) { @@ -3850,10 +3850,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->deblocking_filter ^= 1; // 1<->0 if (h->deblocking_filter) { - h->slice_alpha_c0_offset += get_se_golomb(&h->gb) << 1; - h->slice_beta_offset += get_se_golomb(&h->gb) << 1; - if (h->slice_alpha_c0_offset > 104U || - h->slice_beta_offset > 104U) { + h->slice_alpha_c0_offset = get_se_golomb(&h->gb) * 2; + h->slice_beta_offset = get_se_golomb(&h->gb) * 2; + if (h->slice_alpha_c0_offset > 12 || + h->slice_alpha_c0_offset < -12 || + h->slice_beta_offset > 12 || + h->slice_beta_offset < -12) { av_log(h->avctx, AV_LOG_ERROR, "deblocking filter parameters %d %d out of range\n", h->slice_alpha_c0_offset, h->slice_beta_offset); @@ -3890,7 +3892,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) } } } - h->qp_thresh = 15 + 52 - + h->qp_thresh = 15 + FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) - FFMAX3(0, h->pps.chroma_qp_index_offset[0], @@ -3952,7 +3954,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->ref_count[0], h->ref_count[1], h->qscale, h->deblocking_filter, - h->slice_alpha_c0_offset / 2 - 26, h->slice_beta_offset / 2 - 26, + h->slice_alpha_c0_offset, h->slice_beta_offset, h->use_weight, h->use_weight == 1 && h->use_weight_chroma ? "c" : "", h->slice_type == AV_PICTURE_TYPE_B ? (h->direct_spatial_mv_pred ? "SPAT" : "TEMP") : ""); diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index b8bf555bc1..88ed34cc1e 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -252,8 +252,8 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h, int top_type= h->top_type; int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - int a = h->slice_alpha_c0_offset - qp_bd_offset; - int b = h->slice_beta_offset - qp_bd_offset; + int a = 52 + h->slice_alpha_c0_offset - qp_bd_offset; + int b = 52 + h->slice_beta_offset - qp_bd_offset; int mb_type = h->cur_pic.mb_type[mb_xy]; int qp = h->cur_pic.qscale_table[mb_xy]; @@ -707,8 +707,8 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint av_unused int dir; int chroma = !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY)); int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - int a = h->slice_alpha_c0_offset - qp_bd_offset; - int b = h->slice_beta_offset - qp_bd_offset; + int a = 52 + h->slice_alpha_c0_offset - qp_bd_offset; + int b = 52 + h->slice_beta_offset - qp_bd_offset; if (FRAME_MBAFF(h) // and current and left pair do not have the same interlaced type From 7754d4838178a5c09c3c3953bb2b90d1abc639e3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 Dec 2012 15:07:20 +0100 Subject: [PATCH 012/822] qt-faststart: Check offset_count before reading from the moov_atom buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit bb95334c34d0d9abccea370ae25c4765d7764ab8) --- tools/qt-faststart.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 5c511a0154..792c272193 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -239,6 +239,10 @@ int main(int argc, char *argv[]) goto error_out; } offset_count = BE_32(&moov_atom[i + 8]); + if (i + 12 + offset_count * UINT64_C(4) > moov_atom_size) { + printf(" bad atom size/element count\n"); + goto error_out; + } for (j = 0; j < offset_count; j++) { current_offset = BE_32(&moov_atom[i + 12 + j * 4]); current_offset += moov_atom_size; @@ -256,6 +260,10 @@ int main(int argc, char *argv[]) goto error_out; } offset_count = BE_32(&moov_atom[i + 8]); + if (i + 12 + offset_count * UINT64_C(8) > moov_atom_size) { + printf(" bad atom size/element count\n"); + goto error_out; + } for (j = 0; j < offset_count; j++) { current_offset = BE_64(&moov_atom[i + 12 + j * 8]); current_offset += moov_atom_size; From de187e3e9ec4803575deb1c293ccad84d2a88da8 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 22 Feb 2014 11:19:03 +0100 Subject: [PATCH 013/822] h264: Fix a typo from the previous commit f777504f640260337974848c7d5d7a3f064bbb45 changed a - in + CC: libav-stable@libav.org (cherry picked from commit d922c5a5fbaf0b6c73bd8c81ae059bc6e406961c) --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 2ca331ada0..29b96c4d70 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3892,7 +3892,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) } } } - h->qp_thresh = 15 + + h->qp_thresh = 15 - FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) - FFMAX3(0, h->pps.chroma_qp_index_offset[0], From 1d1df82093fdacb2cbc443c70c80f8f801002d28 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 27 Feb 2014 21:36:33 +0100 Subject: [PATCH 014/822] pthread_frame: flush all threads on flush, not just the first one avcodec_flush_buffers() must release all internally held references according to its documentation, for which all the threads need to be flushed. CC:libav-stable@libav.org Bug-Id: vlc/9665 (cherry picked from commit d1f9563d502037239185c11578cc614bdf0c5870) --- libavcodec/pthread_frame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 36b4fff0bb..1af8ff5c94 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -672,8 +672,6 @@ void ff_thread_flush(AVCodecContext *avctx) if (fctx->prev_thread) { if (fctx->prev_thread != &fctx->threads[0]) update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0); - if (avctx->codec->flush) - avctx->codec->flush(fctx->threads[0].avctx); } fctx->next_decoding = fctx->next_finished = 0; @@ -686,6 +684,9 @@ void ff_thread_flush(AVCodecContext *avctx) av_frame_unref(p->frame); release_delayed_buffers(p); + + if (avctx->codec->flush) + avctx->codec->flush(p->avctx); } } From 35694706938ebf6e1641c2743da7b8151c2b82cd Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 16 Feb 2014 23:36:31 +0100 Subject: [PATCH 015/822] doxygen: Add a number of missing function parameter descriptions (cherry picked from commit 4d7ab5cfebef91820af2933ef2f622ea598e6b53) --- libavcodec/avcodec.h | 2 ++ libavcodec/avfft.h | 2 ++ libavformat/avformat.h | 16 ++++++++++++++++ libavformat/avio.h | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 54c60a91aa..244f47ba10 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4108,7 +4108,9 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height); /** * Put a string representing the codec tag codec_tag in buf. * + * @param buf buffer to place codec tag in * @param buf_size size in bytes of buf + * @param codec_tag codec tag to assign * @return the length of the string that would have been generated if * enough space had been available, excluding the trailing null */ diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h index b89618258e..e2e727da9e 100644 --- a/libavcodec/avfft.h +++ b/libavcodec/avfft.h @@ -99,9 +99,11 @@ enum DCTTransformType { /** * Set up DCT. + * * @param nbits size of the input array: * (1 << nbits) for DCT-II, DCT-III and DST-I * (1 << nbits) + 1 for DCT-I + * @param type the type of transform * * @note the first element of the input of DST-I is ignored */ diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 0b8fca21a7..ec1f9c77b0 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -342,6 +342,7 @@ struct AVFormatContext; * Allocate and read the payload of a packet and initialize its * fields with default values. * + * @param s associated IO context * @param pkt packet * @param size desired payload size * @return >0 (read size) if OK, AVERROR_xxx otherwise @@ -357,6 +358,7 @@ int av_get_packet(AVIOContext *s, AVPacket *pkt, int size); * when there is no reasonable way to know (an upper bound of) * the final size. * + * @param s associated IO context * @param pkt packet * @param size amount of data to read * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data @@ -1269,6 +1271,7 @@ const AVClass *avformat_get_class(void); * * When muxing, should be called by the user before avformat_write_header(). * + * @param s media file handle * @param c If non-NULL, the AVCodecContext corresponding to the new stream * will be initialized to use this codec. This is needed for e.g. codec-specific * defaults to be set, so codec should be provided if it is known. @@ -1297,6 +1300,7 @@ AVInputFormat *av_find_input_format(const char *short_name); /** * Guess the file format. * + * @param pd data to be probed * @param is_opened Whether the file is already opened; determines whether * demuxers with or without AVFMT_NOFILE are probed. */ @@ -1305,6 +1309,7 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); /** * Guess the file format. * + * @param pd data to be probed * @param is_opened Whether the file is already opened; determines whether * demuxers with or without AVFMT_NOFILE are probed. * @param score_max A probe score larger that this is required to accept a @@ -1438,6 +1443,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt); /** * Seek to the keyframe at timestamp. * 'timestamp' in 'stream_index'. + * + * @param s media file handle * @param stream_index If stream_index is (-1), a default * stream is selected, and timestamp is automatically converted * from AV_TIME_BASE units to the stream specific time_base. @@ -1464,6 +1471,7 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as * keyframes (this may not be supported by all demuxers). * + * @param s media file handle * @param stream_index index of the stream which is used as time base reference * @param min_ts smallest acceptable timestamp * @param ts target timestamp @@ -1700,6 +1708,7 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, * * @param tags list of supported codec_id-codec_tag pairs, as stored * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param tag codec tag to match to a codec ID */ enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag); @@ -1709,6 +1718,7 @@ enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned i * * @param tags list of supported codec_id-codec_tag pairs, as stored * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param id codec ID to match to a codec tag */ unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id); @@ -1716,6 +1726,9 @@ int av_find_default_stream_index(AVFormatContext *s); /** * Get the index for a specific timestamp. + * + * @param st stream that the timestamp belongs to + * @param timestamp timestamp to retrieve the index for * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond * to the timestamp which is <= the requested one, if backward * is 0, then it will be >= @@ -1812,6 +1825,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size); * Return a positive value if the given filename has one of the given * extensions, 0 otherwise. * + * @param filename file name to check against the given extensions * @param extensions a comma-separated list of filename extensions */ int av_match_ext(const char *filename, const char *extensions); @@ -1819,6 +1833,8 @@ int av_match_ext(const char *filename, const char *extensions); /** * Test if the given container can store a codec. * + * @param ofmt container to check for compatibility + * @param codec_id codec to potentially store in container * @param std_compliance standards compliance level, one of FF_COMPLIANCE_* * * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. diff --git a/libavformat/avio.h b/libavformat/avio.h index b6d3cb33b2..3360e8296e 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -318,6 +318,7 @@ int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); * * @param s Used to return the pointer to the created AVIOContext. * In case of failure the pointed to value is set to NULL. + * @param url resource to access * @param flags flags which control how the resource indicated by url * is to be opened * @return 0 in case of success, a negative value corresponding to an @@ -333,6 +334,7 @@ int avio_open(AVIOContext **s, const char *url, int flags); * * @param s Used to return the pointer to the created AVIOContext. * In case of failure the pointed to value is set to NULL. + * @param url resource to access * @param flags flags which control how the resource indicated by url * is to be opened * @param int_cb an interrupt callback to be used at the protocols level @@ -406,6 +408,8 @@ const char *avio_enum_protocols(void **opaque, int output); /** * Pause and resume playing - only meaningful if using a network streaming * protocol (e.g. MMS). + * + * @param h IO context from which to call the read_pause function pointer * @param pause 1 for pause, 0 for resume */ int avio_pause(AVIOContext *h, int pause); @@ -413,6 +417,8 @@ int avio_pause(AVIOContext *h, int pause); /** * Seek to a given timestamp relative to some component stream. * Only meaningful if using a network streaming protocol (e.g. MMS.). + * + * @param h IO context from which to call the seek function pointers * @param stream_index The stream index that the timestamp is relative to. * If stream_index is (-1) the timestamp should be in AV_TIME_BASE * units from the beginning of the presentation. From affc7687d33af4111febdadbeee450e4db9af89e Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 18 Feb 2014 17:12:30 +0100 Subject: [PATCH 016/822] doc: Sort the muxer documentation Keep the sections alphabetically sorted. (cherry picked from commit a7b3216cbdc7796a9d14cd22a863fae3556098ba) --- doc/muxers.texi | 316 ++++++++++++++++++++++++------------------------ 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index cf312c1f6c..1d8f0d93c0 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -179,141 +179,6 @@ images. @end table -@section MOV/MP4/ISMV - -The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 -file has all the metadata about all packets stored in one location -(written at the end of the file, it can be moved to the start for -better playback using the @command{qt-faststart} tool). A fragmented -file consists of a number of fragments, where packets and metadata -about these packets are stored together. Writing a fragmented -file has the advantage that the file is decodable even if the -writing is interrupted (while a normal MOV/MP4 is undecodable if -it is not properly finished), and it requires less memory when writing -very long files (since writing normal MOV/MP4 files stores info about -every single packet in memory until the file is closed). The downside -is that it is less compatible with other applications. - -Fragmentation is enabled by setting one of the AVOptions that define -how to cut the file into fragments: - -@table @option -@item -movflags frag_keyframe -Start a new fragment at each video keyframe. -@item -frag_duration @var{duration} -Create fragments that are @var{duration} microseconds long. -@item -frag_size @var{size} -Create fragments that contain up to @var{size} bytes of payload data. -@item -movflags frag_custom -Allow the caller to manually choose when to cut fragments, by -calling @code{av_write_frame(ctx, NULL)} to write a fragment with -the packets written so far. (This is only useful with other -applications integrating libavformat, not from @command{avconv}.) -@item -min_frag_duration @var{duration} -Don't create fragments that are shorter than @var{duration} microseconds long. -@end table - -If more than one condition is specified, fragments are cut when -one of the specified conditions is fulfilled. The exception to this is -@code{-min_frag_duration}, which has to be fulfilled for any of the other -conditions to apply. - -Additionally, the way the output file is written can be adjusted -through a few other options: - -@table @option -@item -movflags empty_moov -Write an initial moov atom directly at the start of the file, without -describing any samples in it. Generally, an mdat/moov pair is written -at the start of the file, as a normal MOV/MP4 file, containing only -a short portion of the file. With this option set, there is no initial -mdat atom, and the moov atom only describes the tracks but has -a zero duration. - -Files written with this option set do not work in QuickTime. -This option is implicitly set when writing ismv (Smooth Streaming) files. -@item -movflags separate_moof -Write a separate moof (movie fragment) atom for each track. Normally, -packets for all tracks are written in a moof atom (which is slightly -more efficient), but with this option set, the muxer writes one moof/mdat -pair for each track, making it easier to separate tracks. - -This option is implicitly set when writing ismv (Smooth Streaming) files. -@item -movflags faststart -Run a second pass moving the index (moov atom) to the beginning of the file. -This operation can take a while, and will not work in various situations such -as fragmented output, thus it is not enabled by default. -@end table - -Smooth Streaming content can be pushed in real time to a publishing -point on IIS with this muxer. Example: -@example -avconv -re @var{} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1) -@end example - -@section mpegts - -MPEG transport stream muxer. - -This muxer implements ISO 13818-1 and part of ETSI EN 300 468. - -The muxer options are: - -@table @option -@item -mpegts_original_network_id @var{number} -Set the original_network_id (default 0x0001). This is unique identifier -of a network in DVB. Its main use is in the unique identification of a -service through the path Original_Network_ID, Transport_Stream_ID. -@item -mpegts_transport_stream_id @var{number} -Set the transport_stream_id (default 0x0001). This identifies a -transponder in DVB. -@item -mpegts_service_id @var{number} -Set the service_id (default 0x0001) also known as program in DVB. -@item -mpegts_pmt_start_pid @var{number} -Set the first PID for PMT (default 0x1000, max 0x1f00). -@item -mpegts_start_pid @var{number} -Set the first PID for data packets (default 0x0100, max 0x0f00). -@end table - -The recognized metadata settings in mpegts muxer are @code{service_provider} -and @code{service_name}. If they are not set the default for -@code{service_provider} is "Libav" and the default for -@code{service_name} is "Service01". - -@example -avconv -i file.mpg -c copy \ - -mpegts_original_network_id 0x1122 \ - -mpegts_transport_stream_id 0x3344 \ - -mpegts_service_id 0x5566 \ - -mpegts_pmt_start_pid 0x1500 \ - -mpegts_start_pid 0x150 \ - -metadata service_provider="Some provider" \ - -metadata service_name="Some Channel" \ - -y out.ts -@end example - -@section null - -Null muxer. - -This muxer does not generate any output file, it is mainly useful for -testing or benchmarking purposes. - -For example to benchmark decoding with @command{avconv} you can use the -command: -@example -avconv -benchmark -i INPUT -f null out.null -@end example - -Note that the above command does not read or write the @file{out.null} -file, but specifying the output file is required by the @command{avconv} -syntax. - -Alternatively you can write the command as: -@example -avconv -benchmark -i INPUT -f null - -@end example - @section matroska Matroska container muxer. @@ -398,36 +263,76 @@ have no effect if it is not. @end table -@section segment +@section MOV/MP4/ISMV -Basic stream segmenter. +The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 +file has all the metadata about all packets stored in one location +(written at the end of the file, it can be moved to the start for +better playback using the @command{qt-faststart} tool). A fragmented +file consists of a number of fragments, where packets and metadata +about these packets are stored together. Writing a fragmented +file has the advantage that the file is decodable even if the +writing is interrupted (while a normal MOV/MP4 is undecodable if +it is not properly finished), and it requires less memory when writing +very long files (since writing normal MOV/MP4 files stores info about +every single packet in memory until the file is closed). The downside +is that it is less compatible with other applications. -The segmenter muxer outputs streams to a number of separate files of nearly -fixed duration. Output filename pattern can be set in a fashion similar to -@ref{image2}. - -Every segment starts with a video keyframe, if a video stream is present. -The segment muxer works best with a single constant frame rate video. - -Optionally it can generate a flat list of the created segments, one segment -per line. +Fragmentation is enabled by setting one of the AVOptions that define +how to cut the file into fragments: @table @option -@item segment_format @var{format} -Override the inner container format, by default it is guessed by the filename -extension. -@item segment_time @var{t} -Set segment duration to @var{t} seconds. -@item segment_list @var{name} -Generate also a listfile named @var{name}. -@item segment_list_size @var{size} -Overwrite the listfile once it reaches @var{size} entries. -@item segment_wrap @var{limit} -Wrap around segment index once it reaches @var{limit}. +@item -movflags frag_keyframe +Start a new fragment at each video keyframe. +@item -frag_duration @var{duration} +Create fragments that are @var{duration} microseconds long. +@item -frag_size @var{size} +Create fragments that contain up to @var{size} bytes of payload data. +@item -movflags frag_custom +Allow the caller to manually choose when to cut fragments, by +calling @code{av_write_frame(ctx, NULL)} to write a fragment with +the packets written so far. (This is only useful with other +applications integrating libavformat, not from @command{avconv}.) +@item -min_frag_duration @var{duration} +Don't create fragments that are shorter than @var{duration} microseconds long. @end table +If more than one condition is specified, fragments are cut when +one of the specified conditions is fulfilled. The exception to this is +@code{-min_frag_duration}, which has to be fulfilled for any of the other +conditions to apply. + +Additionally, the way the output file is written can be adjusted +through a few other options: + +@table @option +@item -movflags empty_moov +Write an initial moov atom directly at the start of the file, without +describing any samples in it. Generally, an mdat/moov pair is written +at the start of the file, as a normal MOV/MP4 file, containing only +a short portion of the file. With this option set, there is no initial +mdat atom, and the moov atom only describes the tracks but has +a zero duration. + +Files written with this option set do not work in QuickTime. +This option is implicitly set when writing ismv (Smooth Streaming) files. +@item -movflags separate_moof +Write a separate moof (movie fragment) atom for each track. Normally, +packets for all tracks are written in a moof atom (which is slightly +more efficient), but with this option set, the muxer writes one moof/mdat +pair for each track, making it easier to separate tracks. + +This option is implicitly set when writing ismv (Smooth Streaming) files. +@item -movflags faststart +Run a second pass moving the index (moov atom) to the beginning of the file. +This operation can take a while, and will not work in various situations such +as fragmented output, thus it is not enabled by default. +@end table + +Smooth Streaming content can be pushed in real time to a publishing +point on IIS with this muxer. Example: @example -avconv -i in.mkv -c copy -map 0 -f segment -list out.list out%03d.nut +avconv -re @var{} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1) @end example @section mp3 @@ -473,6 +378,69 @@ Write a "clean" MP3 without any extra features: avconv -i input.wav -write_xing 0 -id3v2_version 0 out.mp3 @end example +@section mpegts + +MPEG transport stream muxer. + +This muxer implements ISO 13818-1 and part of ETSI EN 300 468. + +The muxer options are: + +@table @option +@item -mpegts_original_network_id @var{number} +Set the original_network_id (default 0x0001). This is unique identifier +of a network in DVB. Its main use is in the unique identification of a +service through the path Original_Network_ID, Transport_Stream_ID. +@item -mpegts_transport_stream_id @var{number} +Set the transport_stream_id (default 0x0001). This identifies a +transponder in DVB. +@item -mpegts_service_id @var{number} +Set the service_id (default 0x0001) also known as program in DVB. +@item -mpegts_pmt_start_pid @var{number} +Set the first PID for PMT (default 0x1000, max 0x1f00). +@item -mpegts_start_pid @var{number} +Set the first PID for data packets (default 0x0100, max 0x0f00). +@end table + +The recognized metadata settings in mpegts muxer are @code{service_provider} +and @code{service_name}. If they are not set the default for +@code{service_provider} is "Libav" and the default for +@code{service_name} is "Service01". + +@example +avconv -i file.mpg -c copy \ + -mpegts_original_network_id 0x1122 \ + -mpegts_transport_stream_id 0x3344 \ + -mpegts_service_id 0x5566 \ + -mpegts_pmt_start_pid 0x1500 \ + -mpegts_start_pid 0x150 \ + -metadata service_provider="Some provider" \ + -metadata service_name="Some Channel" \ + -y out.ts +@end example + +@section null + +Null muxer. + +This muxer does not generate any output file, it is mainly useful for +testing or benchmarking purposes. + +For example to benchmark decoding with @command{avconv} you can use the +command: +@example +avconv -benchmark -i INPUT -f null out.null +@end example + +Note that the above command does not read or write the @file{out.null} +file, but specifying the output file is required by the @command{avconv} +syntax. + +Alternatively you can write the command as: +@example +avconv -benchmark -i INPUT -f null - +@end example + @section ogg Ogg container muxer. @@ -488,4 +456,36 @@ situations, giving a small seek granularity at the cost of additional container overhead. @end table +@section segment + +Basic stream segmenter. + +The segmenter muxer outputs streams to a number of separate files of nearly +fixed duration. Output filename pattern can be set in a fashion similar to +@ref{image2}. + +Every segment starts with a video keyframe, if a video stream is present. +The segment muxer works best with a single constant frame rate video. + +Optionally it can generate a flat list of the created segments, one segment +per line. + +@table @option +@item segment_format @var{format} +Override the inner container format, by default it is guessed by the filename +extension. +@item segment_time @var{t} +Set segment duration to @var{t} seconds. +@item segment_list @var{name} +Generate also a listfile named @var{name}. +@item segment_list_size @var{size} +Overwrite the listfile once it reaches @var{size} entries. +@item segment_wrap @var{limit} +Wrap around segment index once it reaches @var{limit}. +@end table + +@example +avconv -i in.mkv -c copy -map 0 -f segment -list out.list out%03d.nut +@end example + @c man end MUXERS From bb4820727f4b646c238ecc91955fda4f648834d7 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 23 Dec 2013 16:39:36 +0100 Subject: [PATCH 017/822] x86: dsputil: Use correct file name as multiple inclusion guard (cherry picked from commit 017a06a9ee86b047079166c2694c9c655ff03356) --- libavcodec/x86/dsputil_x86.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/dsputil_x86.h b/libavcodec/x86/dsputil_x86.h index c8615b2472..c003cee027 100644 --- a/libavcodec/x86/dsputil_x86.h +++ b/libavcodec/x86/dsputil_x86.h @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_X86_DSPUTIL_MMX_H -#define AVCODEC_X86_DSPUTIL_MMX_H +#ifndef AVCODEC_X86_DSPUTIL_X86_H +#define AVCODEC_X86_DSPUTIL_X86_H #include #include @@ -186,4 +186,4 @@ STATIC void PFX1 ## _pixels16 ## TYPE ## CPUEXT(uint8_t *block, \ line_size, h); \ } -#endif /* AVCODEC_X86_DSPUTIL_MMX_H */ +#endif /* AVCODEC_X86_DSPUTIL_X86_H */ From 1779cd7695ab26a5f708df6f743d4d8fe806ce7b Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 16 Feb 2014 22:09:30 +0100 Subject: [PATCH 018/822] doxygen: Replace @parblock syntax with manual linebreaks @parblock is only supported in very recent Doxygen versions. (cherry picked from commit 2f2b2efd31f6af997812a70de22b6d717fb41d4e) --- libavformat/avformat.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ec1f9c77b0..ec9c2627cb 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1543,24 +1543,22 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options); * function. * * @param s media file handle - * @param pkt @parblock - * The packet containing the data to be written. Note that unlike + * @param pkt The packet containing the data to be written. Note that unlike * av_interleaved_write_frame(), this function does not take * ownership of the packet passed to it (though some muxers may make * an internal reference to the input packet). - * + *
* This parameter can be NULL (at any time, not just at the end), in * order to immediately flush data buffered within the muxer, for * muxers that buffer up data internally before writing it to the * output. - * + *
* Packet's @ref AVPacket.stream_index "stream_index" field must be * set to the index of the corresponding stream in @ref * AVFormatContext.streams "s->streams". It is very strongly * recommended that timing information (@ref AVPacket.pts "pts", @ref * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to * correct values. - * @endparblock * @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush * * @see av_interleaved_write_frame() @@ -1576,26 +1574,24 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); * av_write_frame() instead of this function. * * @param s media file handle - * @param pkt @parblock - * The packet containing the data to be written. - * + * @param pkt The packet containing the data to be written. + *
* If the packet is reference-counted, this function will take * ownership of this reference and unreference it later when it sees * fit. * The caller must not access the data through this reference after * this function returns. If the packet is not reference-counted, * libavformat will make a copy. - * + *
* This parameter can be NULL (at any time, not just at the end), to * flush the interleaving queues. - * + *
* Packet's @ref AVPacket.stream_index "stream_index" field must be * set to the index of the corresponding stream in @ref * AVFormatContext.streams "s->streams". It is very strongly * recommended that timing information (@ref AVPacket.pts "pts", @ref * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to * correct values. - * @endparblock * * @return 0 on success, a negative AVERROR on error. Libavformat will always * take care of freeing the packet, even if this function fails. From 1853d8bb7a50a19f9abdd59f130b4cf954684f90 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 18 Feb 2014 21:57:12 +0100 Subject: [PATCH 019/822] doc: Name the MOV muxer as it should be called The section name is the muxer, not the format. (cherry picked from commit 93632a70f9ac2cb2ebf0e69d21fdfaae68ff02fd) --- doc/muxers.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 1d8f0d93c0..143e595056 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -263,7 +263,7 @@ have no effect if it is not. @end table -@section MOV/MP4/ISMV +@section mov, mp4, ismv The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 file has all the metadata about all packets stored in one location From 697be8173bc7c593ebfc30b654b5dc6eafe1f8a3 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 14 Feb 2014 17:00:06 +0100 Subject: [PATCH 020/822] h264: avoid undefined behavior in chroma motion compensation Makes fate-h264 pass under valgrind --undef-value-errors=yes with -cpuflags none. {avg,put}_h264_chroma_mc8_8 approximately 5% faster, {avg,put}_h264_chroma_mc4_8 2% faster both on x86 and arm. (cherry picked from commit 982b596ea6640bfe218a31f6c3fc542d9fe61c31) --- libavcodec/h264chroma_template.c | 35 +++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264chroma_template.c b/libavcodec/h264chroma_template.c index 351d9d2f2e..028ed132cf 100644 --- a/libavcodec/h264chroma_template.c +++ b/libavcodec/h264chroma_template.c @@ -43,7 +43,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t * dst+= stride;\ src+= stride;\ }\ - }else{\ + } else if (B + C) {\ const int E= B+C;\ const int step= C ? stride : 1;\ for(i=0; i Date: Fri, 7 Feb 2014 16:22:54 +0200 Subject: [PATCH 021/822] arm: Mark the stack as non-executable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If linking in an object file without this attribute set, the linker will assume that an executable stack might be needed. Signed-off-by: Martin Storsjö (cherry picked from commit 543156d7518f5e5d731123da066d86278f9fa492) --- libavutil/arm/asm.S | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index f4523ea310..45fdf55522 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -53,6 +53,7 @@ .syntax unified T .thumb ELF .eabi_attribute 25, 1 @ Tag_ABI_align_preserved +ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable .macro function name, export=0, align=2 .set .Lpic_idx, 0 From 646c564de545d808465e231dfcec60539654de2c Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 18 Feb 2014 23:55:29 +0100 Subject: [PATCH 022/822] hevc: Mention the missing SPS in the error message (cherry picked from commit 175e5063320f585118a5461f15dbacf2ce17e97d) --- libavcodec/hevc_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 0c1550e09c..c3aabe7cc7 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1029,7 +1029,7 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) goto err; } if (!s->sps_list[pps->sps_id]) { - av_log(s->avctx, AV_LOG_ERROR, "SPS does not exist \n"); + av_log(s->avctx, AV_LOG_ERROR, "SPS %u does not exist.\n", pps->sps_id); ret = AVERROR_INVALIDDATA; goto err; } From 2897481f64c8ab856b2121ae900d822930d0a5fc Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Fri, 14 Feb 2014 15:03:10 +0000 Subject: [PATCH 023/822] dca: replace some memcpy by AV_COPY128 Signed-off-by: Janne Grunau (cherry picked from commit ef010f08ae53479c54e2f16be5a7e1a809a9e268) --- libavcodec/dcadec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 723ed191dc..6c240ee5fd 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1241,9 +1241,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index) /* Backup predictor history for adpcm */ for (k = base_channel; k < s->prim_channels; k++) for (l = 0; l < s->vq_start_subband[k]; l++) - memcpy(s->subband_samples_hist[k][l], - &subband_samples[k][l][4], - 4 * sizeof(subband_samples[0][0][0])); + AV_COPY128(s->subband_samples_hist[k][l], &subband_samples[k][l][4]); return 0; } From 9841617b7f862fcf24ad05eda865a3f323ee0dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 28 Feb 2014 12:19:49 +0200 Subject: [PATCH 024/822] qt-faststart: Avoid unintentionally sign extending BE_32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this cast, the BE_32() expression is sign extended when assigned to an uint64_t, since the uint8_t|uint8_t expression is promoted to an int. Also avoid undefined behaviour when left shifting an uint8_t by 24 by casting it to an uint32_t explicitly before shifting. Based on a patch by Michael Niedermayer. Signed-off-by: Martin Storsjö (cherry picked from commit ea7f79f93796d68559a495be824b6bbd94dfe5f6) --- tools/qt-faststart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 792c272193..3a0139fecb 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -41,10 +41,10 @@ #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) -#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ - (((uint8_t*)(x))[1] << 16) | \ - (((uint8_t*)(x))[2] << 8) | \ - ((uint8_t*)(x))[3]) +#define BE_32(x) (((uint32_t)(((uint8_t*)(x))[0]) << 24) | \ + (((uint8_t*)(x))[1] << 16) | \ + (((uint8_t*)(x))[2] << 8) | \ + ((uint8_t*)(x))[3]) #define BE_64(x) (((uint64_t)(((uint8_t*)(x))[0]) << 56) | \ ((uint64_t)(((uint8_t*)(x))[1]) << 48) | \ @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { break; } - atom_size = (uint32_t) BE_32(&atom_bytes[0]); + atom_size = BE_32(&atom_bytes[0]); atom_type = BE_32(&atom_bytes[4]); /* keep ftyp atom */ From 33e1bca6517d60a3113e60ed40b9bd50dbf90f4b Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 18 Feb 2014 18:37:48 +0100 Subject: [PATCH 025/822] gitignore: Add all examples below doc/examples (cherry picked from commit 294a51e18ab7df4d658249361a03f0d716a4e9f0) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 01d93b9f1f..23339508e2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,8 @@ /doc/avoptions_codec.texi /doc/avoptions_format.texi /doc/doxy/html/ +/doc/examples/avcodec +/doc/examples/metadata /doc/examples/output /doc/examples/transcode_aac /doc/print_options From 9cc22be032980af0c47de0d8d3b9dd150dc31edb Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 28 Jan 2014 08:23:02 +0100 Subject: [PATCH 026/822] svq3: Adjust #endif comment (cherry picked from commit 61e7c7f27b0a2652bf5cd282b97762ee99d025ef) --- libavcodec/svq3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq3.h b/libavcodec/svq3.h index 8c67a23789..a20e620f8e 100644 --- a/libavcodec/svq3.h +++ b/libavcodec/svq3.h @@ -24,4 +24,4 @@ void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp); void ff_svq3_add_idct_c(uint8_t *dst, int16_t *block, int stride, int qp, int dc); -#endif /* AVCODEC_DSPUTIL_H */ +#endif /* AVCODEC_SVQ3_H */ From bc2c9a479aee3bed3dcb06245a008c93a01672c5 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 19 Feb 2014 21:41:12 +0100 Subject: [PATCH 027/822] avconv: Do not divide by zero (cherry picked from commit 5c79d2e12d13959fc6aed92d102c25194a06de05) --- avconv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/avconv.c b/avconv.c index edce1e5fb2..64e832149c 100644 --- a/avconv.c +++ b/avconv.c @@ -858,14 +858,18 @@ static void print_report(int is_last_report, int64_t timer_start) fflush(stderr); if (is_last_report) { - int64_t raw= audio_size + video_size + extra_size; + int64_t raw = audio_size + video_size + extra_size; + float percent = 0.0; + + if (raw) + percent = 100.0 * (total_size - raw) / raw; + av_log(NULL, AV_LOG_INFO, "\n"); av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB global headers:%1.0fkB muxing overhead %f%%\n", video_size / 1024.0, audio_size / 1024.0, extra_size / 1024.0, - 100.0 * (total_size - raw) / raw - ); + percent); } } From 58556826a80eb6b59fe08c780080fb8f24c1bae9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 19 Feb 2014 20:55:27 +0100 Subject: [PATCH 028/822] af_volume: preserve frame properties (cherry picked from commit 39c2880eeae6930b1036ce1f479afc1e1152c13f) --- libavfilter/af_volume.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 85d7067132..12d496ed4d 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -229,6 +229,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) AVFilterLink *outlink = inlink->dst->outputs[0]; int nb_samples = buf->nb_samples; AVFrame *out_buf; + int ret; if (vol->volume == 1.0 || vol->volume_i == 256) return ff_filter_frame(outlink, buf); @@ -240,7 +241,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) out_buf = ff_get_audio_buffer(inlink, nb_samples); if (!out_buf) return AVERROR(ENOMEM); - out_buf->pts = buf->pts; + ret = av_frame_copy_props(out_buf, buf); + if (ret < 0) { + av_frame_free(&out_buf); + av_frame_free(&buf); + return ret; + } } if (vol->precision != PRECISION_FIXED || vol->volume_i > 0) { From a6a2d8eb8f125a2edb512a7a47df33dbd70d6b35 Mon Sep 17 00:00:00 2001 From: Lou Logan Date: Tue, 7 Jan 2014 10:59:04 -0900 Subject: [PATCH 029/822] qt-faststart: Add a note about the -movflags +faststart feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö (cherry picked from commit 700687ebe07ac8b7a5cf5fd2c4892ea07a827080) --- tools/qt-faststart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 3a0139fecb..ed6de1b86c 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -102,7 +102,8 @@ int main(int argc, char *argv[]) int bytes_to_copy; if (argc != 3) { - printf("Usage: qt-faststart \n"); + printf("Usage: qt-faststart \n" + "Note: alternatively you can use -movflags +faststart in avconv\n"); return 0; } From 39dc4a6bb34baf833ce1e5eabad7d0dbf933237d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 18 Feb 2014 14:30:04 +0100 Subject: [PATCH 030/822] x86: dca: Add missing multiple inclusion guards (cherry picked from commit b23bc95920e2f10b9621857e829c45b064f356c0) --- libavcodec/x86/dca.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/x86/dca.h b/libavcodec/x86/dca.h index ab175b3afa..11d45ae61c 100644 --- a/libavcodec/x86/dca.h +++ b/libavcodec/x86/dca.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVCODEC_X86_DCA_H +#define AVCODEC_X86_DCA_H + #include "config.h" #if ARCH_X86_64 && HAVE_SSE2_INLINE @@ -53,3 +56,5 @@ static inline void int8x8_fmul_int32(av_unused DCADSPContext *dsp, } #endif /* ARCH_X86_64 && HAVE_SSE2_INLINE */ + +#endif /* AVCODEC_X86_DCA_H */ From 4015829accc2382393d42d62654eb96d896d1326 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 22 Dec 2013 14:19:28 +0100 Subject: [PATCH 031/822] bit_depth_template: Use file name as multiple inclusion guard (cherry picked from commit ba42c852477e87f6e47a5587e8f7829c46c52032) --- libavcodec/bit_depth_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/bit_depth_template.c b/libavcodec/bit_depth_template.c index 37d02adaf2..8fc826b7d2 100644 --- a/libavcodec/bit_depth_template.c +++ b/libavcodec/bit_depth_template.c @@ -22,7 +22,7 @@ #define BIT_DEPTH 8 #endif -#ifdef AVCODEC_H264_HIGH_DEPTH_H +#ifdef AVCODEC_BIT_DEPTH_TEMPLATE_C # undef pixel # undef pixel2 # undef pixel4 @@ -42,7 +42,7 @@ # undef av_clip_pixel # undef PIXEL_SPLAT_X4 #else -# define AVCODEC_H264_HIGH_DEPTH_H +# define AVCODEC_BIT_DEPTH_TEMPLATE_C #endif #if BIT_DEPTH > 8 From 7933039ade01b39638ec3d9e638b6ae06ee84984 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 19 Feb 2014 20:42:39 +0100 Subject: [PATCH 032/822] af_resample: preserve frame properties (cherry picked from commit dcc7e4bf1d0913123bfafbc58bf47bd41dd5848d) --- libavfilter/af_resample.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index 224e0ed28c..a89ab35e5c 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -252,6 +252,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (ret > 0) { out->nb_samples = ret; + + ret = av_frame_copy_props(out, in); + if (ret < 0) { + av_frame_free(&out); + goto fail; + } + + out->sample_rate = outlink->sample_rate; if (in->pts != AV_NOPTS_VALUE) { out->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base) - From ba21499648bbffc5518a41dc01a51449b9871088 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 26 Feb 2014 01:47:40 -0500 Subject: [PATCH 033/822] lavfi: add compand audio filter Signed-off-by: Anton Khirnov (cherry picked from commit 738f83582a3aaabb81309eacd4ab9c3d2acb4071) Conflicts: libavfilter/version.h --- Changelog | 4 + doc/filters.texi | 73 +++++ libavfilter/Makefile | 1 + libavfilter/af_compand.c | 587 +++++++++++++++++++++++++++++++++++++++ libavfilter/allfilters.c | 1 + libavfilter/version.h | 2 +- 6 files changed, 667 insertions(+), 1 deletion(-) create mode 100644 libavfilter/af_compand.c diff --git a/Changelog b/Changelog index bed6c315f5..427a617664 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,10 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version : +- compand audio filter + + version 10: - av_strnstr - support ID3v2 tags in ASF files diff --git a/doc/filters.texi b/doc/filters.texi index 8c83b4e7a2..5b47709c50 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -467,6 +467,79 @@ To fix a 5.1 WAV improperly encoded in AAC's native channel order avconv -i in.wav -filter 'channelmap=1|2|0|5|3|4:channel_layout=5.1' out.wav @end example +@section compand +Compress or expand audio dynamic range. + +A description of the accepted options follows. + +@table @option + +@item attacks +@item decays +Set list of times in seconds for each channel over which the instantaneous level +of the input signal is averaged to determine its volume. @var{attacks} refers to +increase of volume and @var{decays} refers to decrease of volume. For most +situations, the attack time (response to the audio getting louder) should be +shorter than the decay time because the human ear is more sensitive to sudden +loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and +a typical value for decay is 0.8 seconds. + +@item points +Set list of points for the transfer function, specified in dB relative to the +maximum possible signal amplitude. Each key points list must be defined using +the following syntax: @code{x0/y0|x1/y1|x2/y2|....} + +The input values must be in strictly increasing order but the transfer function +does not have to be monotonically rising. The point @code{0/0} is assumed but +may be overridden (by @code{0/out-dBn}). Typical values for the transfer +function are @code{-70/-70|-60/-20}. + +@item soft-knee +Set the curve radius in dB for all joints. Defaults to 0.01. + +@item gain +Set additional gain in dB to be applied at all points on the transfer function. +This allows easy adjustment of the overall gain. Defaults to 0. + +@item volume +Set initial volume in dB to be assumed for each channel when filtering starts. +This permits the user to supply a nominal level initially, so that, for +example, a very large gain is not applied to initial signal levels before the +companding has begun to operate. A typical value for audio which is initially +quiet is -90 dB. Defaults to 0. + +@item delay +Set delay in seconds. The input audio is analyzed immediately, but audio is +delayed before being fed to the volume adjuster. Specifying a delay +approximately equal to the attack/decay times allows the filter to effectively +operate in predictive rather than reactive mode. Defaults to 0. + +@end table + +@subsection Examples + +@itemize +@item +Make music with both quiet and loud passages suitable for listening in a noisy +environment: +@example +compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2 +@end example + +@item +Noise gate for when the noise is at a lower level than the signal: +@example +compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1 +@end example + +@item +Here is another noise gate, this time for when the noise is at a higher level +than the signal (making it, in some ways, similar to squelch): +@example +compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1 +@end example +@end itemize + @section join Join multiple input streams into one multi-channel stream. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 92c1561799..23dbd1d1c1 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -34,6 +34,7 @@ OBJS-$(CONFIG_ASYNCTS_FILTER) += af_asyncts.o OBJS-$(CONFIG_ATRIM_FILTER) += trim.o OBJS-$(CONFIG_CHANNELMAP_FILTER) += af_channelmap.o OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o +OBJS-$(CONFIG_COMPAND_FILTER) += af_compand.o OBJS-$(CONFIG_JOIN_FILTER) += af_join.o OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o OBJS-$(CONFIG_VOLUME_FILTER) += af_volume.o diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c new file mode 100644 index 0000000000..19065944f9 --- /dev/null +++ b/libavfilter/af_compand.c @@ -0,0 +1,587 @@ +/* + * Copyright (c) 1999 Chris Bagwell + * Copyright (c) 1999 Nick Bailey + * Copyright (c) 2007 Rob Sykes + * Copyright (c) 2013 Paul B Mahol + * Copyright (c) 2014 Andrew Kelley + * + * This file is part of libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * audio compand filter + */ + +#include + +#include "libavutil/channel_layout.h" +#include "libavutil/common.h" +#include "libavutil/mathematics.h" +#include "libavutil/mem.h" +#include "libavutil/opt.h" +#include "audio.h" +#include "avfilter.h" +#include "formats.h" +#include "internal.h" + +typedef struct ChanParam { + float attack; + float decay; + float volume; +} ChanParam; + +typedef struct CompandSegment { + float x, y; + float a, b; +} CompandSegment; + +typedef struct CompandContext { + const AVClass *class; + int nb_channels; + int nb_segments; + char *attacks, *decays, *points; + CompandSegment *segments; + ChanParam *channels; + float in_min_lin; + float out_min_lin; + double curve_dB; + double gain_dB; + double initial_volume; + double delay; + AVFrame *delay_frame; + int delay_samples; + int delay_count; + int delay_index; + int64_t pts; + + int (*compand)(AVFilterContext *ctx, AVFrame *frame); +} CompandContext; + +#define OFFSET(x) offsetof(CompandContext, x) +#define A AV_OPT_FLAG_AUDIO_PARAM + +static const AVOption compand_options[] = { + { "attacks", "set time over which increase of volume is determined", OFFSET(attacks), AV_OPT_TYPE_STRING, { .str = "0.3" }, 0, 0, A }, + { "decays", "set time over which decrease of volume is determined", OFFSET(decays), AV_OPT_TYPE_STRING, { .str = "0.8" }, 0, 0, A }, + { "points", "set points of transfer function", OFFSET(points), AV_OPT_TYPE_STRING, { .str = "-70/-70|-60/-20" }, 0, 0, A }, + { "soft-knee", "set soft-knee", OFFSET(curve_dB), AV_OPT_TYPE_DOUBLE, { .dbl = 0.01 }, 0.01, 900, A }, + { "gain", "set output gain", OFFSET(gain_dB), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -900, 900, A }, + { "volume", "set initial volume", OFFSET(initial_volume), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -900, 0, A }, + { "delay", "set delay for samples before sending them to volume adjuster", OFFSET(delay), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, 0, 20, A }, + { NULL } +}; + +static const AVClass compand_class = { + .class_name = "compand filter", + .item_name = av_default_item_name, + .option = compand_options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static av_cold int init(AVFilterContext *ctx) +{ + CompandContext *s = ctx->priv; + s->pts = AV_NOPTS_VALUE; + return 0; +} + +static av_cold void uninit(AVFilterContext *ctx) +{ + CompandContext *s = ctx->priv; + + av_freep(&s->channels); + av_freep(&s->segments); + av_frame_free(&s->delay_frame); +} + +static int query_formats(AVFilterContext *ctx) +{ + AVFilterChannelLayouts *layouts; + AVFilterFormats *formats; + static const enum AVSampleFormat sample_fmts[] = { + AV_SAMPLE_FMT_FLTP, + AV_SAMPLE_FMT_NONE + }; + + layouts = ff_all_channel_layouts(); + if (!layouts) + return AVERROR(ENOMEM); + ff_set_common_channel_layouts(ctx, layouts); + + formats = ff_make_format_list(sample_fmts); + if (!formats) + return AVERROR(ENOMEM); + ff_set_common_formats(ctx, formats); + + formats = ff_all_samplerates(); + if (!formats) + return AVERROR(ENOMEM); + ff_set_common_samplerates(ctx, formats); + + return 0; +} + +static void count_items(char *item_str, int *nb_items) +{ + char *p; + + *nb_items = 1; + for (p = item_str; *p; p++) { + if (*p == '|') + (*nb_items)++; + } +} + +static void update_volume(ChanParam *cp, float in) +{ + float delta = in - cp->volume; + + if (delta > 0.0) + cp->volume += delta * cp->attack; + else + cp->volume += delta * cp->decay; +} + +static float get_volume(CompandContext *s, float in_lin) +{ + CompandSegment *cs; + float in_log, out_log; + int i; + + if (in_lin < s->in_min_lin) + return s->out_min_lin; + + in_log = logf(in_lin); + + for (i = 1; i < s->nb_segments; i++) + if (in_log <= s->segments[i].x) + break; + cs = &s->segments[i - 1]; + in_log -= cs->x; + out_log = cs->y + in_log * (cs->a * in_log + cs->b); + + return expf(out_log); +} + +static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame) +{ + CompandContext *s = ctx->priv; + AVFilterLink *inlink = ctx->inputs[0]; + const int channels = s->nb_channels; + const int nb_samples = frame->nb_samples; + AVFrame *out_frame; + int chan, i; + int err; + + if (av_frame_is_writable(frame)) { + out_frame = frame; + } else { + out_frame = ff_get_audio_buffer(inlink, nb_samples); + if (!out_frame) { + av_frame_free(&frame); + return AVERROR(ENOMEM); + } + err = av_frame_copy_props(out_frame, frame); + if (err < 0) { + av_frame_free(&out_frame); + av_frame_free(&frame); + return err; + } + } + + for (chan = 0; chan < channels; chan++) { + const float *src = (float *)frame->extended_data[chan]; + float *dst = (float *)out_frame->extended_data[chan]; + ChanParam *cp = &s->channels[chan]; + + for (i = 0; i < nb_samples; i++) { + update_volume(cp, fabs(src[i])); + + dst[i] = av_clipf(src[i] * get_volume(s, cp->volume), -1.0f, 1.0f); + } + } + + if (frame != out_frame) + av_frame_free(&frame); + + return ff_filter_frame(ctx->outputs[0], out_frame); +} + +#define MOD(a, b) (((a) >= (b)) ? (a) - (b) : (a)) + +static int compand_delay(AVFilterContext *ctx, AVFrame *frame) +{ + CompandContext *s = ctx->priv; + AVFilterLink *inlink = ctx->inputs[0]; + const int channels = s->nb_channels; + const int nb_samples = frame->nb_samples; + int chan, i, dindex = 0, oindex, count = 0; + AVFrame *out_frame = NULL; + int err; + + if (s->pts == AV_NOPTS_VALUE) { + s->pts = (frame->pts == AV_NOPTS_VALUE) ? 0 : frame->pts; + } + + for (chan = 0; chan < channels; chan++) { + AVFrame *delay_frame = s->delay_frame; + const float *src = (float *)frame->extended_data[chan]; + float *dbuf = (float *)delay_frame->extended_data[chan]; + ChanParam *cp = &s->channels[chan]; + float *dst; + + count = s->delay_count; + dindex = s->delay_index; + for (i = 0, oindex = 0; i < nb_samples; i++) { + const float in = src[i]; + update_volume(cp, fabs(in)); + + if (count >= s->delay_samples) { + if (!out_frame) { + out_frame = ff_get_audio_buffer(inlink, nb_samples - i); + if (!out_frame) { + av_frame_free(&frame); + return AVERROR(ENOMEM); + } + err = av_frame_copy_props(out_frame, frame); + if (err < 0) { + av_frame_free(&out_frame); + av_frame_free(&frame); + return err; + } + out_frame->pts = s->pts; + s->pts += av_rescale_q(nb_samples - i, + (AVRational){ 1, inlink->sample_rate }, + inlink->time_base); + } + + dst = (float *)out_frame->extended_data[chan]; + dst[oindex++] = av_clipf(dbuf[dindex] * + get_volume(s, cp->volume), -1.0f, 1.0f); + } else { + count++; + } + + dbuf[dindex] = in; + dindex = MOD(dindex + 1, s->delay_samples); + } + } + + s->delay_count = count; + s->delay_index = dindex; + + av_frame_free(&frame); + return out_frame ? ff_filter_frame(ctx->outputs[0], out_frame) : 0; +} + +static int compand_drain(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + CompandContext *s = ctx->priv; + const int channels = s->nb_channels; + AVFrame *frame = NULL; + int chan, i, dindex; + + /* 2048 is to limit output frame size during drain */ + frame = ff_get_audio_buffer(outlink, FFMIN(2048, s->delay_count)); + if (!frame) + return AVERROR(ENOMEM); + frame->pts = s->pts; + s->pts += av_rescale_q(frame->nb_samples, + (AVRational){ 1, outlink->sample_rate }, outlink->time_base); + + for (chan = 0; chan < channels; chan++) { + AVFrame *delay_frame = s->delay_frame; + float *dbuf = (float *)delay_frame->extended_data[chan]; + float *dst = (float *)frame->extended_data[chan]; + ChanParam *cp = &s->channels[chan]; + + dindex = s->delay_index; + for (i = 0; i < frame->nb_samples; i++) { + dst[i] = av_clipf(dbuf[dindex] * get_volume(s, cp->volume), + -1.0f, 1.0f); + dindex = MOD(dindex + 1, s->delay_samples); + } + } + s->delay_count -= frame->nb_samples; + s->delay_index = dindex; + + return ff_filter_frame(outlink, frame); +} + +static int config_output(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + CompandContext *s = ctx->priv; + const int sample_rate = outlink->sample_rate; + double radius = s->curve_dB * M_LN10 / 20.0; + char *p, *saveptr = NULL; + const int channels = + av_get_channel_layout_nb_channels(outlink->channel_layout); + int nb_attacks, nb_decays, nb_points; + int new_nb_items, num; + int i; + int err; + + + count_items(s->attacks, &nb_attacks); + count_items(s->decays, &nb_decays); + count_items(s->points, &nb_points); + + if (channels <= 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid number of channels: %d\n", channels); + return AVERROR(EINVAL); + } + + if (nb_attacks > channels || nb_decays > channels) { + av_log(ctx, AV_LOG_ERROR, + "Number of attacks/decays bigger than number of channels.\n"); + return AVERROR(EINVAL); + } + + uninit(ctx); + + s->nb_channels = channels; + s->channels = av_mallocz_array(channels, sizeof(*s->channels)); + s->nb_segments = (nb_points + 4) * 2; + s->segments = av_mallocz_array(s->nb_segments, sizeof(*s->segments)); + + if (!s->channels || !s->segments) { + uninit(ctx); + return AVERROR(ENOMEM); + } + + p = s->attacks; + for (i = 0, new_nb_items = 0; i < nb_attacks; i++) { + char *tstr = strtok_r(p, "|", &saveptr); + p = NULL; + new_nb_items += sscanf(tstr, "%f", &s->channels[i].attack) == 1; + if (s->channels[i].attack < 0) { + uninit(ctx); + return AVERROR(EINVAL); + } + } + nb_attacks = new_nb_items; + + p = s->decays; + for (i = 0, new_nb_items = 0; i < nb_decays; i++) { + char *tstr = strtok_r(p, "|", &saveptr); + p = NULL; + new_nb_items += sscanf(tstr, "%f", &s->channels[i].decay) == 1; + if (s->channels[i].decay < 0) { + uninit(ctx); + return AVERROR(EINVAL); + } + } + nb_decays = new_nb_items; + + if (nb_attacks != nb_decays) { + av_log(ctx, AV_LOG_ERROR, + "Number of attacks %d differs from number of decays %d.\n", + nb_attacks, nb_decays); + uninit(ctx); + return AVERROR(EINVAL); + } + +#define S(x) s->segments[2 * ((x) + 1)] + p = s->points; + for (i = 0, new_nb_items = 0; i < nb_points; i++) { + char *tstr = strtok_r(p, "|", &saveptr); + p = NULL; + if (sscanf(tstr, "%f/%f", &S(i).x, &S(i).y) != 2) { + av_log(ctx, AV_LOG_ERROR, + "Invalid and/or missing input/output value.\n"); + uninit(ctx); + return AVERROR(EINVAL); + } + if (i && S(i - 1).x > S(i).x) { + av_log(ctx, AV_LOG_ERROR, + "Transfer function input values must be increasing.\n"); + uninit(ctx); + return AVERROR(EINVAL); + } + S(i).y -= S(i).x; + av_log(ctx, AV_LOG_DEBUG, "%d: x=%f y=%f\n", i, S(i).x, S(i).y); + new_nb_items++; + } + num = new_nb_items; + + /* Add 0,0 if necessary */ + if (num == 0 || S(num - 1).x) + num++; + +#undef S +#define S(x) s->segments[2 * (x)] + /* Add a tail off segment at the start */ + S(0).x = S(1).x - 2 * s->curve_dB; + S(0).y = S(1).y; + num++; + + /* Join adjacent colinear segments */ + for (i = 2; i < num; i++) { + double g1 = (S(i - 1).y - S(i - 2).y) * (S(i - 0).x - S(i - 1).x); + double g2 = (S(i - 0).y - S(i - 1).y) * (S(i - 1).x - S(i - 2).x); + int j; + + /* here we purposefully lose precision so that we can compare floats */ + if (fabs(g1 - g2)) + continue; + num--; + for (j = --i; j < num; j++) + S(j) = S(j + 1); + } + + for (i = 0; !i || s->segments[i - 2].x; i += 2) { + s->segments[i].y += s->gain_dB; + s->segments[i].x *= M_LN10 / 20; + s->segments[i].y *= M_LN10 / 20; + } + +#define L(x) s->segments[i - (x)] + for (i = 4; s->segments[i - 2].x; i += 2) { + double x, y, cx, cy, in1, in2, out1, out2, theta, len, r; + + L(4).a = 0; + L(4).b = (L(2).y - L(4).y) / (L(2).x - L(4).x); + + L(2).a = 0; + L(2).b = (L(0).y - L(2).y) / (L(0).x - L(2).x); + + theta = atan2(L(2).y - L(4).y, L(2).x - L(4).x); + len = sqrt(pow(L(2).x - L(4).x, 2.) + pow(L(2).y - L(4).y, 2.)); + r = FFMIN(radius, len); + L(3).x = L(2).x - r * cos(theta); + L(3).y = L(2).y - r * sin(theta); + + theta = atan2(L(0).y - L(2).y, L(0).x - L(2).x); + len = sqrt(pow(L(0).x - L(2).x, 2.) + pow(L(0).y - L(2).y, 2.)); + r = FFMIN(radius, len / 2); + x = L(2).x + r * cos(theta); + y = L(2).y + r * sin(theta); + + cx = (L(3).x + L(2).x + x) / 3; + cy = (L(3).y + L(2).y + y) / 3; + + L(2).x = x; + L(2).y = y; + + in1 = cx - L(3).x; + out1 = cy - L(3).y; + in2 = L(2).x - L(3).x; + out2 = L(2).y - L(3).y; + L(3).a = (out2 / in2 - out1 / in1) / (in2 - in1); + L(3).b = out1 / in1 - L(3).a * in1; + } + L(3).x = 0; + L(3).y = L(2).y; + + s->in_min_lin = exp(s->segments[1].x); + s->out_min_lin = exp(s->segments[1].y); + + for (i = 0; i < channels; i++) { + ChanParam *cp = &s->channels[i]; + + if (cp->attack > 1.0 / sample_rate) + cp->attack = 1.0 - exp(-1.0 / (sample_rate * cp->attack)); + else + cp->attack = 1.0; + if (cp->decay > 1.0 / sample_rate) + cp->decay = 1.0 - exp(-1.0 / (sample_rate * cp->decay)); + else + cp->decay = 1.0; + cp->volume = pow(10.0, s->initial_volume / 20); + } + + s->delay_samples = s->delay * sample_rate; + if (s->delay_samples <= 0) { + s->compand = compand_nodelay; + return 0; + } + + s->delay_frame = av_frame_alloc(); + if (!s->delay_frame) { + uninit(ctx); + return AVERROR(ENOMEM); + } + + s->delay_frame->format = outlink->format; + s->delay_frame->nb_samples = s->delay_samples; + s->delay_frame->channel_layout = outlink->channel_layout; + + err = av_frame_get_buffer(s->delay_frame, 32); + if (err) + return err; + + s->compand = compand_delay; + return 0; +} + +static int filter_frame(AVFilterLink *inlink, AVFrame *frame) +{ + AVFilterContext *ctx = inlink->dst; + CompandContext *s = ctx->priv; + + return s->compand(ctx, frame); +} + +static int request_frame(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + CompandContext *s = ctx->priv; + int ret; + + ret = ff_request_frame(ctx->inputs[0]); + + if (ret == AVERROR_EOF && s->delay_count) + ret = compand_drain(outlink); + + return ret; +} + +static const AVFilterPad compand_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_AUDIO, + .filter_frame = filter_frame, + }, + { NULL } +}; + +static const AVFilterPad compand_outputs[] = { + { + .name = "default", + .request_frame = request_frame, + .config_props = config_output, + .type = AVMEDIA_TYPE_AUDIO, + }, + { NULL } +}; + + +AVFilter ff_af_compand = { + .name = "compand", + .description = NULL_IF_CONFIG_SMALL( + "Compress or expand audio dynamic range."), + .query_formats = query_formats, + .priv_size = sizeof(CompandContext), + .priv_class = &compand_class, + .init = init, + .uninit = uninit, + .inputs = compand_inputs, + .outputs = compand_outputs, +}; diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 9702a0a9cb..e47a22e6d6 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -54,6 +54,7 @@ void avfilter_register_all(void) REGISTER_FILTER(ATRIM, atrim, af); REGISTER_FILTER(CHANNELMAP, channelmap, af); REGISTER_FILTER(CHANNELSPLIT, channelsplit, af); + REGISTER_FILTER(COMPAND, compand, af); REGISTER_FILTER(JOIN, join, af); REGISTER_FILTER(RESAMPLE, resample, af); REGISTER_FILTER(VOLUME, volume, af); diff --git a/libavfilter/version.h b/libavfilter/version.h index 1684aa5e7b..f09b5012b1 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 4 -#define LIBAVFILTER_VERSION_MINOR 1 +#define LIBAVFILTER_VERSION_MINOR 2 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ From 3c72204ae0eb208d665bcf9104227a01b85b4739 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 24 Feb 2014 16:59:40 +0100 Subject: [PATCH 034/822] doc: name correct header (cherry picked from commit 48d1ed9c83ee0c388e8c2898e81ffb4add509ab9) --- doc/APIchanges | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index d3939e4e12..277bac6de9 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -65,7 +65,7 @@ API changes, most recent first: Add ITU-R BT.2020 and other not yet included values to color primaries, transfer characteristics and colorspaces. -2013-10-31 - 28096e0 - lavu 52.17.0 - avframe.h +2013-10-31 - 28096e0 - lavu 52.17.0 - frame.h Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT. 2013-09-28 - 0767bfd - lavfi 3.11.0 - avfilter.h From 15ae305007c09a958db27e902e5fbff06753a01c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 26 Feb 2014 13:44:53 +0100 Subject: [PATCH 035/822] af_compand: add a dependency on strtok_r (cherry picked from commit 291e49d4e7db4b982621d7a25e258f898cfc3217) --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 4c35ab9c29..8ece5eb7ea 100755 --- a/configure +++ b/configure @@ -2008,6 +2008,7 @@ unix_protocol_select="network" # filters blackframe_filter_deps="gpl" boxblur_filter_deps="gpl" +compand_filter_deps="strtok_r" cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" From b76871d8700451172e3225f8484b07a93abc3b57 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 25 Feb 2014 11:59:05 +0100 Subject: [PATCH 036/822] parser: Remove commented-out cruft (cherry picked from commit ed61f3ca8a0664a697782253b354055136c5d303) --- libavcodec/parser.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 511f1f3ed1..e6743eb37c 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -97,8 +97,7 @@ void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ if ( s->cur_offset + off >= s->cur_frame_offset[i] && (s->frame_offset < s->cur_frame_offset[i] || (!s->frame_offset && !s->next_frame_offset)) // first field/frame - // check disabled since MPEG-TS does not send complete PES packets - && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ + && s->cur_frame_end[i]) { s->dts= s->cur_frame_dts[i]; s->pts= s->cur_frame_pts[i]; s->pos= s->cur_frame_pos[i]; @@ -185,9 +184,7 @@ int av_parser_change(AVCodecParserContext *s, *poutbuf= (uint8_t *) buf; *poutbuf_size= buf_size; if(avctx->extradata){ - if( (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) - /*||(s->pict_type != AV_PICTURE_TYPE_I && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/ - /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){ + if ((keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))) { int size= buf_size + avctx->extradata_size; *poutbuf_size= size; *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); @@ -211,8 +208,6 @@ void av_parser_close(AVCodecParserContext *s) } } -/*****************************************************/ - int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size) { if(pc->overread){ @@ -285,8 +280,6 @@ void ff_parse_close(AVCodecParserContext *s) av_freep(&pc->buffer); } -/*************************/ - int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { From 031d3b66c2ea3b338cb7ce437bce47a8a4930ebb Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Fri, 23 Dec 2011 00:14:32 +0100 Subject: [PATCH 037/822] latm: Always reconfigure if no extradata was set previously AAC LOAS can have new audio config objects in the stream itself. Make sure the decoder reconfigures itself when the first one arrives midstream. Bug-Id: 644 Signed-off-by: Luca Barbato (cherry picked from commit 3aca10bf762a94d7de555cedf1ff0e4f6792bf41) --- libavcodec/aacdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index a3652098db..e25838fca0 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -3030,7 +3030,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, if (bits_consumed < 0) return AVERROR_INVALIDDATA; - if (ac->oc[1].m4ac.sample_rate != m4ac.sample_rate || + if (!latmctx->initialized || + ac->oc[1].m4ac.sample_rate != m4ac.sample_rate || ac->oc[1].m4ac.chan_config != m4ac.chan_config) { av_log(avctx, AV_LOG_INFO, "audio config changed\n"); From 437179e9c89e8b273cb79563838e0ec92f59a193 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sun, 23 Feb 2014 23:59:25 +0100 Subject: [PATCH 038/822] parser: K&R formatting cosmetics Signed-off-by: Diego Biurrun (cherry picked from commit a1c699659d56b76c0bf399307f642c6fd6d28281) --- libavcodec/parser.c | 200 +++++++++++++++++++++++--------------------- 1 file changed, 105 insertions(+), 95 deletions(-) diff --git a/libavcodec/parser.c b/libavcodec/parser.c index e6743eb37c..c6ceeb6d2d 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -23,14 +23,18 @@ #include #include -#include "parser.h" #include "libavutil/mem.h" +#include "parser.h" + static AVCodecParser *av_first_parser = NULL; -AVCodecParser* av_parser_next(AVCodecParser *p){ - if(p) return p->next; - else return av_first_parser; +AVCodecParser *av_parser_next(AVCodecParser *p) +{ + if (p) + return p->next; + else + return av_first_parser; } void av_register_codec_parser(AVCodecParser *parser) @@ -45,10 +49,10 @@ AVCodecParserContext *av_parser_init(int codec_id) AVCodecParser *parser; int ret; - if(codec_id == AV_CODEC_ID_NONE) + if (codec_id == AV_CODEC_ID_NONE) return NULL; - for(parser = av_first_parser; parser != NULL; parser = parser->next) { + for (parser = av_first_parser; parser != NULL; parser = parser->next) { if (parser->codec_ids[0] == codec_id || parser->codec_ids[1] == codec_id || parser->codec_ids[2] == codec_id || @@ -57,7 +61,8 @@ AVCodecParserContext *av_parser_init(int codec_id) goto found; } return NULL; - found: + +found: s = av_mallocz(sizeof(AVCodecParserContext)); if (!s) return NULL; @@ -77,9 +82,9 @@ AVCodecParserContext *av_parser_init(int codec_id) return NULL; } } - s->fetch_timestamp=1; - s->pict_type = AV_PICTURE_TYPE_I; - s->key_frame = -1; + s->fetch_timestamp = 1; + s->pict_type = AV_PICTURE_TYPE_I; + s->key_frame = -1; s->convergence_duration = 0; s->dts_sync_point = INT_MIN; s->dts_ref_dts_delta = INT_MIN; @@ -87,71 +92,70 @@ AVCodecParserContext *av_parser_init(int codec_id) return s; } -void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ +void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove) +{ int i; - s->dts= s->pts= AV_NOPTS_VALUE; - s->pos= -1; - s->offset= 0; - for(i = 0; i < AV_PARSER_PTS_NB; i++) { - if ( s->cur_offset + off >= s->cur_frame_offset[i] - && (s->frame_offset < s->cur_frame_offset[i] || - (!s->frame_offset && !s->next_frame_offset)) // first field/frame - && s->cur_frame_end[i]) { - s->dts= s->cur_frame_dts[i]; - s->pts= s->cur_frame_pts[i]; - s->pos= s->cur_frame_pos[i]; + s->dts = + s->pts = AV_NOPTS_VALUE; + s->pos = -1; + s->offset = 0; + for (i = 0; i < AV_PARSER_PTS_NB; i++) { + if (s->cur_offset + off >= s->cur_frame_offset[i] && + (s->frame_offset < s->cur_frame_offset[i] || + (!s->frame_offset && !s->next_frame_offset)) && + s->cur_frame_end[i]) { + s->dts = s->cur_frame_dts[i]; + s->pts = s->cur_frame_pts[i]; + s->pos = s->cur_frame_pos[i]; s->offset = s->next_frame_offset - s->cur_frame_offset[i]; - if(remove) - s->cur_frame_offset[i]= INT64_MAX; - if(s->cur_offset + off < s->cur_frame_end[i]) + if (remove) + s->cur_frame_offset[i] = INT64_MAX; + if (s->cur_offset + off < s->cur_frame_end[i]) break; } } } -int av_parser_parse2(AVCodecParserContext *s, - AVCodecContext *avctx, +int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, - int64_t pts, int64_t dts, - int64_t pos) + int64_t pts, int64_t dts, int64_t pos) { int index, i; uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE]; - if(!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) { + if (!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) { s->next_frame_offset = s->cur_offset = pos; - s->flags |= PARSER_FLAG_FETCHED_OFFSET; + s->flags |= PARSER_FLAG_FETCHED_OFFSET; } if (buf_size == 0) { /* padding is always necessary even if EOF, so we add it here */ memset(dummy_buf, 0, sizeof(dummy_buf)); buf = dummy_buf; - } else if (s->cur_offset + buf_size != - s->cur_frame_end[s->cur_frame_start_index]) { /* skip remainder packets */ + } else if (s->cur_offset + buf_size != s->cur_frame_end[s->cur_frame_start_index]) { /* skip remainder packets */ /* add a new packet descriptor */ - i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); - s->cur_frame_start_index = i; - s->cur_frame_offset[i] = s->cur_offset; - s->cur_frame_end[i] = s->cur_offset + buf_size; - s->cur_frame_pts[i] = pts; - s->cur_frame_dts[i] = dts; - s->cur_frame_pos[i] = pos; + i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); + s->cur_frame_start_index = i; + s->cur_frame_offset[i] = s->cur_offset; + s->cur_frame_end[i] = s->cur_offset + buf_size; + s->cur_frame_pts[i] = pts; + s->cur_frame_dts[i] = dts; + s->cur_frame_pos[i] = pos; } - if (s->fetch_timestamp){ - s->fetch_timestamp=0; - s->last_pts = s->pts; - s->last_dts = s->dts; - s->last_pos = s->pos; + if (s->fetch_timestamp) { + s->fetch_timestamp = 0; + s->last_pts = s->pts; + s->last_dts = s->dts; + s->last_pos = s->pos; ff_fetch_timestamp(s, 0, 0); } - /* WARNING: the returned index can be negative */ - index = s->parser->parser_parse(s, avctx, (const uint8_t **)poutbuf, poutbuf_size, buf, buf_size); + index = s->parser->parser_parse(s, avctx, (const uint8_t **) poutbuf, + poutbuf_size, buf, buf_size); /* update the file pointer */ if (*poutbuf_size) { /* fill the data for the current frame */ @@ -159,7 +163,7 @@ int av_parser_parse2(AVCodecParserContext *s, /* offset of the next frame */ s->next_frame_offset = s->cur_offset + index; - s->fetch_timestamp=1; + s->fetch_timestamp = 1; } if (index < 0) index = 0; @@ -167,30 +171,32 @@ int av_parser_parse2(AVCodecParserContext *s, return index; } -int av_parser_change(AVCodecParserContext *s, - AVCodecContext *avctx, +int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe){ - - if(s && s->parser->split){ - if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){ - int i= s->parser->split(avctx, buf, buf_size); - buf += i; + const uint8_t *buf, int buf_size, int keyframe) +{ + if (s && s->parser->split) { + if ((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || + (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) { + int i = s->parser->split(avctx, buf, buf_size); + buf += i; buf_size -= i; } } /* cast to avoid warning about discarding qualifiers */ - *poutbuf= (uint8_t *) buf; - *poutbuf_size= buf_size; - if(avctx->extradata){ + *poutbuf = (uint8_t *) buf; + *poutbuf_size = buf_size; + if (avctx->extradata) { if ((keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))) { - int size= buf_size + avctx->extradata_size; - *poutbuf_size= size; - *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); + int size = buf_size + avctx->extradata_size; + + *poutbuf_size = size; + *poutbuf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(*poutbuf, avctx->extradata, avctx->extradata_size); - memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE); + memcpy((*poutbuf) + avctx->extradata_size, buf, + buf_size + FF_INPUT_BUFFER_PADDING_SIZE); return 1; } } @@ -200,7 +206,7 @@ int av_parser_change(AVCodecParserContext *s, void av_parser_close(AVCodecParserContext *s) { - if(s){ + if (s) { if (s->parser->parser_close) s->parser->parser_close(s); av_free(s->priv_data); @@ -208,31 +214,33 @@ void av_parser_close(AVCodecParserContext *s) } } -int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size) +int ff_combine_frame(ParseContext *pc, int next, + const uint8_t **buf, int *buf_size) { - if(pc->overread){ + if (pc->overread) { av_dlog(NULL, "overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index); - av_dlog(NULL, "%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); + av_dlog(NULL, "%X %X %X %X\n", + (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); } /* Copy overread bytes from last frame into buffer. */ - for(; pc->overread>0; pc->overread--){ - pc->buffer[pc->index++]= pc->buffer[pc->overread_index++]; - } + for (; pc->overread > 0; pc->overread--) + pc->buffer[pc->index++] = pc->buffer[pc->overread_index++]; /* flush remaining if EOF */ - if(!*buf_size && next == END_NOT_FOUND){ - next= 0; - } + if (!*buf_size && next == END_NOT_FOUND) + next = 0; - pc->last_index= pc->index; + pc->last_index = pc->index; /* copy into buffer end return */ - if(next == END_NOT_FOUND){ - void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); + if (next == END_NOT_FOUND) { + void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, + (*buf_size) + pc->index + + FF_INPUT_BUFFER_PADDING_SIZE); - if(!new_buffer) + if (!new_buffer) return AVERROR(ENOMEM); pc->buffer = new_buffer; memcpy(&pc->buffer[pc->index], *buf, *buf_size); @@ -240,34 +248,37 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s return -1; } - *buf_size= - pc->overread_index= pc->index + next; + *buf_size = + pc->overread_index = pc->index + next; /* append to buffer */ - if(pc->index){ - void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); + if (pc->index) { + void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, + next + pc->index + + FF_INPUT_BUFFER_PADDING_SIZE); - if(!new_buffer) + if (!new_buffer) return AVERROR(ENOMEM); pc->buffer = new_buffer; if (next > -FF_INPUT_BUFFER_PADDING_SIZE) memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE); pc->index = 0; - *buf= pc->buffer; + *buf = pc->buffer; } /* store overread bytes */ - for(;next < 0; next++){ - pc->state = (pc->state<<8) | pc->buffer[pc->last_index + next]; - pc->state64 = (pc->state64<<8) | pc->buffer[pc->last_index + next]; + for (; next < 0; next++) { + pc->state = (pc->state << 8) | pc->buffer[pc->last_index + next]; + pc->state64 = (pc->state64 << 8) | pc->buffer[pc->last_index + next]; pc->overread++; } - if(pc->overread){ + if (pc->overread) { av_dlog(NULL, "overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index); - av_dlog(NULL, "%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]); + av_dlog(NULL, "%X %X %X %X\n", + (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); } return 0; @@ -280,16 +291,15 @@ void ff_parse_close(AVCodecParserContext *s) av_freep(&pc->buffer); } -int ff_mpeg4video_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) +int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { int i; - uint32_t state= -1; + uint32_t state = -1; - for(i=0; i Date: Wed, 26 Feb 2014 22:37:06 +0100 Subject: [PATCH 039/822] af_compand: replace strtok_r() with av_get_token() (cherry picked from commit bc6461c2861b7d482a037d3b3e2b44ad48805fa0) --- configure | 1 - libavfilter/af_compand.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 8ece5eb7ea..4c35ab9c29 100755 --- a/configure +++ b/configure @@ -2008,7 +2008,6 @@ unix_protocol_select="network" # filters blackframe_filter_deps="gpl" boxblur_filter_deps="gpl" -compand_filter_deps="strtok_r" cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index 19065944f9..a6692bc37f 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -29,6 +29,7 @@ #include +#include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/common.h" #include "libavutil/mathematics.h" @@ -330,7 +331,7 @@ static int config_output(AVFilterLink *outlink) CompandContext *s = ctx->priv; const int sample_rate = outlink->sample_rate; double radius = s->curve_dB * M_LN10 / 20.0; - char *p, *saveptr = NULL; + const char *p; const int channels = av_get_channel_layout_nb_channels(outlink->channel_layout); int nb_attacks, nb_decays, nb_points; @@ -368,25 +369,34 @@ static int config_output(AVFilterLink *outlink) p = s->attacks; for (i = 0, new_nb_items = 0; i < nb_attacks; i++) { - char *tstr = strtok_r(p, "|", &saveptr); - p = NULL; + char *tstr = av_get_token(&p, "|"); + if (!tstr) + return AVERROR(ENOMEM); + new_nb_items += sscanf(tstr, "%f", &s->channels[i].attack) == 1; + av_freep(&tstr); if (s->channels[i].attack < 0) { uninit(ctx); return AVERROR(EINVAL); } + if (*p) + p++; } nb_attacks = new_nb_items; p = s->decays; for (i = 0, new_nb_items = 0; i < nb_decays; i++) { - char *tstr = strtok_r(p, "|", &saveptr); - p = NULL; + char *tstr = av_get_token(&p, "|"); + if (!tstr) + return AVERROR(ENOMEM); new_nb_items += sscanf(tstr, "%f", &s->channels[i].decay) == 1; + av_freep(&tstr); if (s->channels[i].decay < 0) { uninit(ctx); return AVERROR(EINVAL); } + if (*p) + p++; } nb_decays = new_nb_items; @@ -401,9 +411,13 @@ static int config_output(AVFilterLink *outlink) #define S(x) s->segments[2 * ((x) + 1)] p = s->points; for (i = 0, new_nb_items = 0; i < nb_points; i++) { - char *tstr = strtok_r(p, "|", &saveptr); - p = NULL; - if (sscanf(tstr, "%f/%f", &S(i).x, &S(i).y) != 2) { + char *tstr = av_get_token(&p, "|"); + if (!tstr) + return AVERROR(ENOMEM); + + err = sscanf(tstr, "%f/%f", &S(i).x, &S(i).y); + av_freep(&tstr); + if (err != 2) { av_log(ctx, AV_LOG_ERROR, "Invalid and/or missing input/output value.\n"); uninit(ctx); @@ -418,6 +432,8 @@ static int config_output(AVFilterLink *outlink) S(i).y -= S(i).x; av_log(ctx, AV_LOG_DEBUG, "%d: x=%f y=%f\n", i, S(i).x, S(i).y); new_nb_items++; + if (*p) + p++; } num = new_nb_items; From 596d3e20ae69a278d562eea08f5e8c0ae5a5bfc4 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 25 Feb 2014 12:21:15 +0100 Subject: [PATCH 040/822] parser: cosmetics: Drop some unnecessary parentheses (cherry picked from commit 4ec336484d638b6b009636f465352c61a5a57061) --- libavcodec/parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/parser.c b/libavcodec/parser.c index c6ceeb6d2d..080bbc345d 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -176,8 +176,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size, int keyframe) { if (s && s->parser->split) { - if ((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || - (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) { + if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER || + avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER) { int i = s->parser->split(avctx, buf, buf_size); buf += i; buf_size -= i; @@ -188,14 +188,14 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, *poutbuf = (uint8_t *) buf; *poutbuf_size = buf_size; if (avctx->extradata) { - if ((keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))) { + if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) { int size = buf_size + avctx->extradata_size; *poutbuf_size = size; *poutbuf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(*poutbuf, avctx->extradata, avctx->extradata_size); - memcpy((*poutbuf) + avctx->extradata_size, buf, + memcpy(*poutbuf + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE); return 1; } @@ -237,7 +237,7 @@ int ff_combine_frame(ParseContext *pc, int next, /* copy into buffer end return */ if (next == END_NOT_FOUND) { void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, - (*buf_size) + pc->index + + *buf_size + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); if (!new_buffer) @@ -269,8 +269,8 @@ int ff_combine_frame(ParseContext *pc, int next, /* store overread bytes */ for (; next < 0; next++) { - pc->state = (pc->state << 8) | pc->buffer[pc->last_index + next]; - pc->state64 = (pc->state64 << 8) | pc->buffer[pc->last_index + next]; + pc->state = pc->state << 8 | pc->buffer[pc->last_index + next]; + pc->state64 = pc->state64 << 8 | pc->buffer[pc->last_index + next]; pc->overread++; } @@ -297,7 +297,7 @@ int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) uint32_t state = -1; for (i = 0; i < buf_size; i++) { - state = (state << 8) | buf[i]; + state = state << 8 | buf[i]; if (state == 0x1B3 || state == 0x1B6) return i - 3; } From 5df52b0131d3d4d804ad6e221bc9a2cd8b201ef2 Mon Sep 17 00:00:00 2001 From: Keiji Costantini Date: Sat, 1 Mar 2014 18:17:04 +0000 Subject: [PATCH 041/822] ituh263: reject b-frame with pp_time = 0 Avoid a division by 0 in ff_mpeg4_set_one_direct_mv. Sample-Id: 00000168-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara (cherry picked from commit 9514440337875e0c63b409abcd616b68c518283f) --- libavcodec/ituh263dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index e36521062f..98c8cfc137 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -750,6 +750,8 @@ int ff_h263_decode_mb(MpegEncContext *s, } if(IS_DIRECT(mb_type)){ + if (!s->pp_time) + return AVERROR_INVALIDDATA; s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT; mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0); }else{ From a1ab3300c83a16c2d5f5d29c51393668b9d92667 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 5 Mar 2014 12:44:57 +0100 Subject: [PATCH 042/822] arm: hpeldsp: prevent overreads in armv6 asm Based on a patch by Russel King Bug-Id: 646 CC: libav-stable@libav.org --- libavcodec/arm/hpeldsp_armv6.S | 20 ++++++++++++-------- libavutil/arm/asm.S | 7 +++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/libavcodec/arm/hpeldsp_armv6.S b/libavcodec/arm/hpeldsp_armv6.S index f85c8cb82c..984e0f0e32 100644 --- a/libavcodec/arm/hpeldsp_armv6.S +++ b/libavcodec/arm/hpeldsp_armv6.S @@ -132,11 +132,12 @@ function ff_put_pixels8_y2_armv6, export=1 uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r10, r4, r6 eor r6, r4, r6 uhadd8 r11, r5, r7 @@ -144,10 +145,11 @@ function ff_put_pixels8_y2_armv6, export=1 eor r7, r5, r7 uadd8 r10, r10, r6 and r7, r7, r12 - ldr_pre r6, r1, r2 + ldrc_pre ne, r6, r1, r2 uadd8 r11, r11, r7 strd_post r8, r9, r0, r2 - ldr r7, [r1, #4] + it ne + ldrne r7, [r1, #4] strd_post r10, r11, r0, r2 bne 1b @@ -192,13 +194,15 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uhadd8 r9, r5, r7 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r12, r4, r6 - ldr_pre r6, r1, r2 + ldrc_pre ne, r6, r1, r2 uhadd8 r14, r5, r7 - ldr r7, [r1, #4] + it ne + ldrne r7, [r1, #4] stm r0, {r8,r9} add r0, r0, r2 stm r0, {r12,r14} diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index 45fdf55522..5884e172f3 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -216,6 +216,13 @@ T ldr \rt, [\rn] T add \rn, \rn, \rm .endm +.macro ldrc_pre cc, rt, rn, rm:vararg +A ldr\cc \rt, [\rn, \rm]! +T itt \cc +T add\cc \rn, \rn, \rm +T ldr\cc \rt, [\rn] +.endm + .macro ldrd_reg rt, rt2, rn, rm A ldrd \rt, \rt2, [\rn, \rm] T add \rt, \rn, \rm From 124c78fd4449ed3ddbdc2398e7570119bb8babf9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 5 Mar 2014 17:07:28 +0100 Subject: [PATCH 043/822] avformat/oggparsevorbis: dont use invalid granules Fixes Ticket3437 Signed-off-by: Michael Niedermayer (cherry picked from commit 12b97dd375736c332989c50ea68af9d834b2621f) --- libavformat/oggparsevorbis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 2739123389..53e69dffa2 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -384,7 +384,7 @@ static int vorbis_packet(AVFormatContext *s, int idx) * here we parse the duration of each packet in the first page and compare * the total duration to the page granule to find the encoder delay and * set the first timestamp */ - if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS)) { + if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS) && (int64_t)os->granule>=0) { int seg, d; uint8_t *last_pkt = os->buf + os->pstart; uint8_t *next_pkt = last_pkt; From 4b476e6aa4b830f919cf3c67ba2caa039ff285b9 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 2 Mar 2014 02:11:05 -0500 Subject: [PATCH 044/822] configure: enable PIC on s390(x) The s390 architecture requires shared libraries to be built in PIC mode. Otherwise applications will get wrong relocations at run-time, leading to confusing segmentation faults. CC: libav-stable@libav.org (cherry picked from commit 5ddc9f5052316608799b932c604f9e7561f8ce24) --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 4c35ab9c29..95537ffd27 100755 --- a/configure +++ b/configure @@ -3203,6 +3203,10 @@ case "$arch" in check_64bit ppc ppc64 'sizeof(void *) > 4' spic=$shared ;; + s390) + check_64bit s390 s390x 'sizeof(void *) > 4' + spic=$shared + ;; sparc) check_64bit sparc sparc64 'sizeof(void *) > 4' spic=$shared From d5254230068e196a2496618c0d89cdfbc41f7478 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 6 Mar 2014 19:55:48 -0500 Subject: [PATCH 045/822] Revert "Add libx265 encoder" cf. the discussion following https://lists.libav.org/pipermail/libav-devel/2014-March/056894.html This reverts commit 50ea93158d4c480f64069e8bd1da388486dcf4ba. Conflicts: doc/general.texi libavcodec/version.h --- Changelog | 1 - LICENSE | 2 +- configure | 7 - doc/general.texi | 19 +-- libavcodec/Makefile | 1 - libavcodec/allcodecs.c | 1 - libavcodec/libx265.c | 285 ----------------------------------------- 7 files changed, 3 insertions(+), 313 deletions(-) delete mode 100644 libavcodec/libx265.c diff --git a/Changelog b/Changelog index 427a617664..029b381009 100644 --- a/Changelog +++ b/Changelog @@ -61,7 +61,6 @@ version 10: - framepack filter - Mirillis FIC video decoder - Support DNx444 -- libx265 encoder version 9: diff --git a/LICENSE b/LICENSE index fb2917830c..20d82c392e 100644 --- a/LICENSE +++ b/LICENSE @@ -46,7 +46,7 @@ affect the licensing of binaries resulting from the combination. compatible libraries -------------------- -The libcdio, libx264, libx265, libxavs and libxvid libraries are under GPL. When +The libcdio, libx264, libxavs and libxvid libraries are under GPL. When combining them with Libav, Libav needs to be licensed as GPL as well by passing --enable-gpl to configure. diff --git a/configure b/configure index 95537ffd27..11f157da97 100755 --- a/configure +++ b/configure @@ -204,7 +204,6 @@ External library support: --enable-libwavpack enable wavpack encoding via libwavpack [no] --enable-libwebp enable WebP encoding via libwebp [no] --enable-libx264 enable H.264 encoding via x264 [no] - --enable-libx265 enable HEVC encoding via x265 [no] --enable-libxavs enable AVS encoding via xavs [no] --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] @@ -1131,7 +1130,6 @@ EXTERNAL_LIBRARY_LIST=" libwavpack libwebp libx264 - libx265 libxavs libxvid openssl @@ -1889,7 +1887,6 @@ libvpx_vp9_encoder_deps="libvpx" libwavpack_encoder_deps="libwavpack" libwebp_encoder_deps="libwebp" libx264_encoder_deps="libx264" -libx265_encoder_deps="libx265" libxavs_encoder_deps="libxavs" libxvid_encoder_deps="libxvid" @@ -3541,7 +3538,6 @@ die_license_disabled() { die_license_disabled gpl libcdio die_license_disabled gpl libx264 -die_license_disabled gpl libx265 die_license_disabled gpl libxavs die_license_disabled gpl libxvid die_license_disabled gpl x11grab @@ -3966,9 +3962,6 @@ enabled libwebp && require_pkg_config libwebp webp/encode.h WebPGetEnc enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && { check_cpp_condition x264.h "X264_BUILD >= 118" || die "ERROR: libx264 version must be >= 0.118."; } -enabled libx265 && require_pkg_config x265 x265.h x265_encoder_encode && - { check_cpp_condition x265.h "X265_BUILD >= 5" || - die "ERROR: libx265 version must be >= 5."; } enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || diff --git a/doc/general.texi b/doc/general.texi index 6bc7fdaf4d..5f9500eaac 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -101,20 +101,6 @@ x264 is under the GNU Public License Version 2 or later details), you must upgrade Libav's license to GPL in order to use it. @end float -@section x265 - -Libav can make use of the x265 library for HEVC encoding. - -Go to @url{http://x265.org/developers.html} and follow the instructions -for installing the library. Then pass @code{--enable-libx265} to configure -to enable it. - -@float note -x265 is under the GNU Public License Version 2 or later -(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for -details), you must upgrade Libav's license to GPL in order to use it. -@end float - @section libilbc iLBC is a narrowband speech codec that has been made freely available @@ -288,7 +274,7 @@ library: @item raw H.261 @tab X @tab X @item raw H.263 @tab X @tab X @item raw H.264 @tab X @tab X -@item raw HEVC @tab X @tab X +@item raw HEVC @tab @tab X @item raw Ingenient MJPEG @tab @tab X @item raw MJPEG @tab X @tab X @item raw MLP @tab @tab X @@ -543,8 +529,7 @@ following image formats are supported: @item H.263+ / H.263-1998 / H.263 version 2 @tab X @tab X @item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 @tab E @tab X @tab encoding supported through external library libx264 -@item HEVC @tab X @tab X - @tab encoding supported through the external library libx265 +@item HEVC @tab @tab X @item HNM version 4 @tab @tab X @item HuffYUV @tab X @tab X @item HuffYUV FFmpeg variant @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 7b50c27878..9e4dd25fd2 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -616,7 +616,6 @@ OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o libvpx.o OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.o OBJS-$(CONFIG_LIBWEBP_ENCODER) += libwebpenc.o OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o -OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index ed6d7ff115..b6c27c002a 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -441,7 +441,6 @@ void avcodec_register_all(void) REGISTER_ENCODER(LIBWAVPACK, libwavpack); REGISTER_ENCODER(LIBWEBP, libwebp); REGISTER_ENCODER(LIBX264, libx264); - REGISTER_ENCODER(LIBX265, libx265); REGISTER_ENCODER(LIBXAVS, libxavs); REGISTER_ENCODER(LIBXVID, libxvid); diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c deleted file mode 100644 index 9f2d310eb7..0000000000 --- a/libavcodec/libx265.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * libx265 encoder - * - * Copyright (c) 2013-2014 Derek Buitenhuis - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "libavutil/internal.h" -#include "libavutil/common.h" -#include "libavutil/opt.h" -#include "libavutil/pixdesc.h" -#include "avcodec.h" -#include "internal.h" - -typedef struct libx265Context { - const AVClass *class; - - x265_encoder *encoder; - x265_param *params; - uint8_t *header; - int header_size; - - char *preset; - char *tune; - char *x265_opts; -} libx265Context; - -static int is_keyframe(NalUnitType naltype) -{ - switch (naltype) { - case NAL_UNIT_CODED_SLICE_BLA_W_LP: - case NAL_UNIT_CODED_SLICE_BLA_W_RADL: - case NAL_UNIT_CODED_SLICE_BLA_N_LP: - case NAL_UNIT_CODED_SLICE_IDR_W_RADL: - case NAL_UNIT_CODED_SLICE_IDR_N_LP: - case NAL_UNIT_CODED_SLICE_CRA: - return 1; - default: - return 0; - } -} - -static av_cold int libx265_encode_close(AVCodecContext *avctx) -{ - libx265Context *ctx = avctx->priv_data; - - av_frame_free(&avctx->coded_frame); - av_freep(&ctx->header); - - x265_param_free(ctx->params); - - if (ctx->encoder) - x265_encoder_close(ctx->encoder); - - return 0; -} - -static av_cold int libx265_encode_init(AVCodecContext *avctx) -{ - libx265Context *ctx = avctx->priv_data; - x265_nal *nal; - uint8_t *buf; - int nnal; - int ret; - int i; - - avctx->coded_frame = av_frame_alloc(); - if (!avctx->coded_frame) { - av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n"); - return AVERROR(ENOMEM); - } - - ctx->params = x265_param_alloc(); - if (!ctx->params) { - av_log(avctx, AV_LOG_ERROR, "Could not allocate x265 param structure.\n"); - return AVERROR(ENOMEM); - } - - if (x265_param_default_preset(ctx->params, ctx->preset, ctx->tune) < 0) { - av_log(avctx, AV_LOG_ERROR, "Invalid preset or tune.\n"); - return AVERROR(EINVAL); - } - - ctx->params->frameNumThreads = avctx->thread_count; - ctx->params->frameRate = (int) (avctx->time_base.den / avctx->time_base.num); - ctx->params->sourceWidth = avctx->width; - ctx->params->sourceHeight = avctx->height; - ctx->params->inputBitDepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1; - - if (avctx->bit_rate > 0) { - ctx->params->rc.bitrate = avctx->bit_rate / 1000; - ctx->params->rc.rateControlMode = X265_RC_ABR; - } - - if (ctx->x265_opts) { - AVDictionary *dict = NULL; - AVDictionaryEntry *en = NULL; - - if (!av_dict_parse_string(&dict, ctx->x265_opts, "=", ":", 0)) { - while ((en = av_dict_get(dict, "", en, AV_DICT_IGNORE_SUFFIX))) { - int parse_ret = x265_param_parse(ctx->params, en->key, en->value); - - switch (parse_ret) { - case X265_PARAM_BAD_NAME: - av_log(avctx, AV_LOG_WARNING, - "Unknown option: %s.\n", en->key); - break; - case X265_PARAM_BAD_VALUE: - av_log(avctx, AV_LOG_WARNING, - "Invalid value for %s: %s.\n", en->key, en->value); - break; - default: - break; - } - } - av_dict_free(&dict); - } - } - - ctx->encoder = x265_encoder_open(ctx->params); - if (!ctx->encoder) { - av_log(avctx, AV_LOG_ERROR, "Cannot open libx265 encoder.\n"); - libx265_encode_close(avctx); - return AVERROR_INVALIDDATA; - } - - ret = x265_encoder_headers(ctx->encoder, &nal, &nnal); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Cannot encode headers.\n"); - libx265_encode_close(avctx); - return AVERROR_INVALIDDATA; - } - - for (i = 0; i < nnal; i++) - ctx->header_size += nal[i].sizeBytes; - - ctx->header = av_malloc(ctx->header_size); - if (!ctx->header) { - av_log(avctx, AV_LOG_ERROR, - "Cannot allocate HEVC header of size %d.\n", ctx->header_size); - libx265_encode_close(avctx); - return AVERROR(ENOMEM); - } - - buf = ctx->header; - for (i = 0; i < nnal; i++) { - memcpy(buf, nal[i].payload, nal[i].sizeBytes); - buf += nal[i].sizeBytes; - } - - return 0; -} - -static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, - const AVFrame *pic, int *got_packet) -{ - libx265Context *ctx = avctx->priv_data; - x265_picture x265pic; - x265_picture x265pic_out = { { 0 } }; - x265_nal *nal; - uint8_t *dst; - int payload = 0; - int nnal; - int ret; - int i; - - x265_picture_init(ctx->params, &x265pic); - - if (pic) { - for (i = 0; i < 3; i++) { - x265pic.planes[i] = pic->data[i]; - x265pic.stride[i] = pic->linesize[i]; - } - - x265pic.pts = pic->pts; - } - - ret = x265_encoder_encode(ctx->encoder, &nal, &nnal, - pic ? &x265pic : NULL, &x265pic_out); - if (ret < 0) - return AVERROR_UNKNOWN; - - if (!nnal) - return 0; - - for (i = 0; i < nnal; i++) - payload += nal[i].sizeBytes; - - payload += ctx->header_size; - - ret = ff_alloc_packet(pkt, payload); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); - return ret; - } - dst = pkt->data; - - if (ctx->header) { - memcpy(dst, ctx->header, ctx->header_size); - dst += ctx->header_size; - - av_freep(&ctx->header); - ctx->header_size = 0; - } - - for (i = 0; i < nnal; i++) { - memcpy(dst, nal[i].payload, nal[i].sizeBytes); - dst += nal[i].sizeBytes; - - if (is_keyframe(nal[i].type)) - pkt->flags |= AV_PKT_FLAG_KEY; - } - - pkt->pts = x265pic_out.pts; - pkt->dts = x265pic_out.dts; - - *got_packet = 1; - return 0; -} - -static const enum AVPixelFormat x265_csp_eight[] = { - AV_PIX_FMT_YUV420P, - AV_PIX_FMT_NONE -}; - -static const enum AVPixelFormat x265_csp_twelve[] = { - AV_PIX_FMT_YUV420P, - AV_PIX_FMT_YUV420P10, - AV_PIX_FMT_NONE -}; - -static av_cold void libx265_encode_init_csp(AVCodec *codec) -{ - if (x265_max_bit_depth == 8) - codec->pix_fmts = x265_csp_eight; - else if (x265_max_bit_depth == 12) - codec->pix_fmts = x265_csp_twelve; -} - -#define OFFSET(x) offsetof(libx265Context, x) -#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM -static const AVOption options[] = { - { "preset", "set the x265 preset", OFFSET(preset), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, - { "tune", "set the x265 tune parameter", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, - { "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, - { NULL } -}; - -static const AVClass class = { - .class_name = "libx265", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -AVCodec ff_libx265_encoder = { - .name = "libx265", - .long_name = NULL_IF_CONFIG_SMALL("libx265 H.265 / HEVC"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_HEVC, - .init = libx265_encode_init, - .init_static_data = libx265_encode_init_csp, - .encode2 = libx265_encode_frame, - .close = libx265_encode_close, - .priv_data_size = sizeof(libx265Context), - .priv_class = &class, - .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, -}; From 72a58c0772450993d375c6cf4b187a068f5bc765 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 6 Mar 2014 21:00:26 -0500 Subject: [PATCH 046/822] Update default FATE URL for release/10 --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 004b44cc33..ae7e653a80 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -124,7 +124,7 @@ $(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF) ifdef SAMPLES FATE += $(FATE_SAMPLES) fate-rsync: - rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES) + rsync -vaLW rsync://fate-suite.libav.org/fate-suite-10/ $(SAMPLES) else fate-rsync: @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite" From 7d995cd1b8e2c73edf9886182722359c0027bf62 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Wed, 5 Mar 2014 17:59:38 +0100 Subject: [PATCH 047/822] lavfi/af_atempo: clear references before returning error. Once the frame has been given to ff_filter_frame(), it can no longer be used, even on error. Fix trac ticket #3430. (cherry picked from commit bc6901c94944e4a81be49a6b11183cd0c55d2738) --- libavfilter/af_atempo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index c474d6a58c..6a3fd61e60 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -1058,11 +1058,11 @@ static int push_samples(ATempoContext *atempo, outlink->time_base); ret = ff_filter_frame(outlink, atempo->dst_buffer); - if (ret < 0) - return ret; atempo->dst_buffer = NULL; atempo->dst = NULL; atempo->dst_end = NULL; + if (ret < 0) + return ret; atempo->nsamples_out += n_out; return 0; From 23af29e8825ac112877b9ac0572ef11e5f0539f2 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 8 Mar 2014 11:52:14 +0100 Subject: [PATCH 048/822] arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6 The overread avoidance fix in cbddee1cca0ebd01e8c5aa694d31228eb4de4b41 broke the computation for the last row since it prevented the safe reading from the height+1-th row. --- libavcodec/arm/hpeldsp_armv6.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/arm/hpeldsp_armv6.S b/libavcodec/arm/hpeldsp_armv6.S index 984e0f0e32..f1abc328eb 100644 --- a/libavcodec/arm/hpeldsp_armv6.S +++ b/libavcodec/arm/hpeldsp_armv6.S @@ -132,12 +132,11 @@ function ff_put_pixels8_y2_armv6, export=1 uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldrc_pre ne, r4, r1, r2 + ldr_pre r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 - it ne - ldrne r5, [r1, #4] + ldr r5, [r1, #4] uhadd8 r10, r4, r6 eor r6, r4, r6 uhadd8 r11, r5, r7 @@ -194,10 +193,9 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldrc_pre ne, r4, r1, r2 + ldr_pre r4, r1, r2 uhadd8 r9, r5, r7 - it ne - ldrne r5, [r1, #4] + ldr r5, [r1, #4] uhadd8 r12, r4, r6 ldrc_pre ne, r6, r1, r2 uhadd8 r14, r5, r7 From a643a47d41f4924b66fce339e4b82aaee20825be Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Fri, 7 Mar 2014 14:31:53 +0000 Subject: [PATCH 049/822] fic: Properly handle skip frames Signed-off-by: Derek Buitenhuis (cherry picked from commit f87a6e500bcdaede22a123b81a2a46779cf7b71a) --- libavcodec/fic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 9a3bc3eb9c..df034371e0 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -166,6 +166,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, if (memcmp(src, fic_header, 7)) av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n"); + /* Is it a skip frame? */ + if (src[17]) + goto skip; + nslices = src[13]; if (!nslices) { av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n"); @@ -245,6 +249,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, NULL, nslices, sizeof(ctx->slice_data[0])) < 0) return ret; +skip: *got_frame = 1; if ((ret = av_frame_ref(data, ctx->frame)) < 0) return ret; From db67b7c31b6fdd3747e2b5328945ad2091533698 Mon Sep 17 00:00:00 2001 From: Keiji Costantini Date: Sat, 1 Mar 2014 19:44:00 +0100 Subject: [PATCH 050/822] rv10: Forward error from rv10_decode_packet Signed-off-by: Diego Biurrun (cherry picked from commit b4d372e091f6b30758db2a43a5a9fe2510ec2b13) --- libavcodec/rv10.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index ae8c5b34e9..51affa8769 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -707,7 +707,10 @@ static int rv10_decode_frame(AVCodecContext *avctx, offset + FFMAX(size, size2) > buf_size) return AVERROR_INVALIDDATA; - if (rv10_decode_packet(avctx, buf + offset, size, size2) > 8 * size) + if ((ret = rv10_decode_packet(avctx, buf + offset, size, size2)) < 0) + return ret; + + if (ret > 8 * size) i++; } From daa5a988e2ec8275ad8b724ea68f78306c271ae7 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Mon, 3 Mar 2014 20:20:14 +0000 Subject: [PATCH 051/822] matroskaenc: allow override of "writing application" tag Signed-off-by: Tim Walker CC: libav-stable@libav.org (cherry picked from commit 0092c1dd8dac2d9e185b58503b447a0d3fb5230d) --- libavformat/matroskaenc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index cc645a5a70..3ab3139a29 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -805,7 +805,8 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme end_ebml_master(s->pb, targets); while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX))) - if (av_strcasecmp(t->key, "title")) + if (av_strcasecmp(t->key, "title") && + av_strcasecmp(t->key, "encoding_tool")) mkv_write_simpletag(s->pb, t); end_ebml_master(s->pb, tag); @@ -965,7 +966,10 @@ static int mkv_write_header(AVFormatContext *s) segment_uid[i] = av_lfg_get(&lfg); put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , LIBAVFORMAT_IDENT); - put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT); + if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0))) + put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value); + else + put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT); put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16); } From c3861e14ceace7ee69820091871173b4abcae311 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Mon, 3 Mar 2014 20:20:15 +0000 Subject: [PATCH 052/822] movenc: allow override of "writing application" tag Signed-off-by: Tim Walker CC: libav-stable@libav.org (cherry picked from commit 565e0c6d866ce08d4b06427456d3d1f4fd856e9c) --- libavformat/movenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 43a164730c..5bc0ca383b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1858,7 +1858,8 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov, mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1); mov_write_string_metadata(s, pb, "\251alb", "album" , 1); mov_write_string_metadata(s, pb, "\251day", "date" , 1); - mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1); + if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1)) + mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1); mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1); mov_write_string_metadata(s, pb, "\251gen", "genre" , 1); mov_write_string_metadata(s, pb, "\251cpy", "copyright", 1); From f2693e98b449592ec0ed4979220814bf54e60a16 Mon Sep 17 00:00:00 2001 From: Pierre Lejeune Date: Sat, 8 Mar 2014 12:19:17 +0000 Subject: [PATCH 053/822] build: Use pkg-config for openjpeg Bug-Id: 387 CC: libav-stable@libav.org (cherry picked from commit 0e0cefb22216a4b6684a30a50cb5973400dc59f2) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 11f157da97..ae504da3eb 100755 --- a/configure +++ b/configure @@ -3940,7 +3940,7 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader -enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg +enabled libopenjpeg && require_pkg_config libopenjpeg openjpeg.h opj_version enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket From 5b933be089ab2657eb754ebf5b804ae43badf13d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 8 Mar 2014 19:15:16 +0100 Subject: [PATCH 054/822] arm: vp3: remove incorrect const in ff_vp3_idct_dc_add_neon declaration Was missed in aeaf268e52fc11c1f64914a319e0edddf1346d6a when integrating clear_blocks into the idct. (cherry picked from commit 4506a854a4d846692ba71daeeff661dc214c8fa2) --- libavcodec/arm/vp3dsp_init_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/arm/vp3dsp_init_arm.c b/libavcodec/arm/vp3dsp_init_arm.c index dfd6078caa..1ab0852570 100644 --- a/libavcodec/arm/vp3dsp_init_arm.c +++ b/libavcodec/arm/vp3dsp_init_arm.c @@ -26,7 +26,7 @@ void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, int16_t *data); void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, int16_t *data); -void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, const int16_t *data); +void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, int16_t *data); void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *); void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *); From 0ede7b534483c5c90f404a8f11f776d2f2da4e7e Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 2 Mar 2014 20:33:49 +0100 Subject: [PATCH 055/822] float_dsp: fix errors in documentation (cherry picked from commit 74cc901905741ca3d9e8364f42239341f4f173c4) --- libavutil/float_dsp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavutil/float_dsp.h b/libavutil/float_dsp.h index b215dad42f..0eb02f896c 100644 --- a/libavutil/float_dsp.h +++ b/libavutil/float_dsp.h @@ -113,7 +113,7 @@ typedef struct AVFloatDSPContext { * constraints: 32-byte aligned * @param src1 second input vector * constraints: 32-byte aligned - * @param src1 third input vector + * @param src2 third input vector * constraints: 32-byte aligned * @param len number of elements in the input * constraints: multiple of 16 @@ -132,8 +132,6 @@ typedef struct AVFloatDSPContext { * constraints: 32-byte aligned * @param src1 second input vector * constraints: 32-byte aligned - * @param src1 third input vector - * constraints: 32-byte aligned * @param len number of elements in the input * constraints: multiple of 16 */ From e4cbd0d6e5a7b3b850d72f4f4ef0124b27dbdcbd Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 8 Mar 2014 20:50:36 -0500 Subject: [PATCH 056/822] changelog: Cleanups and prepare for v10_beta2 --- Changelog | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 029b381009..29902f42b4 100644 --- a/Changelog +++ b/Changelog @@ -1,11 +1,12 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version : +version 10~beta2: - compand audio filter +- and many various smaller fixes, for a full changelog, please refer to: + cf. https://git.libav.org/?p=libav.git;a=shortlog;h=refs/tags/v10_beta2 - -version 10: +version 10~beta1: - av_strnstr - support ID3v2 tags in ASF files - reference-counting for AVFrame and AVPacket data From 5aa4b29bbefc06fc2bbcb52af7a14393a1bcf504 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Feb 2014 22:29:17 +0100 Subject: [PATCH 057/822] hevc: Use get_bits_long() in decode_vui() Fix assertion failure. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 920c01adce6c273fc043513ff237a6266e612152) --- libavcodec/hevc_ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index c3aabe7cc7..c4c7ee2223 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -499,8 +499,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps) vui->vui_timing_info_present_flag = get_bits1(gb); if (vui->vui_timing_info_present_flag) { - vui->vui_num_units_in_tick = get_bits(gb, 32); - vui->vui_time_scale = get_bits(gb, 32); + vui->vui_num_units_in_tick = get_bits_long(gb, 32); + vui->vui_time_scale = get_bits_long(gb, 32); vui->vui_poc_proportional_to_timing_flag = get_bits1(gb); if (vui->vui_poc_proportional_to_timing_flag) vui->vui_num_ticks_poc_diff_one_minus1 = get_ue_golomb_long(gb); From d79cb6947e4a9c42ac20925dd920d3a0910d9a26 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 11 Jan 2014 20:23:51 +0100 Subject: [PATCH 058/822] hevc: use av_mallocz() for allocating tab_ipm Fixes use of uninitialized memory and out of stack array read. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 6cc94e971933cd38c452172bb048bf760e65cc3e) --- libavcodec/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 65ad6d9730..f8f7e64eb4 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -212,7 +212,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) goto fail; s->cbf_luma = av_malloc(sps->min_tb_width * sps->min_tb_height); - s->tab_ipm = av_malloc(min_pu_size); + s->tab_ipm = av_mallocz(min_pu_size); s->is_pcm = av_malloc(min_pu_size); if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm) goto fail; From fa6b99d351ed483766a875054676a56fd8459774 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Feb 2014 23:09:55 +0100 Subject: [PATCH 059/822] hevc: Do not turn 32bit timebases into negative numbers Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit ed06e5d92b4c67b49068d538461fbbe0a53a8c5e) --- libavcodec/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index f8f7e64eb4..49ed2858cb 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -388,7 +388,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb) static int set_sps(HEVCContext *s, const HEVCSPS *sps) { int ret; - int num = 0, den = 0; + unsigned int num = 0, den = 0; pic_arrays_free(s); ret = pic_arrays_init(s, sps); From ca2c9d6b9bfadb64e1502594fdf745a391699890 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Sun, 9 Mar 2014 17:15:26 +0100 Subject: [PATCH 060/822] hevc: make pps/sps ids unsigned where necessary Fixes integer overflow and out of array accesses. Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind (cherry picked from commit 4d33873c2990b8d6096f60fef384f0efc4482b55) --- libavcodec/hevc.h | 2 +- libavcodec/hevc_ps.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index accfcb6107..1197d08193 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -463,7 +463,7 @@ typedef struct HEVCSPS { } HEVCSPS; typedef struct HEVCPPS { - int sps_id; ///< seq_parameter_set_id + unsigned int sps_id; ///< seq_parameter_set_id uint8_t sign_data_hiding_flag; diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index c4c7ee2223..5e5d4a77e5 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -609,8 +609,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) { const AVPixFmtDescriptor *desc; GetBitContext *gb = &s->HEVClc.gb; - int ret = 0; - int sps_id = 0; + int ret = 0; + unsigned int sps_id = 0; int log2_diff_max_min_transform_block_size; int bit_depth_chroma, start, vui_present, sublayer_ordering_info; int i; @@ -988,8 +988,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) int pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs; int log2_diff_ctb_min_tb_size; int i, j, x, y, ctb_addr_rs, tile_id; - int ret = 0; - int pps_id = 0; + int ret = 0; + unsigned int pps_id = 0; AVBufferRef *pps_buf; HEVCPPS *pps = av_mallocz(sizeof(*pps)); From 1c1e252cd1cbd5f59fe118c49f6d7207dbdfdbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 18 Feb 2014 16:11:59 +0200 Subject: [PATCH 061/822] movenc: Add a fallback fragmentation method for plain mp4 as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the default fragmentation method was only enabled if writing an ISM file. Signed-off-by: Martin Storsjö (cherry picked from commit 1e142d5b4842dcb39fcb0e92e4aacbc9977bfa66) --- libavformat/movenc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5bc0ca383b..6344e38298 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3316,15 +3316,13 @@ static int mov_write_header(AVFormatContext *s) enable_tracks(s); - if (mov->mode == MODE_ISM) { + if (mov->flags & FF_MOV_FLAG_FRAGMENT) { /* If no fragmentation options have been set, set a default. */ if (!(mov->flags & (FF_MOV_FLAG_FRAG_KEYFRAME | FF_MOV_FLAG_FRAG_CUSTOM)) && !mov->max_fragment_duration && !mov->max_fragment_size) mov->flags |= FF_MOV_FLAG_FRAG_KEYFRAME; - } - - if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) { + } else { if (mov->flags & FF_MOV_FLAG_FASTSTART) mov->reserved_moov_pos = avio_tell(pb); mov_write_mdat_tag(pb, mov); From ea3309eba715e83027e8ece4a226e39a4bf2a6ce Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:40 +0000 Subject: [PATCH 062/822] movenc: use 'hev1' tag for HEVC in MODE_MOV. 'hvc1' requires that parameter set NAL units be present only in the samples entry, but not in the samples themselves, requiring that additional parameter sets, if present, be filtered out of the samples and placed in new, additional sample entries if they override or otherwise conflict with the parameter sets present in the first sample entry. We do not have any way of doing this at present, so the files we produce can only comply with the restrictions set for the 'hev1' sample entry name in ISO/IEC 14496-15. (cherry picked from commit 1d9014f0b008485eac4c19d5f5e11ede59237167) --- libavformat/isom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index 9b32b7dc57..a6197aba02 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -136,8 +136,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') }, - { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */ { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */ + { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */ From c761379825ff0bf9dd191e244c4b2f7697fb2b3c Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:41 +0000 Subject: [PATCH 063/822] movenc: write hvcC tag for HEVC. (cherry picked from commit 20b40a597cdd4969cf1147d7c7efee2b6232524b) --- libavformat/Makefile | 2 +- libavformat/hevc.c | 1076 ++++++++++++++++++++++++++++++++++++++++++ libavformat/hevc.h | 50 ++ libavformat/movenc.c | 13 + 4 files changed, 1140 insertions(+), 1 deletion(-) create mode 100644 libavformat/hevc.c create mode 100644 libavformat/hevc.h diff --git a/libavformat/Makefile b/libavformat/Makefile index d491d43fd2..a3cd5047f0 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -179,7 +179,7 @@ OBJS-$(CONFIG_MM_DEMUXER) += mm.o OBJS-$(CONFIG_MMF_DEMUXER) += mmf.o pcm.o OBJS-$(CONFIG_MMF_MUXER) += mmf.o OBJS-$(CONFIG_MOV_DEMUXER) += mov.o isom.o mov_chan.o -OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o \ +OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o hevc.o \ movenchint.o mov_chan.o OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o diff --git a/libavformat/hevc.c b/libavformat/hevc.c new file mode 100644 index 0000000000..ab4eb10a8b --- /dev/null +++ b/libavformat/hevc.c @@ -0,0 +1,1076 @@ +/* + * Copyright (c) 2014 Tim Walker + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/get_bits.h" +#include "libavcodec/golomb.h" +#include "libavcodec/hevc.h" +#include "libavutil/intreadwrite.h" +#include "avc.h" +#include "avio.h" +#include "hevc.h" + +#define MAX_SPATIAL_SEGMENTATION 4096 // max. value of u(12) field + +typedef struct HVCCNALUnitArray { + uint8_t array_completeness; + uint8_t NAL_unit_type; + uint16_t numNalus; + uint16_t *nalUnitLength; + uint8_t **nalUnit; +} HVCCNALUnitArray; + +typedef struct HEVCDecoderConfigurationRecord { + uint8_t configurationVersion; + uint8_t general_profile_space; + uint8_t general_tier_flag; + uint8_t general_profile_idc; + uint32_t general_profile_compatibility_flags; + uint64_t general_constraint_indicator_flags; + uint8_t general_level_idc; + uint16_t min_spatial_segmentation_idc; + uint8_t parallelismType; + uint8_t chromaFormat; + uint8_t bitDepthLumaMinus8; + uint8_t bitDepthChromaMinus8; + uint16_t avgFrameRate; + uint8_t constantFrameRate; + uint8_t numTemporalLayers; + uint8_t temporalIdNested; + uint8_t lengthSizeMinusOne; + uint8_t numOfArrays; + HVCCNALUnitArray *array; +} HEVCDecoderConfigurationRecord; + +typedef struct HVCCProfileTierLevel { + uint8_t profile_space; + uint8_t tier_flag; + uint8_t profile_idc; + uint32_t profile_compatibility_flags; + uint64_t constraint_indicator_flags; + uint8_t level_idc; +} HVCCProfileTierLevel; + +static void hvcc_update_ptl(HEVCDecoderConfigurationRecord *hvcc, + HVCCProfileTierLevel *ptl) +{ + /* + * The value of general_profile_space in all the parameter sets must be + * identical. + */ + hvcc->general_profile_space = ptl->profile_space; + + /* + * The level indication general_level_idc must indicate a level of + * capability equal to or greater than the highest level indicated for the + * highest tier in all the parameter sets. + */ + if (hvcc->general_tier_flag < ptl->tier_flag) + hvcc->general_level_idc = ptl->level_idc; + else + hvcc->general_level_idc = FFMAX(hvcc->general_level_idc, ptl->level_idc); + + /* + * The tier indication general_tier_flag must indicate a tier equal to or + * greater than the highest tier indicated in all the parameter sets. + */ + hvcc->general_tier_flag = FFMAX(hvcc->general_tier_flag, ptl->tier_flag); + + /* + * The profile indication general_profile_idc must indicate a profile to + * which the stream associated with this configuration record conforms. + * + * If the sequence parameter sets are marked with different profiles, then + * the stream may need examination to determine which profile, if any, the + * entire stream conforms to. If the entire stream is not examined, or the + * examination reveals that there is no profile to which the entire stream + * conforms, then the entire stream must be split into two or more + * sub-streams with separate configuration records in which these rules can + * be met. + * + * Note: set the profile to the highest value for the sake of simplicity. + */ + hvcc->general_profile_idc = FFMAX(hvcc->general_profile_idc, ptl->profile_idc); + + /* + * Each bit in general_profile_compatibility_flags may only be set if all + * the parameter sets set that bit. + */ + hvcc->general_profile_compatibility_flags &= ptl->profile_compatibility_flags; + + /* + * Each bit in general_constraint_indicator_flags may only be set if all + * the parameter sets set that bit. + */ + hvcc->general_constraint_indicator_flags &= ptl->constraint_indicator_flags; +} + +static void hvcc_parse_ptl(GetBitContext *gb, + HEVCDecoderConfigurationRecord *hvcc, + unsigned int max_sub_layers_minus1) +{ + unsigned int i; + HVCCProfileTierLevel general_ptl; + uint8_t sub_layer_profile_present_flag[MAX_SUB_LAYERS]; + uint8_t sub_layer_level_present_flag[MAX_SUB_LAYERS]; + + general_ptl.profile_space = get_bits(gb, 2); + general_ptl.tier_flag = get_bits1(gb); + general_ptl.profile_idc = get_bits(gb, 5); + general_ptl.profile_compatibility_flags = get_bits_long(gb, 32); + general_ptl.constraint_indicator_flags = get_bits64(gb, 48); + general_ptl.level_idc = get_bits(gb, 8); + hvcc_update_ptl(hvcc, &general_ptl); + + for (i = 0; i < max_sub_layers_minus1; i++) { + sub_layer_profile_present_flag[i] = get_bits1(gb); + sub_layer_level_present_flag[i] = get_bits1(gb); + } + + if (max_sub_layers_minus1 > 0) + for (i = max_sub_layers_minus1; i < 8; i++) + skip_bits(gb, 2); // reserved_zero_2bits[i] + + for (i = 0; i < max_sub_layers_minus1; i++) { + if (sub_layer_profile_present_flag[i]) { + /* + * sub_layer_profile_space[i] u(2) + * sub_layer_tier_flag[i] u(1) + * sub_layer_profile_idc[i] u(5) + * sub_layer_profile_compatibility_flag[i][0..31] u(32) + * sub_layer_progressive_source_flag[i] u(1) + * sub_layer_interlaced_source_flag[i] u(1) + * sub_layer_non_packed_constraint_flag[i] u(1) + * sub_layer_frame_only_constraint_flag[i] u(1) + * sub_layer_reserved_zero_44bits[i] u(44) + */ + skip_bits_long(gb, 32); + skip_bits_long(gb, 32); + skip_bits (gb, 24); + } + + if (sub_layer_level_present_flag[i]) + skip_bits(gb, 8); + } +} + +static void skip_sub_layer_hrd_parameters(GetBitContext *gb, + unsigned int cpb_cnt_minus1, + uint8_t sub_pic_hrd_params_present_flag) +{ + unsigned int i; + + for (i = 0; i <= cpb_cnt_minus1; i++) { + get_ue_golomb_long(gb); // bit_rate_value_minus1 + get_ue_golomb_long(gb); // cpb_size_value_minus1 + + if (sub_pic_hrd_params_present_flag) { + get_ue_golomb_long(gb); // cpb_size_du_value_minus1 + get_ue_golomb_long(gb); // bit_rate_du_value_minus1 + } + + skip_bits1(gb); // cbr_flag + } +} + +static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag, + unsigned int max_sub_layers_minus1) +{ + unsigned int i; + uint8_t sub_pic_hrd_params_present_flag = 0; + uint8_t nal_hrd_parameters_present_flag = 0; + uint8_t vcl_hrd_parameters_present_flag = 0; + + if (cprms_present_flag) { + nal_hrd_parameters_present_flag = get_bits1(gb); + vcl_hrd_parameters_present_flag = get_bits1(gb); + + if (nal_hrd_parameters_present_flag || + vcl_hrd_parameters_present_flag) { + sub_pic_hrd_params_present_flag = get_bits1(gb); + + if (sub_pic_hrd_params_present_flag) + /* + * tick_divisor_minus2 u(8) + * du_cpb_removal_delay_increment_length_minus1 u(5) + * sub_pic_cpb_params_in_pic_timing_sei_flag u(1) + * dpb_output_delay_du_length_minus1 u(5) + */ + skip_bits(gb, 19); + + /* + * bit_rate_scale u(4) + * cpb_size_scale u(4) + */ + skip_bits(gb, 8); + + if (sub_pic_hrd_params_present_flag) + skip_bits(gb, 4); // cpb_size_du_scale + + /* + * initial_cpb_removal_delay_length_minus1 u(5) + * au_cpb_removal_delay_length_minus1 u(5) + * dpb_output_delay_length_minus1 u(5) + */ + skip_bits(gb, 15); + } + } + + for (i = 0; i <= max_sub_layers_minus1; i++) { + unsigned int cpb_cnt_minus1 = 0; + uint8_t low_delay_hrd_flag = 0; + uint8_t fixed_pic_rate_within_cvs_flag = 0; + uint8_t fixed_pic_rate_general_flag = get_bits1(gb); + + if (!fixed_pic_rate_general_flag) + fixed_pic_rate_within_cvs_flag = get_bits1(gb); + + if (fixed_pic_rate_within_cvs_flag) + get_ue_golomb_long(gb); // elemental_duration_in_tc_minus1 + else + low_delay_hrd_flag = get_bits1(gb); + + if (!low_delay_hrd_flag) + cpb_cnt_minus1 = get_ue_golomb_long(gb); + + if (nal_hrd_parameters_present_flag) + skip_sub_layer_hrd_parameters(gb, cpb_cnt_minus1, + sub_pic_hrd_params_present_flag); + + if (vcl_hrd_parameters_present_flag) + skip_sub_layer_hrd_parameters(gb, cpb_cnt_minus1, + sub_pic_hrd_params_present_flag); + } +} + +static void skip_timing_info(GetBitContext *gb) +{ + skip_bits_long(gb, 32); // num_units_in_tick + skip_bits_long(gb, 32); // time_scale + + if (get_bits1(gb)) // poc_proportional_to_timing_flag + get_ue_golomb_long(gb); // num_ticks_poc_diff_one_minus1 +} + +static void hvcc_parse_vui(GetBitContext *gb, + HEVCDecoderConfigurationRecord *hvcc, + unsigned int max_sub_layers_minus1) +{ + unsigned int min_spatial_segmentation_idc; + + if (get_bits1(gb)) // aspect_ratio_info_present_flag + if (get_bits(gb, 8) == 255) // aspect_ratio_idc + skip_bits_long(gb, 32); // sar_width u(16), sar_height u(16) + + if (get_bits1(gb)) // overscan_info_present_flag + skip_bits1(gb); // overscan_appropriate_flag + + if (get_bits1(gb)) { // video_signal_type_present_flag + skip_bits(gb, 4); // video_format u(3), video_full_range_flag u(1) + + if (get_bits1(gb)) // colour_description_present_flag + /* + * colour_primaries u(8) + * transfer_characteristics u(8) + * matrix_coeffs u(8) + */ + skip_bits(gb, 24); + } + + if (get_bits1(gb)) { // chroma_loc_info_present_flag + get_ue_golomb_long(gb); // chroma_sample_loc_type_top_field + get_ue_golomb_long(gb); // chroma_sample_loc_type_bottom_field + } + + /* + * neutral_chroma_indication_flag u(1) + * field_seq_flag u(1) + * frame_field_info_present_flag u(1) + */ + skip_bits(gb, 3); + + if (get_bits1(gb)) { // default_display_window_flag + get_ue_golomb_long(gb); // def_disp_win_left_offset + get_ue_golomb_long(gb); // def_disp_win_right_offset + get_ue_golomb_long(gb); // def_disp_win_top_offset + get_ue_golomb_long(gb); // def_disp_win_bottom_offset + } + + if (get_bits1(gb)) { // vui_timing_info_present_flag + skip_timing_info(gb); + + if (get_bits1(gb)) // vui_hrd_parameters_present_flag + skip_hrd_parameters(gb, 1, max_sub_layers_minus1); + } + + if (get_bits1(gb)) { // bitstream_restriction_flag + /* + * tiles_fixed_structure_flag u(1) + * motion_vectors_over_pic_boundaries_flag u(1) + * restricted_ref_pic_lists_flag u(1) + */ + skip_bits(gb, 3); + + min_spatial_segmentation_idc = get_ue_golomb_long(gb); + + /* + * unsigned int(12) min_spatial_segmentation_idc; + * + * The min_spatial_segmentation_idc indication must indicate a level of + * spatial segmentation equal to or less than the lowest level of + * spatial segmentation indicated in all the parameter sets. + */ + hvcc->min_spatial_segmentation_idc = FFMIN(hvcc->min_spatial_segmentation_idc, + min_spatial_segmentation_idc); + + get_ue_golomb_long(gb); // max_bytes_per_pic_denom + get_ue_golomb_long(gb); // max_bits_per_min_cu_denom + get_ue_golomb_long(gb); // log2_max_mv_length_horizontal + get_ue_golomb_long(gb); // log2_max_mv_length_vertical + } +} + +static void skip_sub_layer_ordering_info(GetBitContext *gb) +{ + get_ue_golomb_long(gb); // max_dec_pic_buffering_minus1 + get_ue_golomb_long(gb); // max_num_reorder_pics + get_ue_golomb_long(gb); // max_latency_increase_plus1 +} + +static int hvcc_parse_vps(GetBitContext *gb, + HEVCDecoderConfigurationRecord *hvcc) +{ + unsigned int vps_max_sub_layers_minus1; + + /* + * vps_video_parameter_set_id u(4) + * vps_reserved_three_2bits u(2) + * vps_max_layers_minus1 u(6) + */ + skip_bits(gb, 12); + + vps_max_sub_layers_minus1 = get_bits(gb, 3); + + /* + * numTemporalLayers greater than 1 indicates that the stream to which this + * configuration record applies is temporally scalable and the contained + * number of temporal layers (also referred to as temporal sub-layer or + * sub-layer in ISO/IEC 23008-2) is equal to numTemporalLayers. Value 1 + * indicates that the stream is not temporally scalable. Value 0 indicates + * that it is unknown whether the stream is temporally scalable. + */ + hvcc->numTemporalLayers = FFMAX(hvcc->numTemporalLayers, + vps_max_sub_layers_minus1 + 1); + + /* + * vps_temporal_id_nesting_flag u(1) + * vps_reserved_0xffff_16bits u(16) + */ + skip_bits(gb, 17); + + hvcc_parse_ptl(gb, hvcc, vps_max_sub_layers_minus1); + + /* nothing useful for hvcC past this point */ + return 0; +} + +static void skip_scaling_list_data(GetBitContext *gb) +{ + int i, j, k, num_coeffs; + + for (i = 0; i < 4; i++) + for (j = 0; j < (i == 3 ? 2 : 6); j++) + if (!get_bits1(gb)) // scaling_list_pred_mode_flag[i][j] + get_ue_golomb_long(gb); // scaling_list_pred_matrix_id_delta[i][j] + else { + num_coeffs = FFMIN(64, 1 << (4 + (i << 1))); + + if (i > 1) + get_se_golomb(gb); // scaling_list_dc_coef_minus8[i-2][j] + + for (k = 0; k < num_coeffs; k++) + get_se_golomb(gb); // scaling_list_delta_coef + } +} + +static int parse_rps(GetBitContext *gb, unsigned int rps_idx, + unsigned int num_rps, + unsigned int num_delta_pocs[MAX_SHORT_TERM_RPS_COUNT]) +{ + unsigned int i; + + if (rps_idx && get_bits1(gb)) { // inter_ref_pic_set_prediction_flag + /* this should only happen for slice headers, and this isn't one */ + if (rps_idx >= num_rps) + return AVERROR_INVALIDDATA; + + skip_bits1 (gb); // delta_rps_sign + get_ue_golomb_long(gb); // abs_delta_rps_minus1 + + num_delta_pocs[rps_idx] = 0; + + /* + * From libavcodec/hevc_ps.c: + * + * if (is_slice_header) { + * //foo + * } else + * rps_ridx = &sps->st_rps[rps - sps->st_rps - 1]; + * + * where: + * rps: &sps->st_rps[rps_idx] + * sps->st_rps: &sps->st_rps[0] + * is_slice_header: rps_idx == num_rps + * + * thus: + * if (num_rps != rps_idx) + * rps_ridx = &sps->st_rps[rps_idx - 1]; + * + * NumDeltaPocs[RefRpsIdx]: num_delta_pocs[rps_idx - 1] + */ + for (i = 0; i < num_delta_pocs[rps_idx - 1]; i++) { + uint8_t use_delta_flag = 0; + uint8_t used_by_curr_pic_flag = get_bits1(gb); + if (!used_by_curr_pic_flag) + use_delta_flag = get_bits1(gb); + + if (used_by_curr_pic_flag || use_delta_flag) + num_delta_pocs[rps_idx]++; + } + } else { + unsigned int num_negative_pics = get_ue_golomb_long(gb); + unsigned int num_positive_pics = get_ue_golomb_long(gb); + + num_delta_pocs[rps_idx] = num_negative_pics + num_positive_pics; + + for (i = 0; i < num_negative_pics; i++) { + get_ue_golomb_long(gb); // delta_poc_s0_minus1[rps_idx] + skip_bits1 (gb); // used_by_curr_pic_s0_flag[rps_idx] + } + + for (i = 0; i < num_positive_pics; i++) { + get_ue_golomb_long(gb); // delta_poc_s1_minus1[rps_idx] + skip_bits1 (gb); // used_by_curr_pic_s1_flag[rps_idx] + } + } + + return 0; +} + +static int hvcc_parse_sps(GetBitContext *gb, + HEVCDecoderConfigurationRecord *hvcc) +{ + unsigned int i, sps_max_sub_layers_minus1, log2_max_pic_order_cnt_lsb_minus4; + unsigned int num_short_term_ref_pic_sets, num_delta_pocs[MAX_SHORT_TERM_RPS_COUNT]; + + skip_bits(gb, 4); // sps_video_parameter_set_id + + sps_max_sub_layers_minus1 = get_bits (gb, 3); + + /* + * numTemporalLayers greater than 1 indicates that the stream to which this + * configuration record applies is temporally scalable and the contained + * number of temporal layers (also referred to as temporal sub-layer or + * sub-layer in ISO/IEC 23008-2) is equal to numTemporalLayers. Value 1 + * indicates that the stream is not temporally scalable. Value 0 indicates + * that it is unknown whether the stream is temporally scalable. + */ + hvcc->numTemporalLayers = FFMAX(hvcc->numTemporalLayers, + sps_max_sub_layers_minus1 + 1); + + hvcc->temporalIdNested = get_bits1(gb); + + hvcc_parse_ptl(gb, hvcc, sps_max_sub_layers_minus1); + + get_ue_golomb_long(gb); // sps_seq_parameter_set_id + + hvcc->chromaFormat = get_ue_golomb_long(gb); + + if (hvcc->chromaFormat == 3) + skip_bits1(gb); // separate_colour_plane_flag + + get_ue_golomb_long(gb); // pic_width_in_luma_samples + get_ue_golomb_long(gb); // pic_height_in_luma_samples + + if (get_bits1(gb)) { // conformance_window_flag + get_ue_golomb_long(gb); // conf_win_left_offset + get_ue_golomb_long(gb); // conf_win_right_offset + get_ue_golomb_long(gb); // conf_win_top_offset + get_ue_golomb_long(gb); // conf_win_bottom_offset + } + + hvcc->bitDepthLumaMinus8 = get_ue_golomb_long(gb); + hvcc->bitDepthChromaMinus8 = get_ue_golomb_long(gb); + log2_max_pic_order_cnt_lsb_minus4 = get_ue_golomb_long(gb); + + /* sps_sub_layer_ordering_info_present_flag */ + i = get_bits1(gb) ? 0 : sps_max_sub_layers_minus1; + for (; i <= sps_max_sub_layers_minus1; i++) + skip_sub_layer_ordering_info(gb); + + get_ue_golomb_long(gb); // log2_min_luma_coding_block_size_minus3 + get_ue_golomb_long(gb); // log2_diff_max_min_luma_coding_block_size + get_ue_golomb_long(gb); // log2_min_transform_block_size_minus2 + get_ue_golomb_long(gb); // log2_diff_max_min_transform_block_size + get_ue_golomb_long(gb); // max_transform_hierarchy_depth_inter + get_ue_golomb_long(gb); // max_transform_hierarchy_depth_intra + + if (get_bits1(gb) && // scaling_list_enabled_flag + get_bits1(gb)) // sps_scaling_list_data_present_flag + skip_scaling_list_data(gb); + + skip_bits1(gb); // amp_enabled_flag + skip_bits1(gb); // sample_adaptive_offset_enabled_flag + + if (get_bits1(gb)) { // pcm_enabled_flag + skip_bits (gb, 4); // pcm_sample_bit_depth_luma_minus1 + skip_bits (gb, 4); // pcm_sample_bit_depth_chroma_minus1 + get_ue_golomb_long(gb); // log2_min_pcm_luma_coding_block_size_minus3 + get_ue_golomb_long(gb); // log2_diff_max_min_pcm_luma_coding_block_size + skip_bits1 (gb); // pcm_loop_filter_disabled_flag + } + + num_short_term_ref_pic_sets = get_ue_golomb_long(gb); + if (num_short_term_ref_pic_sets > MAX_SHORT_TERM_RPS_COUNT) + return AVERROR_INVALIDDATA; + + for (i = 0; i < num_short_term_ref_pic_sets; i++) { + int ret = parse_rps(gb, i, num_short_term_ref_pic_sets, num_delta_pocs); + if (ret < 0) + return ret; + } + + if (get_bits1(gb)) { // long_term_ref_pics_present_flag + for (i = 0; i < get_ue_golomb_long(gb); i++) { // num_long_term_ref_pics_sps + int len = FFMIN(log2_max_pic_order_cnt_lsb_minus4 + 4, 16); + skip_bits (gb, len); // lt_ref_pic_poc_lsb_sps[i] + skip_bits1(gb); // used_by_curr_pic_lt_sps_flag[i] + } + } + + skip_bits1(gb); // sps_temporal_mvp_enabled_flag + skip_bits1(gb); // strong_intra_smoothing_enabled_flag + + if (get_bits1(gb)) // vui_parameters_present_flag + hvcc_parse_vui(gb, hvcc, sps_max_sub_layers_minus1); + + /* nothing useful for hvcC past this point */ + return 0; +} + +static int hvcc_parse_pps(GetBitContext *gb, + HEVCDecoderConfigurationRecord *hvcc) +{ + uint8_t tiles_enabled_flag, entropy_coding_sync_enabled_flag; + + get_ue_golomb_long(gb); // pps_pic_parameter_set_id + get_ue_golomb_long(gb); // pps_seq_parameter_set_id + + /* + * dependent_slice_segments_enabled_flag u(1) + * output_flag_present_flag u(1) + * num_extra_slice_header_bits u(3) + * sign_data_hiding_enabled_flag u(1) + * cabac_init_present_flag u(1) + */ + skip_bits(gb, 7); + + get_ue_golomb_long(gb); // num_ref_idx_l0_default_active_minus1 + get_ue_golomb_long(gb); // num_ref_idx_l1_default_active_minus1 + get_se_golomb (gb); // init_qp_minus26 + + /* + * constrained_intra_pred_flag u(1) + * transform_skip_enabled_flag u(1) + */ + skip_bits(gb, 2); + + if (get_bits1(gb)) // cu_qp_delta_enabled_flag + get_ue_golomb_long(gb); // diff_cu_qp_delta_depth + + get_se_golomb(gb); // pps_cb_qp_offset + get_se_golomb(gb); // pps_cr_qp_offset + + /* + * weighted_pred_flag u(1) + * weighted_bipred_flag u(1) + * transquant_bypass_enabled_flag u(1) + */ + skip_bits(gb, 3); + + tiles_enabled_flag = get_bits1(gb); + entropy_coding_sync_enabled_flag = get_bits1(gb); + + if (entropy_coding_sync_enabled_flag && tiles_enabled_flag) + hvcc->parallelismType = 0; // mixed-type parallel decoding + else if (entropy_coding_sync_enabled_flag) + hvcc->parallelismType = 3; // wavefront-based parallel decoding + else if (tiles_enabled_flag) + hvcc->parallelismType = 2; // tile-based parallel decoding + else + hvcc->parallelismType = 1; // slice-based parallel decoding + + /* nothing useful for hvcC past this point */ + return 0; +} + +static uint8_t *nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len, + uint32_t *dst_len) +{ + uint8_t *dst; + uint32_t i, len; + + dst = av_malloc(src_len); + if (!dst) + return NULL; + + /* NAL unit header (2 bytes) */ + i = len = 0; + while (i < 2 && i < src_len) + dst[len++] = src[i++]; + + while (i + 2 < src_len) + if (!src[i] && !src[i + 1] && src[i + 2] == 3) { + dst[len++] = src[i++]; + dst[len++] = src[i++]; + i++; // remove emulation_prevention_three_byte + } else + dst[len++] = src[i++]; + + while (i < src_len) + dst[len++] = src[i++]; + + *dst_len = len; + return dst; +} + + + +static void nal_unit_parse_header(GetBitContext *gb, uint8_t *nal_type) +{ + skip_bits1(gb); // forbidden_zero_bit + + *nal_type = get_bits(gb, 6); + + /* + * nuh_layer_id u(6) + * nuh_temporal_id_plus1 u(3) + */ + skip_bits(gb, 9); +} + +static int hvcc_array_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, + uint8_t nal_type, int ps_array_completeness, + HEVCDecoderConfigurationRecord *hvcc) +{ + int ret; + uint8_t index; + uint16_t numNalus; + HVCCNALUnitArray *array; + + for (index = 0; index < hvcc->numOfArrays; index++) + if (hvcc->array[index].NAL_unit_type == nal_type) + break; + + if (index >= hvcc->numOfArrays) { + uint8_t i; + + ret = av_reallocp_array(&hvcc->array, index + 1, sizeof(HVCCNALUnitArray)); + if (ret < 0) + return ret; + + for (i = hvcc->numOfArrays; i <= index; i++) + memset(&hvcc->array[i], 0, sizeof(HVCCNALUnitArray)); + hvcc->numOfArrays = index + 1; + } + + array = &hvcc->array[index]; + numNalus = array->numNalus; + + ret = av_reallocp_array(&array->nalUnit, numNalus + 1, sizeof(uint8_t*)); + if (ret < 0) + return ret; + + ret = av_reallocp_array(&array->nalUnitLength, numNalus + 1, sizeof(uint16_t)); + if (ret < 0) + return ret; + + array->nalUnit [numNalus] = nal_buf; + array->nalUnitLength[numNalus] = nal_size; + array->NAL_unit_type = nal_type; + array->numNalus++; + + /* + * When the sample entry name is ‘hvc1’, the default and mandatory value of + * array_completeness is 1 for arrays of all types of parameter sets, and 0 + * for all other arrays. When the sample entry name is ‘hev1’, the default + * value of array_completeness is 0 for all arrays. + */ + if (nal_type == NAL_VPS || nal_type == NAL_SPS || nal_type == NAL_PPS) + array->array_completeness = ps_array_completeness; + + return 0; +} + +static int hvcc_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, + int ps_array_completeness, + HEVCDecoderConfigurationRecord *hvcc) +{ + int ret = 0; + GetBitContext gbc; + uint8_t nal_type; + uint8_t *rbsp_buf; + uint32_t rbsp_size; + + rbsp_buf = nal_unit_extract_rbsp(nal_buf, nal_size, &rbsp_size); + if (!rbsp_buf) { + ret = AVERROR(ENOMEM); + goto end; + } + + ret = init_get_bits8(&gbc, rbsp_buf, rbsp_size); + if (ret < 0) + goto end; + + nal_unit_parse_header(&gbc, &nal_type); + + /* + * Note: only 'declarative' SEI messages are allowed in + * hvcC. Perhaps the SEI playload type should be checked + * and non-declarative SEI messages discarded? + */ + switch (nal_type) { + case NAL_VPS: + case NAL_SPS: + case NAL_PPS: + case NAL_SEI_PREFIX: + case NAL_SEI_SUFFIX: + ret = hvcc_array_add_nal_unit(nal_buf, nal_size, nal_type, + ps_array_completeness, hvcc); + if (ret < 0) + goto end; + else if (nal_type == NAL_VPS) + ret = hvcc_parse_vps(&gbc, hvcc); + else if (nal_type == NAL_SPS) + ret = hvcc_parse_sps(&gbc, hvcc); + else if (nal_type == NAL_PPS) + ret = hvcc_parse_pps(&gbc, hvcc); + if (ret < 0) + goto end; + break; + default: + ret = AVERROR_INVALIDDATA; + goto end; + } + +end: + av_free(rbsp_buf); + return ret; +} + +static void hvcc_init(HEVCDecoderConfigurationRecord *hvcc) +{ + memset(hvcc, 0, sizeof(HEVCDecoderConfigurationRecord)); + hvcc->configurationVersion = 1; + hvcc->lengthSizeMinusOne = 3; // 4 bytes + + /* + * The following fields have all their valid bits set by default, + * the ProfileTierLevel parsing code will unset them when needed. + */ + hvcc->general_profile_compatibility_flags = 0xffffffff; + hvcc->general_constraint_indicator_flags = 0xffffffffffff; + + /* + * Initialize this field with an invalid value which can be used to detect + * whether we didn't see any VUI (in wich case it should be reset to zero). + */ + hvcc->min_spatial_segmentation_idc = MAX_SPATIAL_SEGMENTATION + 1; +} + +static void hvcc_close(HEVCDecoderConfigurationRecord *hvcc) +{ + uint8_t i; + + for (i = 0; i < hvcc->numOfArrays; i++) { + hvcc->array[i].numNalus = 0; + av_freep(&hvcc->array[i].nalUnit); + av_freep(&hvcc->array[i].nalUnitLength); + } + + hvcc->numOfArrays = 0; + av_freep(&hvcc->array); +} + +static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) +{ + uint8_t i; + uint16_t j, vps_count = 0, sps_count = 0, pps_count = 0; + + /* + * We only support writing HEVCDecoderConfigurationRecord version 1. + */ + hvcc->configurationVersion = 1; + + /* + * If min_spatial_segmentation_idc is invalid, reset to 0 (unspecified). + */ + if (hvcc->min_spatial_segmentation_idc > MAX_SPATIAL_SEGMENTATION) + hvcc->min_spatial_segmentation_idc = 0; + + /* + * parallelismType indicates the type of parallelism that is used to meet + * the restrictions imposed by min_spatial_segmentation_idc when the value + * of min_spatial_segmentation_idc is greater than 0. + */ + if (!hvcc->min_spatial_segmentation_idc) + hvcc->parallelismType = 0; + + /* + * It's unclear how to properly compute these fields, so + * let's always set them to values meaning 'unspecified'. + */ + hvcc->avgFrameRate = 0; + hvcc->constantFrameRate = 0; + + av_dlog(NULL, "configurationVersion: %"PRIu8"\n", + hvcc->configurationVersion); + av_dlog(NULL, "general_profile_space: %"PRIu8"\n", + hvcc->general_profile_space); + av_dlog(NULL, "general_tier_flag: %"PRIu8"\n", + hvcc->general_tier_flag); + av_dlog(NULL, "general_profile_idc: %"PRIu8"\n", + hvcc->general_profile_idc); + av_dlog(NULL, "general_profile_compatibility_flags: 0x%08"PRIx32"\n", + hvcc->general_profile_compatibility_flags); + av_dlog(NULL, "general_constraint_indicator_flags: 0x%012"PRIx64"\n", + hvcc->general_constraint_indicator_flags); + av_dlog(NULL, "general_level_idc: %"PRIu8"\n", + hvcc->general_level_idc); + av_dlog(NULL, "min_spatial_segmentation_idc: %"PRIu16"\n", + hvcc->min_spatial_segmentation_idc); + av_dlog(NULL, "parallelismType: %"PRIu8"\n", + hvcc->parallelismType); + av_dlog(NULL, "chromaFormat: %"PRIu8"\n", + hvcc->chromaFormat); + av_dlog(NULL, "bitDepthLumaMinus8: %"PRIu8"\n", + hvcc->bitDepthLumaMinus8); + av_dlog(NULL, "bitDepthChromaMinus8: %"PRIu8"\n", + hvcc->bitDepthChromaMinus8); + av_dlog(NULL, "avgFrameRate: %"PRIu16"\n", + hvcc->avgFrameRate); + av_dlog(NULL, "constantFrameRate: %"PRIu8"\n", + hvcc->constantFrameRate); + av_dlog(NULL, "numTemporalLayers: %"PRIu8"\n", + hvcc->numTemporalLayers); + av_dlog(NULL, "temporalIdNested: %"PRIu8"\n", + hvcc->temporalIdNested); + av_dlog(NULL, "lengthSizeMinusOne: %"PRIu8"\n", + hvcc->lengthSizeMinusOne); + av_dlog(NULL, "numOfArrays: %"PRIu8"\n", + hvcc->numOfArrays); + for (i = 0; i < hvcc->numOfArrays; i++) { + av_dlog(NULL, "array_completeness[%"PRIu8"]: %"PRIu8"\n", + i, hvcc->array[i].array_completeness); + av_dlog(NULL, "NAL_unit_type[%"PRIu8"]: %"PRIu8"\n", + i, hvcc->array[i].NAL_unit_type); + av_dlog(NULL, "numNalus[%"PRIu8"]: %"PRIu16"\n", + i, hvcc->array[i].numNalus); + for (j = 0; j < hvcc->array[i].numNalus; j++) + av_dlog(NULL, + "nalUnitLength[%"PRIu8"][%"PRIu16"]: %"PRIu16"\n", + i, j, hvcc->array[i].nalUnitLength[j]); + } + + /* + * We need at least one of each: VPS, SPS and PPS. + */ + for (i = 0; i < hvcc->numOfArrays; i++) + switch (hvcc->array[i].NAL_unit_type) { + case NAL_VPS: + vps_count += hvcc->array[i].numNalus; + break; + case NAL_SPS: + sps_count += hvcc->array[i].numNalus; + break; + case NAL_PPS: + pps_count += hvcc->array[i].numNalus; + break; + default: + break; + } + if (!vps_count || vps_count > MAX_VPS_COUNT || + !sps_count || sps_count > MAX_SPS_COUNT || + !pps_count || pps_count > MAX_PPS_COUNT) + return AVERROR_INVALIDDATA; + + /* unsigned int(8) configurationVersion = 1; */ + avio_w8(pb, hvcc->configurationVersion); + + /* + * unsigned int(2) general_profile_space; + * unsigned int(1) general_tier_flag; + * unsigned int(5) general_profile_idc; + */ + avio_w8(pb, hvcc->general_profile_space << 6 | + hvcc->general_tier_flag << 5 | + hvcc->general_profile_idc); + + /* unsigned int(32) general_profile_compatibility_flags; */ + avio_wb32(pb, hvcc->general_profile_compatibility_flags); + + /* unsigned int(48) general_constraint_indicator_flags; */ + avio_wb32(pb, hvcc->general_constraint_indicator_flags >> 16); + avio_wb16(pb, hvcc->general_constraint_indicator_flags); + + /* unsigned int(8) general_level_idc; */ + avio_w8(pb, hvcc->general_level_idc); + + /* + * bit(4) reserved = ‘1111’b; + * unsigned int(12) min_spatial_segmentation_idc; + */ + avio_wb16(pb, hvcc->min_spatial_segmentation_idc | 0xf000); + + /* + * bit(6) reserved = ‘111111’b; + * unsigned int(2) parallelismType; + */ + avio_w8(pb, hvcc->parallelismType | 0xfc); + + /* + * bit(6) reserved = ‘111111’b; + * unsigned int(2) chromaFormat; + */ + avio_w8(pb, hvcc->chromaFormat | 0xfc); + + /* + * bit(5) reserved = ‘11111’b; + * unsigned int(3) bitDepthLumaMinus8; + */ + avio_w8(pb, hvcc->bitDepthLumaMinus8 | 0xf8); + + /* + * bit(5) reserved = ‘11111’b; + * unsigned int(3) bitDepthChromaMinus8; + */ + avio_w8(pb, hvcc->bitDepthChromaMinus8 | 0xf8); + + /* bit(16) avgFrameRate; */ + avio_wb16(pb, hvcc->avgFrameRate); + + /* + * bit(2) constantFrameRate; + * bit(3) numTemporalLayers; + * bit(1) temporalIdNested; + * unsigned int(2) lengthSizeMinusOne; + */ + avio_w8(pb, hvcc->constantFrameRate << 6 | + hvcc->numTemporalLayers << 3 | + hvcc->temporalIdNested << 2 | + hvcc->lengthSizeMinusOne); + + /* unsigned int(8) numOfArrays; */ + avio_w8(pb, hvcc->numOfArrays); + + for (i = 0; i < hvcc->numOfArrays; i++) { + /* + * bit(1) array_completeness; + * unsigned int(1) reserved = 0; + * unsigned int(6) NAL_unit_type; + */ + avio_w8(pb, hvcc->array[i].array_completeness << 7 | + hvcc->array[i].NAL_unit_type & 0x3f); + + /* unsigned int(16) numNalus; */ + avio_wb16(pb, hvcc->array[i].numNalus); + + for (j = 0; j < hvcc->array[i].numNalus; j++) { + /* unsigned int(16) nalUnitLength; */ + avio_wb16(pb, hvcc->array[i].nalUnitLength[j]); + + /* bit(8*nalUnitLength) nalUnit; */ + avio_write(pb, hvcc->array[i].nalUnit[j], + hvcc->array[i].nalUnitLength[j]); + } + } + + return 0; +} + +int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness) +{ + int ret = 0; + uint8_t *buf, *end, *start = NULL; + HEVCDecoderConfigurationRecord hvcc; + + hvcc_init(&hvcc); + + if (size < 6) { + /* We can't write a valid hvcC from the provided data */ + ret = AVERROR_INVALIDDATA; + goto end; + } else if (*data == 1) { + /* Data is already hvcC-formatted */ + avio_write(pb, data, size); + goto end; + } else if (!(AV_RB24(data) == 1 || AV_RB32(data) == 1)) { + /* Not a valid Annex B start code prefix */ + ret = AVERROR_INVALIDDATA; + goto end; + } + + ret = ff_avc_parse_nal_units_buf(data, &start, &size); + if (ret < 0) + goto end; + + buf = start; + end = start + size; + + while (end - buf > 4) { + uint32_t len = FFMIN(AV_RB32(buf), end - buf - 4); + uint8_t type = (buf[4] >> 1) & 0x3f; + + buf += 4; + + switch (type) { + case NAL_VPS: + case NAL_SPS: + case NAL_PPS: + case NAL_SEI_PREFIX: + case NAL_SEI_SUFFIX: + ret = hvcc_add_nal_unit(buf, len, ps_array_completeness, &hvcc); + if (ret < 0) + goto end; + break; + default: + break; + } + + buf += len; + } + + ret = hvcc_write(pb, &hvcc); + +end: + hvcc_close(&hvcc); + av_free(start); + return ret; +} diff --git a/libavformat/hevc.h b/libavformat/hevc.h new file mode 100644 index 0000000000..82525ac84b --- /dev/null +++ b/libavformat/hevc.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014 Tim Walker + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal header for HEVC (de)muxer utilities + */ + +#ifndef AVFORMAT_HEVC_H +#define AVFORMAT_HEVC_H + +#include +#include "avio.h" + +/** + * Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the + * provided AVIOContext. + * + * If the extradata is Annex B format, it gets converted to hvcC format before + * writing. + * + * @param pb address of the AVIOContext where the hvcC shall be written + * @param data address of the buffer holding the data needed to write the hvcC + * @param size size (in bytes) of the data buffer + * @param ps_array_completeness whether all parameter sets are in the hvcC (1) + * or there may be additional parameter sets in the bitstream (0) + * @return 0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + */ +int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness); + +#endif /* AVFORMAT_HEVC_H */ diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6344e38298..641e1c7f48 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -39,6 +39,7 @@ #include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/dict.h" +#include "hevc.h" #include "rtpenc.h" #include "mov_chan.h" @@ -685,6 +686,16 @@ static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track) return update_size(pb, pos); } +static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) +{ + int64_t pos = avio_tell(pb); + + avio_wb32(pb, 0); + ffio_wfourcc(pb, "hvcC"); + ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); + return update_size(pb, pos); +} + /* also used by all avid codecs (dv, imx, meridien) and their variants */ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) { @@ -1035,6 +1046,8 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) mov_write_svq3_tag(pb); else if (track->enc->codec_id == AV_CODEC_ID_DNXHD) mov_write_avid_tag(pb, track); + else if (track->enc->codec_id == AV_CODEC_ID_HEVC) + mov_write_hvcc_tag(pb, track); else if (track->enc->codec_id == AV_CODEC_ID_H264) { mov_write_avcc_tag(pb, track); if (track->mode == MODE_IPOD) From eaa79b79b25ac0ceaf44fe575a3ae724b87285b2 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:42 +0000 Subject: [PATCH 064/822] movenc: enable Annex B to MP4 conversion for HEVC tracks. (cherry picked from commit b6c61fb83e876d404ac3b0b3657ebfcafdcd1926) --- libavformat/hevc.c | 101 +++++++++++++++++++++++++++++++++++++++++++ libavformat/hevc.h | 48 ++++++++++++++++++++ libavformat/movenc.c | 9 ++++ 3 files changed, 158 insertions(+) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index ab4eb10a8b..2c1b4c492d 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -1014,6 +1014,107 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) return 0; } +int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, + int size, int filter_ps, int *ps_count) +{ + int num_ps = 0, ret = 0; + uint8_t *buf, *end, *start = NULL; + + if (!filter_ps) { + ret = ff_avc_parse_nal_units(pb, buf_in, size); + goto end; + } + + ret = ff_avc_parse_nal_units_buf(buf_in, &start, &size); + if (ret < 0) + goto end; + + ret = 0; + buf = start; + end = start + size; + + while (end - buf > 4) { + uint32_t len = FFMIN(AV_RB32(buf), end - buf - 4); + uint8_t type = (buf[4] >> 1) & 0x3f; + + buf += 4; + + switch (type) { + case NAL_VPS: + case NAL_SPS: + case NAL_PPS: + num_ps++; + break; + default: + ret += 4 + len; + avio_wb32(pb, len); + avio_write(pb, buf, len); + break; + } + + buf += len; + } + +end: + free(start); + if (ps_count) + *ps_count = num_ps; + return ret; +} + +int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, + int *size, int filter_ps, int *ps_count) +{ + AVIOContext *pb; + int num_ps = 0, ret = 0; + uint8_t *buf, *end, *start = NULL; + + if (!filter_ps) { + ret = ff_avc_parse_nal_units_buf(buf_in, buf_out, size); + goto end; + } + + ret = avio_open_dyn_buf(&pb); + if (ret < 0) + goto end; + + ret = ff_avc_parse_nal_units_buf(buf_in, &start, size); + if (ret < 0) + goto end; + + buf = start; + end = start + *size; + + while (end - buf > 4) { + uint32_t len = FFMIN(AV_RB32(buf), end - buf - 4); + uint8_t type = (buf[4] >> 1) & 0x3f; + + buf += 4; + + switch (type) { + case NAL_VPS: + case NAL_SPS: + case NAL_PPS: + num_ps++; + break; + default: + avio_wb32(pb, len); + avio_write(pb, buf, len); + break; + } + + buf += len; + } + + *size = avio_close_dyn_buf(pb, buf_out); + +end: + free(start); + if (ps_count) + *ps_count = num_ps; + return ret; +} + int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, int size, int ps_array_completeness) { diff --git a/libavformat/hevc.h b/libavformat/hevc.h index 82525ac84b..f394342028 100644 --- a/libavformat/hevc.h +++ b/libavformat/hevc.h @@ -29,6 +29,54 @@ #include #include "avio.h" +/** + * Writes Annex B formatted HEVC NAL units to the provided AVIOContext. + * + * The NAL units are converted to an MP4-compatible format (start code prefixes + * are replaced by 4-byte size fields, as per ISO/IEC 14496-15). + * + * If filter_ps is non-zero, any HEVC parameter sets found in the input will be + * discarded, and *ps_count will be set to the number of discarded PS NAL units. + * + * @param pb address of the AVIOContext where the data shall be written + * @param buf_in address of the buffer holding the input data + * @param size size (in bytes) of the input buffer + * @param filter_ps whether to write parameter set NAL units to the output (0) + * or to discard them (non-zero) + * @param ps_count address of the variable where the number of discarded + * parameter set NAL units shall be written, may be NULL + * @return the amount (in bytes) of data written in case of success, a negative + * value corresponding to an AVERROR code in case of failure + */ +int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, + int size, int filter_ps, int *ps_count); + +/** + * Writes Annex B formatted HEVC NAL units to a data buffer. + * + * The NAL units are converted to an MP4-compatible format (start code prefixes + * are replaced by 4-byte size fields, as per ISO/IEC 14496-15). + * + * If filter_ps is non-zero, any HEVC parameter sets found in the input will be + * discarded, and *ps_count will be set to the number of discarded PS NAL units. + * + * On output, *size holds the size (in bytes) of the output data buffer. + * + * @param buf_in address of the buffer holding the input data + * @param size address of the variable holding the size (in bytes) of the input + * buffer (on input) and of the output buffer (on output) + * @param buf_out address of the variable holding the address of the output + * buffer + * @param filter_ps whether to write parameter set NAL units to the output (0) + * or to discard them (non-zero) + * @param ps_count address of the variable where the number of discarded + * parameter set NAL units shall be written, may be NULL + * @return 0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + */ +int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, + int *size, int filter_ps, int *ps_count); + /** * Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the * provided AVIOContext. diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 641e1c7f48..6218259664 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2939,6 +2939,15 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) } else { size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size); } + } else if (enc->codec_id == AV_CODEC_ID_HEVC && trk->vos_len > 6 && + (AV_RB24(trk->vos_data) == 1 || AV_RB32(trk->vos_data) == 1)) { + /* extradata is Annex B, assume the bitstream is too and convert it */ + if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) { + ff_hevc_annexb2mp4_buf(pkt->data, &reformatted_data, &size, 0, NULL); + avio_write(pb, reformatted_data, size); + } else { + size = ff_hevc_annexb2mp4(pb, pkt->data, pkt->size, 0, NULL); + } } else { avio_write(pb, pkt->data, size); } From eabefe83f40a65d0f0c2a9a0521f6d96c3932545 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:43 +0000 Subject: [PATCH 065/822] movenc: allow muxing HEVC in MODE_MP4. (cherry picked from commit 4f3db5d3418a24f3b90422e98ad75388052c4284) --- libavformat/isom.c | 1 + libavformat/movenc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index a6197aba02..76c455b863 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -33,6 +33,7 @@ const AVCodecTag ff_mp4_obj_type[] = { { AV_CODEC_ID_MOV_TEXT , 0x08 }, { AV_CODEC_ID_MPEG4 , 0x20 }, { AV_CODEC_ID_H264 , 0x21 }, + { AV_CODEC_ID_HEVC , 0x23 }, { AV_CODEC_ID_AAC , 0x40 }, { AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */ { AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG2 Main */ diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6218259664..2ae3475c17 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -752,6 +752,7 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) return 0; if (track->enc->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1'); + else if (track->enc->codec_id == AV_CODEC_ID_HEVC) tag = MKTAG('h','e','v','1'); else if (track->enc->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3'); else if (track->enc->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c'); else if (track->enc->codec_id == AV_CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g'); From 7940306a47df602be4f57a62175706265bbfd0aa Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Wed, 21 Mar 2012 14:18:16 -0700 Subject: [PATCH 066/822] movdec: handle 0x7fff langcode as macintosh per the specs The correct point that seperates ISO and MAC language codes is 0x400 according to the current QT spec. Old QT specs did not list where this seperation is but apparently only defined the meaning of the first 137. (cherry picked from commit 9e71cc81f3655cacf0f91860fba3043f13b64059) --- libavformat/isom.c | 2 +- libavformat/mov.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index 76c455b863..0c8cf4337e 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -347,7 +347,7 @@ int ff_mov_lang_to_iso639(unsigned code, char to[4]) memset(to, 0, 4); /* is it the mangled iso code? */ /* see http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt */ - if (code > 138) { + if (code >= 0x400 && code != 0x7fff) { for (i = 2; i >= 0; i--) { to[i] = 0x60 + (code & 0x1f); code >>= 5; diff --git a/libavformat/mov.c b/libavformat/mov.c index dc5b42b2d3..6f72ce8144 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -298,7 +298,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (parse) parse(c, pb, str_size, key); else { - if (data_type == 3 || (data_type == 0 && langcode < 0x800)) { // MAC Encoded + if (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode == 0x7fff))) { // MAC Encoded mov_read_mac_string(c, pb, str_size, str, sizeof(str)); } else { avio_read(pb, str, str_size); From d37fac6dbbdddb76225aa691b83ffd9a0c7dae6b Mon Sep 17 00:00:00 2001 From: Mark Himsley Date: Fri, 1 Nov 2013 11:22:53 +0000 Subject: [PATCH 067/822] isom: lpcm in mov default to big endian It is my understanding that "Unless otherwise stated, all data in a QuickTime movie is stored in big-endian byte ordering" [1] in MOV files. I have a couple of thousand files, which technically are invalid because their sound sample description element 4CC is 'lpcm' but its version is 0 - and "Version 0 supports only uncompressed audio in raw ('raw ') or twos-complement ('twos') format" [2] Because isom.c only contains a mapping for 4CC 'lpcm' to AV_CODEC_ID_PCM_S16LE, these files have their audio decoded as LE when it is actually BE. This commit adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC 'lpcm'. [1] https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf page 21 [2] https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf page 178 Reviewed-by: Yusuke Nakamura (cherry picked from commit 360022bd3b894cc01ea112b275fa4c8f53881808) --- libavformat/isom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index 0c8cf4337e..7861290b57 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -264,6 +264,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = { { AV_CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') }, { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') }, { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') }, + { AV_CODEC_ID_PCM_S16BE, MKTAG('l', 'p', 'c', 'm') }, { AV_CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') }, { AV_CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') }, { AV_CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') }, From 45acc228a6d5f1e7d6c5ce6da63b293bd5eda57d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 8 Mar 2014 11:52:14 +0100 Subject: [PATCH 068/822] doc: fix a couple of typos in frame.h (cherry picked from commit a18ef7a76c735bcf78ed4825e33ad7f9f6f77a54) --- libavutil/frame.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index 20766423f5..63ed219f47 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -428,7 +428,7 @@ AVFrame *av_frame_alloc(void); void av_frame_free(AVFrame **frame); /** - * Setup a new reference to the data described by an given frame. + * Set up a new reference to the data described by the source frame. * * Copy frame properties from src to dst and create a new reference for each * AVBufferRef from src. From 6230de03aad9f26d5843afb913d196622e0b5b98 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 27 Feb 2014 12:29:37 +0100 Subject: [PATCH 069/822] vf_frei0r: refactor library loading from env variable strtok_r is not needed any more, so remove it from configure. (cherry picked from commit 61b323ce7c7cdc101eadfd7de2203922b8a39e8d) --- configure | 6 ++---- libavfilter/vf_frei0r.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/configure b/configure index ae504da3eb..1554e0a1c0 100755 --- a/configure +++ b/configure @@ -1404,7 +1404,6 @@ HAVE_LIST=" soundcard_h strerror_r strptime - strtok_r struct_addrinfo struct_group_source_req struct_ip_mreq_source @@ -2008,9 +2007,9 @@ boxblur_filter_deps="gpl" cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" -frei0r_filter_deps="frei0r dlopen strtok_r" +frei0r_filter_deps="frei0r dlopen" frei0r_filter_extralibs='$ldl' -frei0r_src_filter_deps="frei0r dlopen strtok_r" +frei0r_src_filter_deps="frei0r dlopen" frei0r_src_filter_extralibs='$ldl' hqdn3d_filter_deps="gpl" interlace_filter_deps="gpl" @@ -3836,7 +3835,6 @@ check_func_headers malloc.h _aligned_malloc && enable aligned_malloc check_func setrlimit check_func strerror_r check_func strptime -check_func strtok_r check_func sched_getaffinity check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)" check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()" diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 0d0866a2cd..b4f4ddfffe 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -232,12 +232,18 @@ static av_cold int frei0r_init(AVFilterContext *ctx, } /* see: http://piksel.org/frei0r/1.2/spec/1.2/spec/group__pluglocations.html */ - if ((path = av_strdup(getenv("FREI0R_PATH")))) { - char *p, *ptr = NULL; - for (p = path; p = strtok_r(p, ":", &ptr); p = NULL) - if (s->dl_handle = load_path(ctx, p, dl_name)) - break; - av_free(path); + if (path = getenv("FREI0R_PATH")) { + while(*path) { + char *ptr = av_get_token((const char **)&path, ":"); + if (!ptr) + return AVERROR(ENOMEM); + s->dl_handle = load_path(ctx, ptr, dl_name); + av_freep(&ptr); + if (s->dl_handle) + break; /* found */ + if (*path) + path++ /* skip ':' */ + } } if (!s->dl_handle && (path = getenv("HOME"))) { char prefix[1024]; From bd4ad1a1d52b8882df016826b8bdcf7b1009cb97 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 4 Mar 2014 18:27:09 +0100 Subject: [PATCH 070/822] vf_frei0r: fix missing end of line character Error introduced in 61b323ce7c7cdc101eadfd7de2203922b8a39e8d. (cherry picked from commit 4c41a7a1798dd6c60e40f79be12faa98a9347151) --- libavfilter/vf_frei0r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index b4f4ddfffe..9c6b84b40b 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -242,7 +242,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, if (s->dl_handle) break; /* found */ if (*path) - path++ /* skip ':' */ + path++; /* skip ':' */ } } if (!s->dl_handle && (path = getenv("HOME"))) { From 416847d19593e87ee1704c26a9a638fd6b0d977c Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 27 Feb 2014 12:06:15 +0100 Subject: [PATCH 071/822] vf_frei0r: prevent a segfault when filter parameters are not set (cherry picked from commit 4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e) --- libavfilter/vf_frei0r.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 9c6b84b40b..670fa180c7 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -465,6 +465,10 @@ static int source_config_props(AVFilterLink *outlink) av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance"); return AVERROR(EINVAL); } + if (!s->params) { + av_log(ctx, AV_LOG_ERROR, "frei0r filter parameters not set.\n"); + return AVERROR(EINVAL); + } return set_params(ctx, s->params); } From 227cfc1f10a940c88ad3742ec805c07b6a5e7abb Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 27 Feb 2014 13:41:57 +0100 Subject: [PATCH 072/822] vf_frei0r: adjust error messages (cherry picked from commit 8accddeb5806cd98e3803b4ddf2a2ef576d0e4d9) --- libavfilter/vf_frei0r.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 670fa180c7..771443d02e 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -81,7 +81,7 @@ static void *load_sym(AVFilterContext *ctx, const char *sym_name) Frei0rContext *s = ctx->priv; void *sym = dlsym(s->dl_handle, sym_name); if (!sym) - av_log(ctx, AV_LOG_ERROR, "Could not find symbol '%s' in loaded module\n", sym_name); + av_log(ctx, AV_LOG_ERROR, "Could not find symbol '%s' in loaded module.\n", sym_name); return sym; } @@ -129,7 +129,7 @@ static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha return 0; fail: - av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for parameter '%s'\n", + av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for parameter '%s'.\n", param, info.name); return AVERROR(EINVAL); } @@ -198,11 +198,11 @@ static int set_params(AVFilterContext *ctx, const char *params) default: /* F0R_PARAM_STRING */ v = s; s->get_param_value(s->instance, v, i); - av_log(ctx, AV_LOG_DEBUG, "'%s'\n", s); + av_log(ctx, AV_LOG_DEBUG, "'%s'", s); break; } #endif - av_log(ctx, AV_LOG_VERBOSE, "\n"); + av_log(ctx, AV_LOG_VERBOSE, ".\n"); } return 0; @@ -213,7 +213,7 @@ static void *load_path(AVFilterContext *ctx, const char *prefix, const char *nam char path[1024]; snprintf(path, sizeof(path), "%s%s%s", prefix, name, SLIBSUF); - av_log(ctx, AV_LOG_DEBUG, "Looking for frei0r effect in '%s'\n", path); + av_log(ctx, AV_LOG_DEBUG, "Looking for frei0r effect in '%s'.\n", path); return dlopen(path, RTLD_NOW|RTLD_LOCAL); } @@ -255,7 +255,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, if (!s->dl_handle) s->dl_handle = load_path(ctx, "/usr/lib/frei0r-1/", dl_name); if (!s->dl_handle) { - av_log(ctx, AV_LOG_ERROR, "Could not find module '%s'\n", dl_name); + av_log(ctx, AV_LOG_ERROR, "Could not find module '%s'.\n", dl_name); return AVERROR(EINVAL); } @@ -271,7 +271,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, return AVERROR(EINVAL); if (f0r_init() < 0) { - av_log(ctx, AV_LOG_ERROR, "Could not init the frei0r module"); + av_log(ctx, AV_LOG_ERROR, "Could not init the frei0r module.\n"); return AVERROR(EINVAL); } @@ -279,7 +279,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, pi = &s->plugin_info; if (pi->plugin_type != type) { av_log(ctx, AV_LOG_ERROR, - "Invalid type '%s' for the plugin\n", + "Invalid type '%s' for this plugin\n", pi->plugin_type == F0R_PLUGIN_TYPE_FILTER ? "filter" : pi->plugin_type == F0R_PLUGIN_TYPE_SOURCE ? "source" : pi->plugin_type == F0R_PLUGIN_TYPE_MIXER2 ? "mixer2" : @@ -326,7 +326,7 @@ static int config_input_props(AVFilterLink *inlink) if (s->destruct && s->instance) s->destruct(s->instance); if (!(s->instance = s->construct(inlink->w, inlink->h))) { - av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance"); + av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance.\n"); return AVERROR(EINVAL); } @@ -433,13 +433,13 @@ static av_cold int source_init(AVFilterContext *ctx) AVRational frame_rate_q; if (av_parse_video_size(&s->w, &s->h, s->size) < 0) { - av_log(ctx, AV_LOG_ERROR, "Invalid frame size: '%s'\n", s->size); + av_log(ctx, AV_LOG_ERROR, "Invalid frame size: '%s'.\n", s->size); return AVERROR(EINVAL); } if (av_parse_video_rate(&frame_rate_q, s->framerate) < 0 || frame_rate_q.den <= 0 || frame_rate_q.num <= 0) { - av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", s->framerate); + av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'.\n", s->framerate); return AVERROR(EINVAL); } s->time_base.num = frame_rate_q.den; @@ -462,7 +462,7 @@ static int source_config_props(AVFilterLink *outlink) if (s->destruct && s->instance) s->destruct(s->instance); if (!(s->instance = s->construct(outlink->w, outlink->h))) { - av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance"); + av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance.\n"); return AVERROR(EINVAL); } if (!s->params) { From 6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 10:57:51 +0100 Subject: [PATCH 073/822] golomb: Add a get_se_golomb_long Useful in libavformat mostly. (cherry picked from commit 5eacbb53289570834f9a1acb15fd406ea224eef6) --- libavcodec/golomb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index efe5059133..ce3500f8a9 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -206,6 +206,18 @@ static inline int get_se_golomb(GetBitContext *gb) } } +static inline int get_se_golomb_long(GetBitContext *gb) +{ + unsigned int buf = get_ue_golomb_long(gb); + + if (buf & 1) + buf = -(buf >> 1); + else + buf = (buf >> 1); + + return buf; +} + static inline int svq3_get_se_golomb(GetBitContext *gb) { unsigned int buf; From b37b83214ae3a462df1e8d3cc765ddbd2bfc73aa Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 10:59:48 +0100 Subject: [PATCH 074/822] hevc: Use get_se_golomb_long Do not use inline functions that refer to tables present in other libraries. (cherry picked from commit ee17be3fdd37f63f4b77676820e387858908b0f4) --- libavformat/hevc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 2c1b4c492d..dc45fbfe62 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -402,10 +402,10 @@ static void skip_scaling_list_data(GetBitContext *gb) num_coeffs = FFMIN(64, 1 << (4 + (i << 1))); if (i > 1) - get_se_golomb(gb); // scaling_list_dc_coef_minus8[i-2][j] + get_se_golomb_long(gb); // scaling_list_dc_coef_minus8[i-2][j] for (k = 0; k < num_coeffs; k++) - get_se_golomb(gb); // scaling_list_delta_coef + get_se_golomb_long(gb); // scaling_list_delta_coef } } @@ -593,7 +593,7 @@ static int hvcc_parse_pps(GetBitContext *gb, get_ue_golomb_long(gb); // num_ref_idx_l0_default_active_minus1 get_ue_golomb_long(gb); // num_ref_idx_l1_default_active_minus1 - get_se_golomb (gb); // init_qp_minus26 + get_se_golomb_long(gb); // init_qp_minus26 /* * constrained_intra_pred_flag u(1) @@ -604,8 +604,8 @@ static int hvcc_parse_pps(GetBitContext *gb, if (get_bits1(gb)) // cu_qp_delta_enabled_flag get_ue_golomb_long(gb); // diff_cu_qp_delta_depth - get_se_golomb(gb); // pps_cb_qp_offset - get_se_golomb(gb); // pps_cr_qp_offset + get_se_golomb_long(gb); // pps_cb_qp_offset + get_se_golomb_long(gb); // pps_cr_qp_offset /* * weighted_pred_flag u(1) From 2c5e1d0933facc20c6926a788cce05d3e6cad149 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 11:48:04 +0100 Subject: [PATCH 075/822] configure: Use the right pkgconf file for openjpeg The current release of version 1 uses libopenjpeg1. (cherry picked from commit 4a8562394b685e83ae4a38a93eef43625755a231) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 1554e0a1c0..c6789d5d83 100755 --- a/configure +++ b/configure @@ -3938,7 +3938,7 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader -enabled libopenjpeg && require_pkg_config libopenjpeg openjpeg.h opj_version +enabled libopenjpeg && require_pkg_config libopenjpeg1 openjpeg.h opj_version enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket From 6d56bc9a6d853a33fe53ab63db580c4facaba420 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 10 Mar 2014 15:03:13 +0000 Subject: [PATCH 076/822] lavf: simplify ff_hevc_annexb2mp4_buf Use ff_hevc_annexb2mp4 instead of duplicating its functionality, and update the documentation to match the new behavior. (cherry picked from commit 34bbc81de8a49fbddb92b76dc733f40890480b2b) --- libavformat/hevc.c | 43 +++---------------------------------------- libavformat/hevc.h | 4 ++-- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index dc45fbfe62..e3be20cfb6 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -1066,52 +1066,15 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, int *size, int filter_ps, int *ps_count) { AVIOContext *pb; - int num_ps = 0, ret = 0; - uint8_t *buf, *end, *start = NULL; - - if (!filter_ps) { - ret = ff_avc_parse_nal_units_buf(buf_in, buf_out, size); - goto end; - } + int ret; ret = avio_open_dyn_buf(&pb); if (ret < 0) - goto end; - - ret = ff_avc_parse_nal_units_buf(buf_in, &start, size); - if (ret < 0) - goto end; - - buf = start; - end = start + *size; - - while (end - buf > 4) { - uint32_t len = FFMIN(AV_RB32(buf), end - buf - 4); - uint8_t type = (buf[4] >> 1) & 0x3f; - - buf += 4; - - switch (type) { - case NAL_VPS: - case NAL_SPS: - case NAL_PPS: - num_ps++; - break; - default: - avio_wb32(pb, len); - avio_write(pb, buf, len); - break; - } - - buf += len; - } + return ret; + ret = ff_hevc_annexb2mp4(pb, buf_in, *size, filter_ps, ps_count); *size = avio_close_dyn_buf(pb, buf_out); -end: - free(start); - if (ps_count) - *ps_count = num_ps; return ret; } diff --git a/libavformat/hevc.h b/libavformat/hevc.h index f394342028..03c43bd471 100644 --- a/libavformat/hevc.h +++ b/libavformat/hevc.h @@ -71,8 +71,8 @@ int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, * or to discard them (non-zero) * @param ps_count address of the variable where the number of discarded * parameter set NAL units shall be written, may be NULL - * @return 0 in case of success, a negative value corresponding to an AVERROR - * code in case of failure + * @return the amount (in bytes) of data written in case of success, a negative + * value corresponding to an AVERROR code in case of failure */ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, int *size, int filter_ps, int *ps_count); From 3533a850e766f2333c28af4fac9b42e4da588708 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 10 Mar 2014 15:03:14 +0000 Subject: [PATCH 077/822] lavf: always use av_free Signed-off-by: Tim Walker (cherry picked from commit 77e9123fe5d64b0960158de6e1713d3c6c7878a7) --- libavformat/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index e3be20cfb6..37b35b4d2d 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -1056,7 +1056,7 @@ int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, } end: - free(start); + av_free(start); if (ps_count) *ps_count = num_ps; return ret; From 3171e2360aaeb0f0a3c2848dcf6426f1d40d5ed8 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Sun, 2 Mar 2014 17:47:19 +0100 Subject: [PATCH 078/822] Revert "lavu/buffer: add release function" This reverts commit 3144440004941aa22ffea9933f5e5dfe826df654. Signed-off-by: Michael Niedermayer (cherry picked from commit bba7b6fc41057d4aec6b1f0e12240db56fe6e9b6) Signed-off-by: Michael Niedermayer --- libavutil/buffer.c | 29 ----------------------------- libavutil/buffer.h | 12 ------------ 2 files changed, 41 deletions(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index e8ec2c97e0..e9bf54b96c 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -117,35 +117,6 @@ void av_buffer_unref(AVBufferRef **buf) } } -int av_buffer_release(AVBufferRef **buf, uint8_t **data) -{ - AVBuffer *b; - int ret = 0; - - if (data) - *data = NULL; - if (!buf || !*buf) - return 0; - b = (*buf)->buffer; - av_freep(buf); - - if (data && avpriv_atomic_int_get(&b->refcount) > 1) { - *data = av_memdup(b->data, b->size); - if (!*data) - ret = AVERROR(ENOMEM); - } - - if (!avpriv_atomic_int_add_and_fetch(&b->refcount, -1)) { - if (data && !*data) { - ret = 0; - *data = b->data; - } else - b->free(b->opaque, b->data); - av_freep(&b); - } - return ret; -} - int av_buffer_is_writable(const AVBufferRef *buf) { if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY) diff --git a/libavutil/buffer.h b/libavutil/buffer.h index 8cf2cbf302..b4399fd39f 100644 --- a/libavutil/buffer.h +++ b/libavutil/buffer.h @@ -154,18 +154,6 @@ AVBufferRef *av_buffer_ref(AVBufferRef *buf); */ void av_buffer_unref(AVBufferRef **buf); -/** - * Free a given reference and pass underlaying data to user provided pointer. - * If there is more than one reference then data is copied. - * - * @param buf the reference to be released. The pointer is set to NULL on return. - * @param data pointer to be passed with underlaying data. - * @return 0 on success, a negative AVERROR on failure. - * - * @note on error buffer is properly released and *data is set to NULL. - */ -int av_buffer_release(AVBufferRef **buf, uint8_t **data); - /** * @return 1 if the caller may write to the data referred to by buf (which is * true if and only if buf is the only reference to the underlying AVBuffer). From 95ddd2227baae94c94d5aa3db6d22ddf5879e7e1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 9 Mar 2014 22:59:46 +0100 Subject: [PATCH 079/822] avformat: fix hevcs use of golomb from avformat Signed-off-by: Michael Niedermayer (cherry picked from commit cb403b2570385cbf48a11f9f48441de5cd01171e) Signed-off-by: Michael Niedermayer --- libavformat/Makefile | 2 +- libavformat/golomb_tab.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 libavformat/golomb_tab.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 6465c176eb..65845c7921 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -50,7 +50,7 @@ OBJS-$(CONFIG_RTPDEC) += rdt.o \ rtpdec_xiph.o \ srtp.o OBJS-$(CONFIG_RTPENC_CHAIN) += rtpenc_chain.o rtp.o -OBJS-$(CONFIG_SHARED) += log2_tab.o +OBJS-$(CONFIG_SHARED) += log2_tab.o golomb_tab.o # muxers/demuxers OBJS-$(CONFIG_A64_MUXER) += a64.o rawenc.o diff --git a/libavformat/golomb_tab.c b/libavformat/golomb_tab.c new file mode 100644 index 0000000000..063fae3647 --- /dev/null +++ b/libavformat/golomb_tab.c @@ -0,0 +1 @@ +#include "libavcodec/golomb.c" From 186e0ff067c458df4358f57c71504ada26d1b18a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 9 Mar 2014 23:12:45 +0100 Subject: [PATCH 080/822] avformat/hevc: Make return codes consistent and more flexible Signed-off-by: Michael Niedermayer (cherry picked from commit 5d5e2bd86242506a5af4b290b72e1c52f62f7fb6) Signed-off-by: Michael Niedermayer --- libavformat/hevc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/hevc.h b/libavformat/hevc.h index edf7527aa4..c687f1b1fc 100644 --- a/libavformat/hevc.h +++ b/libavformat/hevc.h @@ -71,7 +71,7 @@ int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, * or to discard them (non-zero) * @param ps_count address of the variable where the number of discarded * parameter set NAL units shall be written, may be NULL - * @return 0 in case of success, a negative value corresponding to an AVERROR + * @return >=0 in case of success, a negative value corresponding to an AVERROR * code in case of failure */ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, @@ -89,7 +89,7 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, * @param size size (in bytes) of the data buffer * @param ps_array_completeness whether all parameter sets are in the hvcC (1) * or there may be additional parameter sets in the bitstream (0) - * @return 0 in case of success, a negative value corresponding to an AVERROR + * @return >=0 in case of success, a negative value corresponding to an AVERROR * code in case of failure */ int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, From ebe356bf1cc94a8152649dc358ed13e0188d4dda Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 9 Mar 2014 23:27:31 +0100 Subject: [PATCH 081/822] avformat/hevc: fix mix of av_malloc() with free() Signed-off-by: Michael Niedermayer (cherry picked from commit 88c8e4afeaf74ee58b67145e0331e229d8050968) Signed-off-by: Michael Niedermayer --- libavformat/hevc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 6e935e6038..19dd2f40cf 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -1056,7 +1056,7 @@ int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, } end: - free(start); + av_free(start); if (ps_count) *ps_count = num_ps; return ret; @@ -1109,7 +1109,7 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, *size = avio_close_dyn_buf(pb, buf_out); end: - free(start); + av_free(start); if (ps_count) *ps_count = num_ps; return ret; From 2b9ee7d5b901e0d7ba617511e4ed31d3043894d3 Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Tue, 14 Jan 2014 09:49:29 -0500 Subject: [PATCH 082/822] doc: Add section about AviSynth support Signed-off-by: Diego Biurrun (cherry picked from commit 908836e20743d7e9462011a9f30a300a5bf247ca) --- doc/general.texi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/general.texi b/doc/general.texi index 5f9500eaac..c069455a2b 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -112,7 +112,39 @@ Go to @url{https://github.com/dekkers/libilbc} and follow the instructions for installing the library. Then pass @code{--enable-libilbc} to configure to enable it. +@section AviSynth +Libav can read AviSynth scripts as input. To enable support you need a +suitable @file{avisynth_c.h} header to compile against. The header in +classic AviSynth's CVS repository is not compatible as it has not been +updated to support AviSynth 2.6. AviSynth 2.5 is not supported by Libav. +Once you have the appropriate header, pass @code{--enable-avisynth} to +configure to enable AviSynth support. + +For Windows, supported AviSynth variants are +@url{http://avisynth.nl, AviSynth 2.6} for 32-bit builds and +@url{http://avs-plus.net, AviSynth+ 0.1} for 32-bit and 64-bit builds. +The necessary @file{avisynth_c.h} header is the variant in the @file{extras/} +directory of the @url{https://www.videolan.org/developers/x264.html, x264} +source tree. For convenience, this header is also available from a +@url{https://github.com/qyot27/avisynth_headers, temporary repository} +along with an installation routine. + +For Linux and OS X, the supported AviSynth variant is +@url{https://github.com/avxsynth/avxsynth, AvxSynth}. +@file{avxsynth_c.h} is installed as part of the normal +build routine, as illustrated on +@url{https://github.com/avxsynth/avxsynth/wiki/System-Setup, AvxSynth's wiki}. +(the instructions for compiling its prerequisites are outdated, as FFMS 2.18 +or higher is now needed; the list of dependencies to be downloaded from the +repositories is still the same, though). + +@float NOTE +AviSynth and AvxSynth are loaded dynamically. Distributors can build Libav +with @code{--enable-avisynth}, and the binaries will work regardless of the +end user having AviSynth or AvxSynth installed - they'll only need to be +installed to use AviSynth scripts (obviously). +@end float @chapter Supported File Formats and Codecs From b920c1d5ad5cfe74c95b0eaec0e69b074ee9b4c1 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 12 Mar 2014 09:30:07 +0000 Subject: [PATCH 083/822] configure: Support older version of openjpeg1 It should work best for debian stable and people not installing the .pc file. (cherry picked from commit aa807425395caa17a85ed2833133278e8bd44a76) --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c6789d5d83..05acff576b 100755 --- a/configure +++ b/configure @@ -3938,7 +3938,8 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader -enabled libopenjpeg && require_pkg_config libopenjpeg1 openjpeg.h opj_version +enabled libopenjpeg && { { check_header openjpeg.h && check_lib2 openjpeg.h opj_version -lopenjpeg; } || + { require_pkg_config libopenjpeg1 openjpeg.h opj_version; } } enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket From c4f5f4dbd303b07697522c68f8da51323fef376d Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Tue, 11 Mar 2014 23:02:16 -0400 Subject: [PATCH 084/822] doc/general.texi: Adjust the notes on AviSynth FFmpeg provides local copies of these headers in compat/avisynth/, and there is no restriction against using 2.5. Signed-off-by: Michael Niedermayer (cherry picked from commit 5336cd6374c7cbba9d6e65de1cec9404efcb665f) Signed-off-by: Michael Niedermayer --- doc/general.texi | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index 28ea12fdbe..98d06c7316 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -164,30 +164,17 @@ you must upgrade FFmpeg's license to GPL in order to use it. @section AviSynth -FFmpeg can read AviSynth scripts as input. To enable support you need a -suitable @file{avisynth_c.h} header to compile against. The header in -classic AviSynth's CVS repository is not compatible as it has not been -updated to support AviSynth 2.6. AviSynth 2.5 is not supported by FFmpeg. -Once you have the appropriate header, pass @code{--enable-avisynth} to -configure to enable AviSynth support. +FFmpeg can read AviSynth scripts as input. To enable support, pass +@code{--enable-avisynth} to configure. The correct headers are +included in compat/avisynth/, which allows the user to enable support +without needing to search for these headers themselves. For Windows, supported AviSynth variants are -@url{http://avisynth.nl, AviSynth 2.6} for 32-bit builds and +@url{http://avisynth.nl, AviSynth 2.5 or 2.6} for 32-bit builds and @url{http://avs-plus.net, AviSynth+ 0.1} for 32-bit and 64-bit builds. -The necessary @file{avisynth_c.h} header is the variant in the @file{extras/} -directory of the @url{https://www.videolan.org/developers/x264.html, x264} -source tree. For convenience, this header is also available from a -@url{https://github.com/qyot27/avisynth_headers, temporary repository} -along with an installation routine. For Linux and OS X, the supported AviSynth variant is @url{https://github.com/avxsynth/avxsynth, AvxSynth}. -@file{avxsynth_c.h} is installed as part of the normal -build routine, as illustrated on -@url{https://github.com/avxsynth/avxsynth/wiki/System-Setup, AvxSynth's wiki}. -(the instructions for compiling its prerequisites are outdated, as FFMS 2.18 -or higher is now needed; the list of dependencies to be downloaded from the -repositories is still the same, though). @float NOTE AviSynth and AvxSynth are loaded dynamically. Distributors can build FFmpeg From bf08665e2ededcb62eaa03d2faf8d39311a8275a Mon Sep 17 00:00:00 2001 From: Matt Oliver Date: Tue, 11 Mar 2014 14:20:44 +1100 Subject: [PATCH 085/822] Fix modplug linkage on Windows. Signed-off-by: Michael Niedermayer (cherry picked from commit 99b48fd448fa83252376d1ac96f17c953f07067c) Signed-off-by: Michael Niedermayer --- libavformat/libmodplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c index 836b7c2ec0..3f00dbf2a4 100644 --- a/libavformat/libmodplug.c +++ b/libavformat/libmodplug.c @@ -22,6 +22,7 @@ * @todo better probing than extensions matching */ +#define MODPLUG_STATIC #include #include "libavutil/avstring.h" #include "libavutil/eval.h" From 3caa6a5a5744e2fafaa51fd6c3cecf4008695c48 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 11 Mar 2014 20:09:07 +0100 Subject: [PATCH 086/822] Revert "Allow stream-copying grayscale mov files." This reverts commit 691dec62011fe9993809fbc793126b40cac0c584. The commit did not fix ticket #3215, it was fixed one commit earlier. The revert may break other use-cases but they should be fixed differently, the offending commit introduced too many problems. Fixes ticket #3377. Fixes ticket #3378. (cherry picked from commit 54bbe3e2a645b4f7b36efac2bca331d3be98592a) Signed-off-by: Michael Niedermayer --- libavcodec/8bps.c | 2 +- libavcodec/msrle.c | 2 +- libavcodec/rawdec.c | 8 ++++---- libavformat/mov.c | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index 1709368c65..d01ef924c7 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -119,7 +119,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, } } - if ((avctx->bits_per_coded_sample & 0x1f) <= 8) { + if (avctx->bits_per_coded_sample <= 8) { const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index ad04ce8984..750e54ae99 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -55,7 +55,7 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx) s->avctx = avctx; - switch (avctx->bits_per_coded_sample & 0x1f) { + switch (avctx->bits_per_coded_sample) { case 1: avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; break; diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 1a63f9e5cc..444cf8ed5d 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -109,7 +109,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) if ( avctx->codec_tag == MKTAG('r','a','w',' ') || avctx->codec_tag == MKTAG('N','O','1','6')) avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_mov, - avctx->bits_per_coded_sample & 0x1f); + avctx->bits_per_coded_sample); else if (avctx->codec_tag == MKTAG('W', 'R', 'A', 'W')) avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); @@ -135,7 +135,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) memset(context->palette->data, 0, AVPALETTE_SIZE); } - if (((avctx->bits_per_coded_sample & 0x1f) == 4 || (avctx->bits_per_coded_sample & 0x1f) == 2) && + if ((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) && avctx->pix_fmt == AV_PIX_FMT_PAL8 && (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))) { context->is_2_4_bpp = 1; @@ -209,14 +209,14 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, int i; uint8_t *dst = frame->buf[0]->data; buf_size = context->frame_size - AVPALETTE_SIZE; - if ((avctx->bits_per_coded_sample & 0x1f) == 4) { + if (avctx->bits_per_coded_sample == 4) { for (i = 0; 2 * i + 1 < buf_size && isize; i++) { dst[2 * i + 0] = buf[i] >> 4; dst[2 * i + 1] = buf[i] & 15; } linesize_align = 8; } else { - av_assert0((avctx->bits_per_coded_sample & 0x1f) == 2); + av_assert0(avctx->bits_per_coded_sample == 2); for (i = 0; 4 * i + 3 < buf_size && isize; i++) { dst[4 * i + 0] = buf[i] >> 6; dst[4 * i + 1] = buf[i] >> 4 & 3; diff --git a/libavformat/mov.c b/libavformat/mov.c index c14e3c15e5..3434d4f100 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1330,6 +1330,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, if (color_greyscale) { int color_index, color_dec; /* compute the greyscale palette */ + st->codec->bits_per_coded_sample = color_depth; color_count = 1 << color_depth; color_index = 255; color_dec = 256 / (color_count - 1); From 46c2dba20e09024a93cf5dabf8ac688a7c944427 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 Mar 2014 03:06:08 +0100 Subject: [PATCH 087/822] doc/texi2pod: fix encoding type docs say: 'A document having more than one "=encoding" line should be considered an error. ' Signed-off-by: Michael Niedermayer (cherry picked from commit 12ce58bebdff6bfae9c56dc785e3003968f93277) Signed-off-by: Michael Niedermayer --- doc/texi2pod.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index f972671937..b825fdc242 100644 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -327,10 +327,11 @@ die "No filename or title\n" unless defined $fn && defined $tl; $chapters{NAME} = "$fn \- $tl\n"; $chapters{FOOTNOTES} .= "=back\n" if exists $chapters{FOOTNOTES}; +# always use utf8 +print "=encoding utf8\n\n"; + unshift @chapters_sequence, "NAME"; for $chapter (@chapters_sequence) { - # always use utf8 - print "=encoding utf8\n"; if (exists $chapters{$chapter}) { $head = uc($chapter); print "=head1 $head\n\n"; From 242df26b44409e0809014562986e88a5746b8918 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Jan 2014 18:57:52 +0100 Subject: [PATCH 088/822] mvformat/movenc: fix IMX fixes Ticket3351 Tested-by: carl Signed-off-by: Michael Niedermayer (cherry picked from commit 72d44f15834af68e2620a7051493359d7ee5b2c3) Signed-off-by: Michael Niedermayer --- libavformat/movenc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b917a59fb5..ce7ca6f35b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -918,11 +918,14 @@ static AVRational find_fps(AVFormatContext *s, AVStream *st) static int mov_get_mpeg2_xdcam_codec_tag(AVFormatContext *s, MOVTrack *track) { - int tag = MKTAG('m', '2', 'v', '1'); //fallback tag + int tag = track->enc->codec_tag; int interlaced = track->enc->field_order > AV_FIELD_PROGRESSIVE; AVStream *st = track->st; int rate = av_q2d(find_fps(s, st)); + if (!tag) + tag = MKTAG('m', '2', 'v', '1'); //fallback tag + if (track->enc->pix_fmt == AV_PIX_FMT_YUV420P) { if (track->enc->width == 1280 && track->enc->height == 720) { if (!interlaced) { From 70e3cc282bee235a9f55fc2bd342fbe6f6c0f7ce Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 Mar 2014 17:32:15 +0100 Subject: [PATCH 089/822] avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use Signed-off-by: Michael Niedermayer (cherry picked from commit 8b02dfd37cb3bc9521fc6e1f5b5f13c80d144cd2) Signed-off-by: Michael Niedermayer --- libavutil/timestamp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h index f63a08c579..f010a7ee38 100644 --- a/libavutil/timestamp.h +++ b/libavutil/timestamp.h @@ -26,6 +26,10 @@ #include "common.h" +#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64) +#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS +#endif + #define AV_TS_MAX_STRING_SIZE 32 /** From 125bea15d1f6248f4eb2131add7fc11e636f9455 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 14 Mar 2014 04:26:24 +0100 Subject: [PATCH 090/822] avcodec/libx265: fill headers in extradata Fixes Ticket3457 Signed-off-by: Michael Niedermayer (cherry picked from commit dded5ed9c5eb0c3d5a953e661ea21a9019e93ea4) Signed-off-by: Michael Niedermayer --- libavcodec/libx265.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 2370601ed7..e03d72f968 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -190,7 +190,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) for (i = 0; i < nnal; i++) ctx->header_size += nal[i].sizeBytes; - ctx->header = av_malloc(ctx->header_size); + ctx->header = av_malloc(ctx->header_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!ctx->header) { av_log(avctx, AV_LOG_ERROR, "Cannot allocate HEVC header of size %d.\n", ctx->header_size); @@ -204,6 +204,13 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) buf += nal[i].sizeBytes; } + if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) { + avctx->extradata_size = ctx->header_size; + avctx->extradata = ctx->header; + ctx->header_size = 0; + ctx->header = NULL; + } + return 0; } From 6ba07e9948d5c9bcb7a0f270f150fbb2f99074e1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Mar 2014 03:08:20 +0100 Subject: [PATCH 091/822] update for 2.2-rc2 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index bd861e1397..749c29f4c7 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2-rc1 +2.2-rc2 diff --git a/VERSION b/VERSION index bd861e1397..749c29f4c7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2-rc1 +2.2-rc2 diff --git a/doc/Doxyfile b/doc/Doxyfile index 40840026c9..d39e0574a6 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2-rc1 +PROJECT_NUMBER = 2.2-rc2 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 00ecce5c8bc00ce6f3f4bb19b681c5e14e259501 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 17:17:25 +0100 Subject: [PATCH 092/822] http: Return meaningful error codes (cherry picked from commit 55a215ba63d9fa79cd7ee265ee2e777ee86b200c) --- libavformat/http.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 96f56f8006..e54e258eb8 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -264,7 +264,7 @@ static int http_getc(HTTPContext *s) if (len < 0) { return len; } else if (len == 0) { - return -1; + return AVERROR_EOF; } else { s->buf_ptr = s->buffer; s->buf_end = s->buffer + len; @@ -327,7 +327,7 @@ static int process_line(URLContext *h, char *line, int line_count, end += strspn(end, SPACE_CHARS); av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", s->http_code, end); - return -1; + return AVERROR(EIO); } } else { while (*p != '\0' && *p != ':') @@ -732,13 +732,13 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) URLContext *old_hd = s->hd; int64_t old_off = s->off; uint8_t old_buf[BUFFER_SIZE]; - int old_buf_size; + int old_buf_size, ret; AVDictionary *options = NULL; if (whence == AVSEEK_SIZE) return s->filesize; else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed) - return -1; + return AVERROR(ENOSYS); /* we save the old context in case the seek fails */ old_buf_size = s->buf_end - s->buf_ptr; @@ -752,14 +752,14 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) /* if it fails, continue on old connection */ av_dict_copy(&options, s->chained_options, 0); - if (http_open_cnx(h, &options) < 0) { + if ((ret = http_open_cnx(h, &options)) < 0) { av_dict_free(&options); memcpy(s->buffer, old_buf, old_buf_size); s->buf_ptr = s->buffer; s->buf_end = s->buffer + old_buf_size; s->hd = old_hd; s->off = old_off; - return -1; + return ret; } av_dict_free(&options); ffurl_close(old_hd); From 738d68de85714608ad1e68fc9eab5dc0bfdda598 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 17:53:51 +0100 Subject: [PATCH 093/822] http: Drop doxy comments (cherry picked from commit 78b21c1d7177e1d61ad3c9225f67699da089aa7c) --- libavformat/http.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index e54e258eb8..ce76f27652 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -49,17 +49,23 @@ typedef struct { unsigned char buffer[BUFFER_SIZE], *buf_ptr, *buf_end; int line_count; int http_code; - int64_t chunksize; /**< Used if "Transfer-Encoding: chunked" otherwise -1. */ + /* Used if "Transfer-Encoding: chunked" otherwise -1. */ + int64_t chunksize; int64_t off, filesize; char *location; HTTPAuthState auth_state; HTTPAuthState proxy_auth_state; char *headers; - int willclose; /**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */ + /* Set if the server correctly handles Connection: close and will close + * the connection after feeding us the content. */ + int willclose; int chunked_post; - int end_chunked_post; /**< A flag which indicates if the end of chunked encoding has been sent. */ - int end_header; /**< A flag which indicates we have finished to read POST reply. */ - int multiple_requests; /**< A flag which indicates if we use persistent connections. */ + /* A flag which indicates if the end of chunked encoding has been sent. */ + int end_chunked_post; + /* A flag which indicates we have finished to read POST reply. */ + int end_header; + /* A flag which indicates if we use persistent connections. */ + int multiple_requests; uint8_t *post_data; int post_datalen; #if CONFIG_ZLIB From f1de93dec302cc860c718e89656f184510b2d239 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 18:02:09 +0100 Subject: [PATCH 094/822] http: K&R formatting cosmetics (cherry picked from commit 7a2fddb4480121712df560cf619c1c3566cae3ff) --- libavformat/http.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ce76f27652..ba0cf574ab 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -327,12 +327,11 @@ static int process_line(URLContext *h, char *line, int line_count, /* error codes are 4xx and 5xx, but regard 401 as a success, so we * don't abort until all headers have been parsed. */ - if (s->http_code >= 400 && s->http_code < 600 && (s->http_code != 401 - || s->auth_state.auth_type != HTTP_AUTH_NONE) && + if (s->http_code >= 400 && s->http_code < 600 && + (s->http_code != 401 || s->auth_state.auth_type != HTTP_AUTH_NONE) && (s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) { end += strspn(end, SPACE_CHARS); - av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", - s->http_code, end); + av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", s->http_code, end); return AVERROR(EIO); } } else { @@ -356,34 +355,37 @@ static int process_line(URLContext *h, char *line, int line_count, av_free(s->location); s->location = new_loc; *new_location = 1; - } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) { + } else if (!av_strcasecmp(tag, "Content-Length") && s->filesize == -1) { s->filesize = strtoll(p, NULL, 10); - } else if (!av_strcasecmp (tag, "Content-Range")) { + } else if (!av_strcasecmp(tag, "Content-Range")) { /* "bytes $from-$to/$document_size" */ const char *slash; - if (!strncmp (p, "bytes ", 6)) { + if (!strncmp(p, "bytes ", 6)) { p += 6; s->off = strtoll(p, NULL, 10); if ((slash = strchr(p, '/')) && strlen(slash) > 0) s->filesize = strtoll(slash+1, NULL, 10); } h->is_streamed = 0; /* we _can_ in fact seek */ - } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) { + } else if (!av_strcasecmp(tag, "Accept-Ranges") && + !strncmp(p, "bytes", 5)) { h->is_streamed = 0; - } else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) { + } else if (!av_strcasecmp(tag, "Transfer-Encoding") && + !av_strncasecmp(p, "chunked", 7)) { s->filesize = -1; s->chunksize = 0; - } else if (!av_strcasecmp (tag, "WWW-Authenticate")) { + } else if (!av_strcasecmp(tag, "WWW-Authenticate")) { ff_http_auth_handle_header(&s->auth_state, tag, p); - } else if (!av_strcasecmp (tag, "Authentication-Info")) { + } else if (!av_strcasecmp(tag, "Authentication-Info")) { ff_http_auth_handle_header(&s->auth_state, tag, p); - } else if (!av_strcasecmp (tag, "Proxy-Authenticate")) { + } else if (!av_strcasecmp(tag, "Proxy-Authenticate")) { ff_http_auth_handle_header(&s->proxy_auth_state, tag, p); - } else if (!av_strcasecmp (tag, "Connection")) { + } else if (!av_strcasecmp(tag, "Connection")) { if (!strcmp(p, "close")) s->willclose = 1; - } else if (!av_strcasecmp (tag, "Content-Encoding")) { - if (!av_strncasecmp(p, "gzip", 4) || !av_strncasecmp(p, "deflate", 7)) { + } else if (!av_strcasecmp(tag, "Content-Encoding")) { + if (!av_strncasecmp(p, "gzip", 4) || + !av_strncasecmp(p, "deflate", 7)) { #if CONFIG_ZLIB s->compressed = 1; inflateEnd(&s->inflate_stream); From 25d14b716aef43bf9e82f1d67a364e5922332f47 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 20:16:50 +0100 Subject: [PATCH 095/822] http: Refactor process_line (cherry picked from commit 4ff99ab3d7d5576e99e6b8a411b4a44500ed88fa) --- libavformat/http.c | 136 ++++++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 51 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ba0cf574ab..161bb6bf49 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -303,11 +303,89 @@ static int http_get_line(HTTPContext *s, char *line, int line_size) } } +static int check_http_code(URLContext *h, int http_code, const char *end) +{ + HTTPContext *s = h->priv_data; + /* error codes are 4xx and 5xx, but regard 401 as a success, so we + * don't abort until all headers have been parsed. */ + if (http_code >= 400 && http_code < 600 && + (http_code != 401 || s->auth_state.auth_type != HTTP_AUTH_NONE) && + (http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) { + end += strspn(end, SPACE_CHARS); + av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", http_code, end); + return AVERROR(EIO); + } + return 0; +} + +static int parse_location(HTTPContext *s, const char *p) +{ + char redirected_location[MAX_URL_SIZE], *new_loc; + ff_make_absolute_url(redirected_location, sizeof(redirected_location), + s->location, p); + new_loc = av_strdup(redirected_location); + if (!new_loc) + return AVERROR(ENOMEM); + av_free(s->location); + s->location = new_loc; + return 0; +} + +/* "bytes $from-$to/$document_size" */ +static void parse_content_range(URLContext *h, char *p) +{ + HTTPContext *s = h->priv_data; + const char *slash; + + if (!strncmp(p, "bytes ", 6)) { + p += 6; + s->off = strtoll(p, NULL, 10); + if ((slash = strchr(p, '/')) && strlen(slash) > 0) + s->filesize = strtoll(slash+1, NULL, 10); + } + h->is_streamed = 0; /* we _can_ in fact seek */ +} + +static int parse_content_encoding(URLContext *h, char *p) +{ + HTTPContext *s = h->priv_data; + + if (!av_strncasecmp(p, "gzip", 4) || + !av_strncasecmp(p, "deflate", 7)) { +#if CONFIG_ZLIB + s->compressed = 1; + inflateEnd(&s->inflate_stream); + if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) { + av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n", + s->inflate_stream.msg); + return AVERROR(ENOSYS); + } + if (zlibCompileFlags() & (1 << 17)) { + av_log(h, AV_LOG_WARNING, + "Your zlib was compiled without gzip support.\n"); + return AVERROR(ENOSYS); + } +#else + av_log(h, AV_LOG_WARNING, + "Compressed (%s) content, need zlib with gzip support\n", p); + return AVERROR(ENOSYS); +#endif + } else if (!av_strncasecmp(p, "identity", 8)) { + // The normal, no-encoding case (although servers shouldn't include + // the header at all if this is the case). + } else { + av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p); + return AVERROR(ENOSYS); + } + return 0; +} + static int process_line(URLContext *h, char *line, int line_count, int *new_location) { HTTPContext *s = h->priv_data; char *tag, *p, *end; + int ret; /* end of header */ if (line[0] == '\0') { @@ -325,15 +403,8 @@ static int process_line(URLContext *h, char *line, int line_count, av_dlog(NULL, "http_code=%d\n", s->http_code); - /* error codes are 4xx and 5xx, but regard 401 as a success, so we - * don't abort until all headers have been parsed. */ - if (s->http_code >= 400 && s->http_code < 600 && - (s->http_code != 401 || s->auth_state.auth_type != HTTP_AUTH_NONE) && - (s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) { - end += strspn(end, SPACE_CHARS); - av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", s->http_code, end); - return AVERROR(EIO); - } + if ((ret = check_http_code(h, s->http_code, end)) < 0) + return ret; } else { while (*p != '\0' && *p != ':') p++; @@ -346,27 +417,13 @@ static int process_line(URLContext *h, char *line, int line_count, while (av_isspace(*p)) p++; if (!av_strcasecmp(tag, "Location")) { - char redirected_location[MAX_URL_SIZE], *new_loc; - ff_make_absolute_url(redirected_location, sizeof(redirected_location), - s->location, p); - new_loc = av_strdup(redirected_location); - if (!new_loc) - return AVERROR(ENOMEM); - av_free(s->location); - s->location = new_loc; + if ((ret = parse_location(s, p)) < 0) + return ret; *new_location = 1; } else if (!av_strcasecmp(tag, "Content-Length") && s->filesize == -1) { s->filesize = strtoll(p, NULL, 10); } else if (!av_strcasecmp(tag, "Content-Range")) { - /* "bytes $from-$to/$document_size" */ - const char *slash; - if (!strncmp(p, "bytes ", 6)) { - p += 6; - s->off = strtoll(p, NULL, 10); - if ((slash = strchr(p, '/')) && strlen(slash) > 0) - s->filesize = strtoll(slash+1, NULL, 10); - } - h->is_streamed = 0; /* we _can_ in fact seek */ + parse_content_range(h, p); } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) { h->is_streamed = 0; @@ -384,31 +441,8 @@ static int process_line(URLContext *h, char *line, int line_count, if (!strcmp(p, "close")) s->willclose = 1; } else if (!av_strcasecmp(tag, "Content-Encoding")) { - if (!av_strncasecmp(p, "gzip", 4) || - !av_strncasecmp(p, "deflate", 7)) { -#if CONFIG_ZLIB - s->compressed = 1; - inflateEnd(&s->inflate_stream); - if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) { - av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n", - s->inflate_stream.msg); - return AVERROR(ENOSYS); - } - if (zlibCompileFlags() & (1 << 17)) { - av_log(h, AV_LOG_WARNING, "Your zlib was compiled without gzip support.\n"); - return AVERROR(ENOSYS); - } -#else - av_log(h, AV_LOG_WARNING, "Compressed (%s) content, need zlib with gzip support\n", p); - return AVERROR(ENOSYS); -#endif - } else if (!av_strncasecmp(p, "identity", 8)) { - // The normal, no-encoding case (although servers shouldn't include - // the header at all if this is the case). - } else { - av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p); - return AVERROR(ENOSYS); - } + if ((ret = parse_content_encoding(h, p)) < 0) + return ret; } } return 1; From e2811c2ede428a20aec3630bef4378f2927fb306 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 10 Mar 2014 21:11:35 +0100 Subject: [PATCH 096/822] http: Add support reading ICY metadata Export the metadata as a icy_metadata_packet avoption. Based on the work of wm4 and Alessandro Ghedini. Bug-Id: https://bugs.debian.org/739936 Signed-off-by: Luca Barbato (cherry picked from commit 8075c3d8bb1f6aade0cc7c5c40db9bc1bcd84cab) --- doc/protocols.texi | 20 +++++++++ libavformat/http.c | 104 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 1a9f5755a0..5d7a1a6d3e 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -89,6 +89,26 @@ m3u8 files. HTTP (Hyper Text Transfer Protocol). +This protocol accepts the following options: + +@table @option +@item icy +If set to 1 request ICY (SHOUTcast) metadata from the server. If the server +supports this, the metadata has to be retrieved by the application by reading +the @option{icy_metadata_headers} and @option{icy_metadata_packet} options. +The default is 0. + +@item icy_metadata_headers +If the server supports ICY metadata, this contains the ICY-specific HTTP reply +headers, separated by newline characters. + +@item icy_metadata_packet +If the server supports ICY metadata, and @option{icy} was set to 1, this +contains the last non-empty metadata packet sent by the server. It should be +polled in regular intervals by applications interested in mid-stream metadata +updates. +@end table + @section mmst MMS (Microsoft Media Server) protocol over TCP. diff --git a/libavformat/http.c b/libavformat/http.c index 161bb6bf49..565cdbd16a 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -68,6 +68,13 @@ typedef struct { int multiple_requests; uint8_t *post_data; int post_datalen; + int icy; + /* how much data was read since the last ICY metadata packet */ + int icy_data_read; + /* after how many bytes of read data a new metadata packet will be found */ + int icy_metaint; + char *icy_metadata_headers; + char *icy_metadata_packet; #if CONFIG_ZLIB int compressed; z_stream inflate_stream; @@ -85,6 +92,9 @@ static const AVOption options[] = { {"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, {"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E }, +{"icy", "request ICY metadata", OFFSET(icy), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D }, +{"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, +{"icy_metadata_packet", "return current ICY metadata packet", OFFSET(icy_metadata_packet), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, {"auth_type", "HTTP authentication type", OFFSET(auth_state.auth_type), AV_OPT_TYPE_INT, {.i64 = HTTP_AUTH_NONE}, HTTP_AUTH_NONE, HTTP_AUTH_BASIC, D|E, "auth_type" }, {"none", "No auth method set, autodetect", 0, AV_OPT_TYPE_CONST, {.i64 = HTTP_AUTH_NONE}, 0, 0, D|E, "auth_type" }, {"basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, {.i64 = HTTP_AUTH_BASIC}, 0, 0, D|E, "auth_type" }, @@ -225,6 +235,7 @@ int ff_http_do_new_request(URLContext *h, const char *uri) int ret; s->off = 0; + s->icy_data_read = 0; av_free(s->location); s->location = av_strdup(uri); if (!s->location) @@ -380,6 +391,23 @@ static int parse_content_encoding(URLContext *h, char *p) return 0; } +// Concat all Icy- header lines +static int parse_icy(HTTPContext *s, const char *tag, const char *p) +{ + int len = 4 + strlen(p) + strlen(tag); + int ret; + + if (s->icy_metadata_headers) + len += strlen(s->icy_metadata_headers); + + if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0) + return ret; + + av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p); + + return 0; +} + static int process_line(URLContext *h, char *line, int line_count, int *new_location) { @@ -440,6 +468,11 @@ static int process_line(URLContext *h, char *line, int line_count, } else if (!av_strcasecmp(tag, "Connection")) { if (!strcmp(p, "close")) s->willclose = 1; + } else if (!av_strcasecmp (tag, "Icy-MetaInt")) { + s->icy_metaint = strtoll(p, NULL, 10); + } else if (!av_strncasecmp(tag, "Icy-", 4)) { + if ((ret = parse_icy(s, tag, p)) < 0) + return ret; } else if (!av_strcasecmp(tag, "Content-Encoding")) { if ((ret = parse_content_encoding(h, p)) < 0) return ret; @@ -552,6 +585,10 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, if (!has_header(s->headers, "\r\nContent-Length: ") && s->post_data) len += av_strlcatf(headers + len, sizeof(headers) - len, "Content-Length: %d\r\n", s->post_datalen); + if (!has_header(s->headers, "\r\nIcy-MetaData: ") && s->icy) { + len += av_strlcatf(headers + len, sizeof(headers) - len, + "Icy-MetaData: %d\r\n", 1); + } /* now add in custom headers */ if (s->headers) @@ -585,6 +622,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, s->buf_end = s->buffer; s->line_count = 0; s->off = 0; + s->icy_data_read = 0; s->filesize = -1; s->willclose = 0; s->end_chunked_post = 0; @@ -662,7 +700,7 @@ static int http_buf_read_compressed(URLContext *h, uint8_t *buf, int size) } #endif -static int http_read(URLContext *h, uint8_t *buf, int size) +static int http_read_stream(URLContext *h, uint8_t *buf, int size) { HTTPContext *s = h->priv_data; int err, new_location; @@ -704,6 +742,70 @@ static int http_read(URLContext *h, uint8_t *buf, int size) return http_buf_read(h, buf, size); } +static int http_read_stream_all(URLContext *h, uint8_t *buf, int size) +{ + int pos = 0; + while (pos < size) { + int len = http_read_stream(h, buf + pos, size - pos); + if (len < 0) + return len; + pos += len; + } + return pos; +} + +static int store_icy(URLContext *h, int size) +{ + HTTPContext *s = h->priv_data; + /* until next metadata packet */ + int remaining = s->icy_metaint - s->icy_data_read; + + if (remaining < 0) + return AVERROR_INVALIDDATA; + + if (!remaining) { + // The metadata packet is variable sized. It has a 1 byte header + // which sets the length of the packet (divided by 16). If it's 0, + // the metadata doesn't change. After the packet, icy_metaint bytes + // of normal data follow. + uint8_t ch; + int len = http_read_stream_all(h, &ch, 1); + if (len < 0) + return len; + if (ch > 0) { + char data[255 * 16 + 1]; + int ret; + len = ch * 16; + ret = http_read_stream_all(h, data, len); + if (ret < 0) + return ret; + data[len + 1] = 0; + if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0) + return ret; + } + s->icy_data_read = 0; + remaining = s->icy_metaint; + } + + return FFMIN(size, remaining); +} + +static int http_read(URLContext *h, uint8_t *buf, int size) +{ + HTTPContext *s = h->priv_data; + + if (s->icy_metaint > 0) { + size = store_icy(h, size); + if (size < 0) + return size; + } + + size = http_read_stream(h, buf, size); + if (size > 0) + s->icy_data_read += size; + return size; +} + /* used only when posting data */ static int http_write(URLContext *h, const uint8_t *buf, int size) { From 40de74d0eb8c1898e2184a1484fe246aed5b295d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 6 Mar 2014 18:39:58 +0100 Subject: [PATCH 097/822] http: Export Content-Type information Bug-Id: https://bugs.debian.org/740421 Signed-off-by: Luca Barbato (cherry picked from commit e58c85b0686892960042232e51c77168b264838a) --- doc/protocols.texi | 3 +++ libavformat/http.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 5d7a1a6d3e..b16234b8fa 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -92,6 +92,9 @@ HTTP (Hyper Text Transfer Protocol). This protocol accepts the following options: @table @option +@item mime_type +Export the MIME type. + @item icy If set to 1 request ICY (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading diff --git a/libavformat/http.c b/libavformat/http.c index 565cdbd16a..fcee847fb0 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -56,6 +56,7 @@ typedef struct { HTTPAuthState auth_state; HTTPAuthState proxy_auth_state; char *headers; + char *mime_type; /* Set if the server correctly handles Connection: close and will close * the connection after feeding us the content. */ int willclose; @@ -92,6 +93,7 @@ static const AVOption options[] = { {"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, {"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E }, +{"mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, {"icy", "request ICY metadata", OFFSET(icy), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D }, {"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, {"icy_metadata_packet", "return current ICY metadata packet", OFFSET(icy_metadata_packet), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, @@ -468,6 +470,9 @@ static int process_line(URLContext *h, char *line, int line_count, } else if (!av_strcasecmp(tag, "Connection")) { if (!strcmp(p, "close")) s->willclose = 1; + } else if (!av_strcasecmp (tag, "Content-Type")) { + av_free(s->mime_type); + s->mime_type = av_strdup(p); } else if (!av_strcasecmp (tag, "Icy-MetaInt")) { s->icy_metaint = strtoll(p, NULL, 10); } else if (!av_strncasecmp(tag, "Icy-", 4)) { From 09dca5106698871920328ae8041d1437ce3cff43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 6 Mar 2014 18:39:59 +0100 Subject: [PATCH 098/822] http: Support setting custom User-Agent Contextually make the default User-Agent use the common "Name/Version" pattern. Signed-off-by: Luca Barbato (cherry picked from commit ddfc98906373d1f17f6205cedd14c68d7a75995f) --- doc/protocols.texi | 4 ++++ libavformat/http.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index b16234b8fa..fa14a8c53d 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -92,6 +92,10 @@ HTTP (Hyper Text Transfer Protocol). This protocol accepts the following options: @table @option +@item user_agent +Override the User-Agent header. If not specified a string of the form +"Lavf/" will be used. + @item mime_type Export the MIME type. diff --git a/libavformat/http.c b/libavformat/http.c index fcee847fb0..a2fd43943e 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -57,6 +57,7 @@ typedef struct { HTTPAuthState proxy_auth_state; char *headers; char *mime_type; + char *user_agent; /* Set if the server correctly handles Connection: close and will close * the connection after feeding us the content. */ int willclose; @@ -88,9 +89,12 @@ typedef struct { #define OFFSET(x) offsetof(HTTPContext, x) #define D AV_OPT_FLAG_DECODING_PARAM #define E AV_OPT_FLAG_ENCODING_PARAM +#define DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION) static const AVOption options[] = { {"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E }, {"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, +{"user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, +{"user-agent", "override User-Agent header, for compatibility with ffmpeg", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, {"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E }, {"mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, @@ -562,8 +566,8 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, /* set default headers if needed */ if (!has_header(s->headers, "\r\nUser-Agent: ")) - len += av_strlcatf(headers + len, sizeof(headers) - len, - "User-Agent: %s\r\n", LIBAVFORMAT_IDENT); + len += av_strlcatf(headers + len, sizeof(headers) - len, + "User-Agent: %s\r\n", s->user_agent); if (!has_header(s->headers, "\r\nAccept: ")) len += av_strlcpy(headers + len, "Accept: */*\r\n", sizeof(headers) - len); From 991e6fa35b4ad2df389ba7e1c2c58d064e295c76 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Thu, 6 Mar 2014 18:40:00 +0100 Subject: [PATCH 099/822] http: Add support for selecting a request range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comment from Reimar Döffinger included as pro memoria. Signed-off-by: Luca Barbato (cherry picked from commit 2ec33d27127251bbc45e1f88e60691ad59cf2319) --- doc/protocols.texi | 6 ++++++ libavformat/http.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index fa14a8c53d..406a431841 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -114,6 +114,12 @@ If the server supports ICY metadata, and @option{icy} was set to 1, this contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. + +@item offset +Set initial byte offset. + +@item end_offset +Try to limit the request to bytes preceding this offset. @end table @section mmst diff --git a/libavformat/http.c b/libavformat/http.c index a2fd43943e..54910a9c31 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -51,7 +51,7 @@ typedef struct { int http_code; /* Used if "Transfer-Encoding: chunked" otherwise -1. */ int64_t chunksize; - int64_t off, filesize; + int64_t off, end_off, filesize; char *location; HTTPAuthState auth_state; HTTPAuthState proxy_auth_state; @@ -106,6 +106,8 @@ static const AVOption options[] = { {"basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, {.i64 = HTTP_AUTH_BASIC}, 0, 0, D|E, "auth_type" }, {"send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, E }, {"location", "The actual location of the data received", OFFSET(location), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, +{"offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D }, +{"end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D }, {NULL} }; #define HTTP_CLASS(flavor)\ @@ -571,9 +573,18 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, if (!has_header(s->headers, "\r\nAccept: ")) len += av_strlcpy(headers + len, "Accept: */*\r\n", sizeof(headers) - len); - if (!has_header(s->headers, "\r\nRange: ") && !post) + // Note: we send this on purpose even when s->off is 0 when we're probing, + // since it allows us to detect more reliably if a (non-conforming) + // server supports seeking by analysing the reply headers. + if (!has_header(s->headers, "\r\nRange: ") && !post) { len += av_strlcatf(headers + len, sizeof(headers) - len, - "Range: bytes=%"PRId64"-\r\n", s->off); + "Range: bytes=%"PRId64"-", s->off); + if (s->end_off) + len += av_strlcatf(headers + len, sizeof(headers) - len, + "%"PRId64, s->end_off - 1); + len += av_strlcpy(headers + len, "\r\n", + sizeof(headers) - len); + } if (send_expect_100 && !has_header(s->headers, "\r\nExpect: ")) len += av_strlcatf(headers + len, sizeof(headers) - len, "Expect: 100-continue\r\n"); From f859fed03d5d039430baea03a0ef35cfd6ac4abd Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Thu, 6 Mar 2014 18:40:01 +0100 Subject: [PATCH 100/822] http: Always allow no-op seek This also allows checking stream position as per ffurl_seek() doxy. Signed-off-by: Luca Barbato (cherry picked from commit ab76d9f628ad46e1d3bbf26c5bf1f87083f239ab) --- libavformat/http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/http.c b/libavformat/http.c index 54910a9c31..2656595ed2 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -901,6 +901,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) if (whence == AVSEEK_SIZE) return s->filesize; + else if ((whence == SEEK_CUR && off == 0) || + (whence == SEEK_SET && off == s->off)) + return s->off; else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed) return AVERROR(ENOSYS); From 82a3e469c6584e6d9e56a3fc38eb001d0650defa Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 15 Mar 2014 09:51:57 -0400 Subject: [PATCH 101/822] http: Improve options descriptions Add documentation where missing. Signed-off-by: Luca Barbato (cherry picked from commit fe568b3d27ca2c5cca3878b2a7a3a968e605aec4) Conflicts: libavformat/http.c --- doc/protocols.texi | 13 +++++++++++++ libavformat/http.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 406a431841..597693af29 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -92,6 +92,19 @@ HTTP (Hyper Text Transfer Protocol). This protocol accepts the following options: @table @option +@item chunked_post +If set to 1 use chunked Transfer-Encoding for posts, default is 1. + +@item headers +Set custom HTTP headers, can override built in default headers. The +value must be a string encoding the headers. + +@item multiple_requests +Use persistent connections if set to 1, default is 0. + +@item post_data +Set custom HTTP post data. + @item user_agent Override the User-Agent header. If not specified a string of the form "Lavf/" will be used. diff --git a/libavformat/http.c b/libavformat/http.c index 2656595ed2..b0085813ac 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -92,11 +92,11 @@ typedef struct { #define DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION) static const AVOption options[] = { {"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E }, -{"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, +{"headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, {"user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, {"user-agent", "override User-Agent header, for compatibility with ffmpeg", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, -{"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E }, +{"post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E }, {"mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, {"icy", "request ICY metadata", OFFSET(icy), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D }, {"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 }, From cd874cf8e69f1b31986fd978577994b45efa3d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 6 Mar 2014 18:40:03 +0100 Subject: [PATCH 102/822] http: Allow setting a Content-Type for POST requests Signed-off-by: Luca Barbato (cherry picked from commit 2572d07c1f0abd9e2bf3ed20dbe35c58f1dd6ac4) --- doc/protocols.texi | 3 +++ libavformat/http.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 597693af29..1501dab60c 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -95,6 +95,9 @@ This protocol accepts the following options: @item chunked_post If set to 1 use chunked Transfer-Encoding for posts, default is 1. +@item content_type +Set a specific content type for the POST messages. + @item headers Set custom HTTP headers, can override built in default headers. The value must be a string encoding the headers. diff --git a/libavformat/http.c b/libavformat/http.c index b0085813ac..7e3af5ae4e 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -58,6 +58,7 @@ typedef struct { char *headers; char *mime_type; char *user_agent; + char *content_type; /* Set if the server correctly handles Connection: close and will close * the connection after feeding us the content. */ int willclose; @@ -93,6 +94,7 @@ typedef struct { static const AVOption options[] = { {"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E }, {"headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, +{"content_type", "set a specific content type for the POST messages", OFFSET(content_type), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, {"user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, {"user-agent", "override User-Agent header, for compatibility with ffmpeg", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D }, {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, @@ -605,6 +607,10 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, if (!has_header(s->headers, "\r\nContent-Length: ") && s->post_data) len += av_strlcatf(headers + len, sizeof(headers) - len, "Content-Length: %d\r\n", s->post_datalen); + + if (!has_header(s->headers, "\r\nContent-Type: ") && s->content_type) + len += av_strlcatf(headers + len, sizeof(headers) - len, + "Content-Type: %s\r\n", s->content_type); if (!has_header(s->headers, "\r\nIcy-MetaData: ") && s->icy) { len += av_strlcatf(headers + len, sizeof(headers) - len, "Icy-MetaData: %d\r\n", 1); From 10379d50be18325a07ef297bd2120d85a58ec78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 12 Mar 2014 09:40:05 +0200 Subject: [PATCH 103/822] http: Declare more parameters as const where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö (cherry picked from commit e77a2ea9505863e50bf013706f66bf8b7325e524) --- libavformat/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 7e3af5ae4e..c553d8ea65 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -353,7 +353,7 @@ static int parse_location(HTTPContext *s, const char *p) } /* "bytes $from-$to/$document_size" */ -static void parse_content_range(URLContext *h, char *p) +static void parse_content_range(URLContext *h, const char *p) { HTTPContext *s = h->priv_data; const char *slash; @@ -367,7 +367,7 @@ static void parse_content_range(URLContext *h, char *p) h->is_streamed = 0; /* we _can_ in fact seek */ } -static int parse_content_encoding(URLContext *h, char *p) +static int parse_content_encoding(URLContext *h, const char *p) { HTTPContext *s = h->priv_data; From b5210f4eae30df587815b5f005f219aa723591d3 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Wed, 12 Mar 2014 16:28:22 +0100 Subject: [PATCH 104/822] http: Properly initialize icy headers string The icy_metadata_headers string never gets initialized, so, during the first call to av_strlcatf() in parse_icy(), strlen() will be called on a pointer to uninitialized memory. At best this causes some garbage data to be left at the start of the string. By initializing icy_metadata_headers to the empty string, the first call to strlen() will always return 0, so that data is appended from the start of the string. Signed-off-by: Luca Barbato (cherry picked from commit 6998a9f4c4e069f515c50614179f4cfc7d0184f5) --- libavformat/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/http.c b/libavformat/http.c index c553d8ea65..0169f5f908 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -405,6 +405,7 @@ static int parse_content_encoding(URLContext *h, const char *p) static int parse_icy(HTTPContext *s, const char *tag, const char *p) { int len = 4 + strlen(p) + strlen(tag); + int is_first = !s->icy_metadata_headers; int ret; if (s->icy_metadata_headers) @@ -413,6 +414,9 @@ static int parse_icy(HTTPContext *s, const char *tag, const char *p) if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0) return ret; + if (is_first) + *s->icy_metadata_headers = '\0'; + av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p); return 0; From facd3dbc6e0788f0e693a83e6ef16918b7eb960b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Mar 2014 20:26:19 +0100 Subject: [PATCH 105/822] http: handle ICY in presence of chunked transfer encoding Some http servers send an ICY stream in combination with chunked transfer encoding. This case was handled incorrectly by the ICY code: instead of handling chunked encoding before anything ICY related, both were mixed. Fix this by separating the ICY code from normal http reading. Move the normal http reading to a new function http_read_stream(), while http_read() handles ICY on top of http_read_stream(). The server identified itself as: cloudflare-nginx Signed-off-by: Michael Niedermayer (cherry picked from commit 636273d3d4a8c42f51832e8bf83e566e875916bf) Signed-off-by: Michael Niedermayer (cherry picked from commit 67f67a3748a038d880ed8a642184d2e3c76e29bb) Signed-off-by: Michael Niedermayer --- libavformat/http.c | 54 +++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 26157677b1..388452ea6c 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -774,7 +774,6 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size) } if (len > 0) { s->off += len; - s->icy_data_read += len; if (s->chunksize > 0) s->chunksize -= len; } @@ -813,7 +812,7 @@ static int http_buf_read_compressed(URLContext *h, uint8_t *buf, int size) } #endif -static int http_read(URLContext *h, uint8_t *buf, int size) +static int http_read_stream(URLContext *h, uint8_t *buf, int size) { HTTPContext *s = h->priv_data; int err, new_location; @@ -848,6 +847,31 @@ static int http_read(URLContext *h, uint8_t *buf, int size) } size = FFMIN(size, s->chunksize); } +#if CONFIG_ZLIB + if (s->compressed) + return http_buf_read_compressed(h, buf, size); +#endif + return http_buf_read(h, buf, size); +} + +// Like http_read_stream(), but no short reads. +// Assumes partial reads are an error. +static int http_read_stream_all(URLContext *h, uint8_t *buf, int size) +{ + int pos = 0; + while (pos < size) { + int len = http_read_stream(h, buf + pos, size - pos); + if (len < 0) + return len; + pos += len; + } + return pos; +} + +static int http_read(URLContext *h, uint8_t *buf, int size) +{ + HTTPContext *s = h->priv_data; + if (s->icy_metaint > 0) { int remaining = s->icy_metaint - s->icy_data_read; /* until next metadata packet */ if (!remaining) { @@ -855,17 +879,18 @@ static int http_read(URLContext *h, uint8_t *buf, int size) // which sets the length of the packet (divided by 16). If it's 0, // the metadata doesn't change. After the packet, icy_metaint bytes // of normal data follow. - int ch = http_getc(s); - if (ch < 0) - return ch; + uint8_t ch; + int len = http_read_stream_all(h, &ch, 1); + if (len < 1) + return len; if (ch > 0) { char data[255 * 16 + 1]; - int n; int ret; - ch *= 16; - for (n = 0; n < ch; n++) - data[n] = http_getc(s); - data[ch + 1] = 0; + len = ch * 16; + ret = http_read_stream_all(h, data, len); + if (ret < len) + return ret; + data[len + 1] = 0; if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0) return ret; } @@ -874,11 +899,10 @@ static int http_read(URLContext *h, uint8_t *buf, int size) } size = FFMIN(size, remaining); } -#if CONFIG_ZLIB - if (s->compressed) - return http_buf_read_compressed(h, buf, size); -#endif - return http_buf_read(h, buf, size); + size = http_read_stream(h, buf, size); + if (size > 0) + s->icy_data_read += size; + return size; } /* used only when posting data */ From 230c4c6ad9f74697e77351d32e679bf0c24478ea Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 10 Mar 2014 23:58:35 +0100 Subject: [PATCH 106/822] armv6: vp8: use explicit labels in motion compensation asm The integrated arm assembler in clang-503.0.38 (Xcode-5.1) seems to get confused by the offset of 4 and decides to use a non-wide thumb encoding. That fails since the labels are out of range of the limited offset a 16-bit thumb encoding offers. --- libavcodec/arm/vp8dsp_armv6.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/arm/vp8dsp_armv6.S b/libavcodec/arm/vp8dsp_armv6.S index 19d454bfb4..03100cdf2f 100644 --- a/libavcodec/arm/vp8dsp_armv6.S +++ b/libavcodec/arm/vp8dsp_armv6.S @@ -1204,7 +1204,7 @@ function ff_put_vp8_\name\size\()_\hv\()_armv6, export=1 mov r4, #\size stm r12, {r4, r5} orr r12, r6, r7 - b vp8_put_\name\()_\hv\()_armv6 + 4 + b bl_put_\name\()_\hv\()_armv6 endfunc .endm @@ -1300,6 +1300,7 @@ vp8_mc_hv bilin, 4, h, v, 2 function vp8_put_epel_h6_armv6 push {r1, r4-r11, lr} +bl_put_epel_h6_armv6: sub r2, r2, #2 movrel lr, sixtap_filters_13245600 - 16 add lr, lr, r12, lsl #3 @@ -1358,6 +1359,7 @@ endfunc function vp8_put_epel_v6_armv6 push {r1, r4-r11, lr} +bl_put_epel_v6_armv6: movrel lr, sixtap_filters_13245600 - 16 add lr, lr, r12, lsl #3 str r3, [sp, #48] @@ -1437,6 +1439,7 @@ endfunc function vp8_put_epel_h4_armv6 push {r1, r4-r11, lr} +bl_put_epel_h4_armv6: subs r2, r2, #1 movrel lr, fourtap_filters_1324 - 4 add lr, lr, r12, lsl #2 @@ -1483,6 +1486,7 @@ endfunc function vp8_put_epel_v4_armv6 push {r1, r4-r11, lr} +bl_put_epel_v4_armv6: movrel lr, fourtap_filters_1324 - 4 add lr, lr, r12, lsl #2 ldm lr, {r5, r6} @@ -1544,6 +1548,7 @@ endfunc function vp8_put_bilin_h_armv6 push {r1, r4-r11, lr} +bl_put_bilin_h_armv6: rsb r5, r12, r12, lsl #16 ldr r12, [sp, #44] sub r3, r3, r4 @@ -1589,6 +1594,7 @@ endfunc function vp8_put_bilin_v_armv6 push {r1, r4-r11, lr} +bl_put_bilin_v_armv6: rsb r5, r12, r12, lsl #16 ldr r12, [sp, #44] add r5, r5, #8 From 0f42e06651c9c4d7581b70b9ad2b160c2525094f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 12 Mar 2014 13:46:04 +0200 Subject: [PATCH 107/822] doc: Point to the correct, actually maintained gas-preprocessor repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö (cherry picked from commit d15c536123a44362ace6299c391a492c90b83fc7) Signed-off-by: Martin Storsjö --- doc/platform.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/platform.texi b/doc/platform.texi index a9cacfe408..45ec2754d9 100644 --- a/doc/platform.texi +++ b/doc/platform.texi @@ -51,8 +51,8 @@ The toolchain provided with Xcode is sufficient to build the basic unacelerated code. OS X on PowerPC or ARM (iPhone) requires a preprocessor from -@url{http://github.com/yuvi/gas-preprocessor} to build the optimized -assembler functions. Just download the Perl script and put it somewhere +@url{git://git.libav.org/gas-preprocessor.git} to build the optimized +assembler functions. Put the Perl script somewhere in your PATH, Libav's configure will pick it up automatically. OS X on AMD64 and x86 requires @command{yasm} to build most of the From d8fe6957796a95f936d7b16db559a164db7e9de4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 17 Mar 2014 02:25:20 +0100 Subject: [PATCH 108/822] avcodec/h264: be more tolerant on what pixel format changes trigger reinits Fixes Ticket3260 Signed-off-by: Michael Niedermayer (cherry picked from commit 8e92ff25469f75f5c1fcbb9ba5721cea341ca34a) --- libavcodec/h264.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9379b2ff4a..ec3601f994 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3444,6 +3444,17 @@ int ff_set_ref_count(H264Context *h) return 0; } +static enum AVPixelFormat non_j_pixfmt(enum AVPixelFormat a) +{ + switch (a) { + case AV_PIX_FMT_YUVJ420P: return AV_PIX_FMT_YUV420P; + case AV_PIX_FMT_YUVJ422P: return AV_PIX_FMT_YUV422P; + case AV_PIX_FMT_YUVJ444P: return AV_PIX_FMT_YUV444P; + default: + return a; + } +} + /** * Decode a slice header. * This will (re)intialize the decoder and call h264_frame_start() as needed. @@ -3573,7 +3584,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) || h->mb_width != h->sps.mb_width || h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) )); - if (h0->avctx->pix_fmt != get_pixel_format(h0, 0)) + if (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0))) must_reinit = 1; h->mb_width = h->sps.mb_width; From 48609236daf85d1974c4a23d22e6eb63d5132c3e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 16 Mar 2014 15:15:02 +0100 Subject: [PATCH 109/822] ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams Fixes Ticket3470 Signed-off-by: Michael Niedermayer (cherry picked from commit 25bcf24d4d0faf0191923be8afac8f67ca98b500) --- ffmpeg_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 7bd0817c29..ba2df02e47 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1821,7 +1821,7 @@ static int open_output_file(OptionsContext *o, const char *filename) /* subtitles: pick first */ MATCH_PER_TYPE_OPT(codec_names, str, subtitle_codec_name, oc, "s"); - if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) { + if (!o->subtitle_disable && (avcodec_find_encoder(oc->oformat->subtitle_codec) || subtitle_codec_name)) { for (i = 0; i < nb_input_streams; i++) if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) { new_subtitle_stream(o, oc, i); From 4aab3f868f35b2df0053f840cdfd8186d726905f Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Sat, 15 Mar 2014 11:16:19 +1100 Subject: [PATCH 110/822] avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary Fixes ticket #3461. Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer (cherry picked from commit d1bb17940dd242e56541775318636bcbe3eab73d) --- libavcodec/adpcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 1005a1b443..b34186a46e 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -917,6 +917,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = c->status[0].predictor + c->status[1].predictor; *samples++ = c->status[0].predictor - c->status[1].predictor; } + + if ((bytestream2_tell(&gb) & 1)) + bytestream2_skip(&gb, 1); break; } case AV_CODEC_ID_ADPCM_IMA_ISS: From dce2f820e952cc22ffb733be1aec7db3f70c8316 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Fri, 14 Mar 2014 20:02:04 +1100 Subject: [PATCH 111/822] avcodec/adpcm: squelch 'mismatch in coded sample count' warning for AV_CODEC_ID_ADPCM_EA_R2/3 These ADPCM codecs include a per-frame flag that enables a raw 16-bit mode. Therefore the the number of samples returned by get_nb_samples() is only ever approximate. Fixes ticket #3460. Signed-off-by: Peter Ross Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 7380201451a2edfb240cd356579c4c39a87cf5bd) --- libavcodec/adpcm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index b34186a46e..f7f82599b0 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -471,9 +471,11 @@ static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_ * @param[out] coded_samples set to the number of samples as coded in the * packet, or 0 if the codec does not encode the * number of samples in each frame. + * @param[out] approx_nb_samples set to non-zero if the number of samples + * returned is an approximation. */ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, - int buf_size, int *coded_samples) + int buf_size, int *coded_samples, int *approx_nb_samples) { ADPCMDecodeContext *s = avctx->priv_data; int nb_samples = 0; @@ -482,6 +484,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, int header_size; *coded_samples = 0; + *approx_nb_samples = 0; if(ch <= 0) return 0; @@ -552,10 +555,12 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, case AV_CODEC_ID_ADPCM_EA_R2: header_size = 4 + 5 * ch; *coded_samples = bytestream2_get_le32(gb); + *approx_nb_samples = 1; break; case AV_CODEC_ID_ADPCM_EA_R3: header_size = 4 + 5 * ch; *coded_samples = bytestream2_get_be32(gb); + *approx_nb_samples = 1; break; } *coded_samples -= *coded_samples % 28; @@ -663,11 +668,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int16_t **samples_p; int st; /* stereo */ int count1, count2; - int nb_samples, coded_samples, ret; + int nb_samples, coded_samples, approx_nb_samples, ret; GetByteContext gb; bytestream2_init(&gb, buf, buf_size); - nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples); + nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples, &approx_nb_samples); if (nb_samples <= 0) { av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n"); return AVERROR_INVALIDDATA; @@ -683,7 +688,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, /* use coded_samples when applicable */ /* it is always <= nb_samples, so the output buffer will be large enough */ if (coded_samples) { - if (coded_samples != nb_samples) + if (!approx_nb_samples && coded_samples != nb_samples) av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n"); frame->nb_samples = nb_samples = coded_samples; } From 90d6b563fe815b7be7fb9ce675927b64d0ba3f34 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Mar 2014 14:47:04 +0100 Subject: [PATCH 112/822] avcodec: Move STRIDE_ALIGN to internal.h The next commit/bugfix will need it Signed-off-by: Michael Niedermayer (cherry picked from commit da89572004f6c0279134d4c8c1c835496a2c4232) --- libavcodec/internal.h | 6 ++++++ libavcodec/utils.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 8aa0ac101c..d300dcdd6d 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -35,6 +35,12 @@ #define FF_SANE_NB_CHANNELS 63U +#if HAVE_NEON || ARCH_PPC || HAVE_MMX +# define STRIDE_ALIGN 16 +#else +# define STRIDE_ALIGN 8 +#endif + typedef struct FramePool { /** * Pools for each data plane. For audio all the planes have the same size, diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 40567f51d3..11b874f764 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -274,12 +274,6 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame, return 0; } -#if HAVE_NEON || ARCH_PPC || HAVE_MMX -# define STRIDE_ALIGN 16 -#else -# define STRIDE_ALIGN 8 -#endif - void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]) { From 7b7d8b879428bd4bcaf1a5e31b731fc86a8b43a3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Mar 2014 14:50:37 +0100 Subject: [PATCH 113/822] avcodec/mpegvideo_enc: dont use direct mode for unaligned input Fixes Ticket3456 Signed-off-by: Michael Niedermayer (cherry picked from commit 06a3185e38614ff22e4586675b85228f07819452) --- libavcodec/mpegvideo_enc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index bb49822ce2..64d73dd6eb 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1039,6 +1039,10 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) direct = 0; if ((s->width & 15) || (s->height & 15)) direct = 0; + if (((intptr_t)(pic_arg->data[0])) & (STRIDE_ALIGN-1)) + direct = 0; + if (s->linesize & (STRIDE_ALIGN-1)) + direct = 0; av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0], pic_arg->linesize[1], s->linesize, s->uvlinesize); From e9c8a9aaa6c8a859e138acc1236014c31089ee2f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 18 Mar 2014 03:19:18 +0100 Subject: [PATCH 114/822] swscale/utils: Fix color range of gray16 Improves rgb -> gray16 conversion Fixes Ticket3422 The pam and png output files look visually similar, in both cases the dynamics increase to 0x0 -> 0xfffb. Signed-off-by: Michael Niedermayer (cherry picked from commit 37c07d45290cf9cdad061cd5c2af94a2783ba847) --- libswscale/utils.c | 2 ++ tests/ref/fate/filter-pixdesc | 4 ++-- tests/ref/fate/filter-pixfmts-copy | 4 ++-- tests/ref/fate/filter-pixfmts-crop | 4 ++-- tests/ref/fate/filter-pixfmts-field | 4 ++-- tests/ref/fate/filter-pixfmts-fieldorder | 4 ++-- tests/ref/fate/filter-pixfmts-hflip | 4 ++-- tests/ref/fate/filter-pixfmts-il | 4 ++-- tests/ref/fate/filter-pixfmts-null | 4 ++-- tests/ref/fate/filter-pixfmts-scale | 4 ++-- tests/ref/fate/filter-pixfmts-vflip | 4 ++-- tests/ref/lavf/pam | 4 ++-- tests/ref/lavf/png | 6 +++--- 13 files changed, 27 insertions(+), 25 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 4e73853ebb..f2e41671a7 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1055,6 +1055,8 @@ static int handle_jpeg(enum AVPixelFormat *format) *format = AV_PIX_FMT_YUV440P; return 1; case AV_PIX_FMT_GRAY8: + case AV_PIX_FMT_GRAY16LE: + case AV_PIX_FMT_GRAY16BE: return 1; default: return 0; diff --git a/tests/ref/fate/filter-pixdesc b/tests/ref/fate/filter-pixdesc index 5c7d203394..e7a5bc102f 100644 --- a/tests/ref/fate/filter-pixdesc +++ b/tests/ref/fate/filter-pixdesc @@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7 gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf gray 2ee2ea2340d0ecf2dfa6f90f87384799 -gray16be 389f4e5a8ab413b3af32767b59ed7f9e -gray16le a1f912941247e45b394b9cf4f0e81130 +gray16be a61507aec1088f5692036e1aabdb4f41 +gray16le 171fbdd46e3737bc865d0185a0006e1c monob 309b5785a36bd988d17e15d88f4ffad1 monow 8809a02bc69b58d1114b09ca79ebffad nv12 75e90c54d858b993e99f4ee6d2a2a38f diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy index 9040007963..ac04857813 100644 --- a/tests/ref/fate/filter-pixfmts-copy +++ b/tests/ref/fate/filter-pixfmts-copy @@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7 gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf gray 2ee2ea2340d0ecf2dfa6f90f87384799 -gray16be 389f4e5a8ab413b3af32767b59ed7f9e -gray16le a1f912941247e45b394b9cf4f0e81130 +gray16be a61507aec1088f5692036e1aabdb4f41 +gray16le 171fbdd46e3737bc865d0185a0006e1c monob 309b5785a36bd988d17e15d88f4ffad1 monow 8809a02bc69b58d1114b09ca79ebffad nv12 75e90c54d858b993e99f4ee6d2a2a38f diff --git a/tests/ref/fate/filter-pixfmts-crop b/tests/ref/fate/filter-pixfmts-crop index 2efc8e9000..91875a5a9b 100644 --- a/tests/ref/fate/filter-pixfmts-crop +++ b/tests/ref/fate/filter-pixfmts-crop @@ -26,8 +26,8 @@ gbrp14le d1465f7280f35aa0a70709e5a7bee1a4 gbrp9be f17b7ba66ba35ed0fcbbb5c32c7e0f56 gbrp9le fc11219debfbe8dd8c3d6f0ef92c4d50 gray 6d34024704f862c75db3ba6989a4a039 -gray16be 02ac848ad4e28c06938599563ba81ff7 -gray16le 672aebfeb8a0f4067b3c6064340056e4 +gray16be 27cfdb4b211cad34f66a664cabd754b4 +gray16le 91cb081d457100a60c2d0f54110f064f nv12 923a313a7013fb0e87608155ef6aa9a4 nv21 21e6b9273bb74203beabeb9edb9cf95c pal8 e1fd50b8a8a67fb5abd8b44abc778bbb diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field index 5d6ff46caf..ea3c954bba 100644 --- a/tests/ref/fate/filter-pixfmts-field +++ b/tests/ref/fate/filter-pixfmts-field @@ -26,8 +26,8 @@ gbrp14le 775b50257b848007c4ef3441ba772db1 gbrp9be c293422f1395bfddc788282eef139ed6 gbrp9le 0d2bb77c25d84611ec6222f3dffe11c0 gray 42a0ad7625a0481183e375e38679d8d3 -gray16be a447af6482b922c9997ac02e5d3535f1 -gray16le c1dd0db327295898ff282d07f48c105d +gray16be e10bc0a8b015fdb0776eca402ffe5eff +gray16le 2eb159fb4af25c3b4f033e6414fef63e monob 1b7fb7e69a913a0a1c0dffc54e5899ea monow b5d3778a054fc73d515d36f8a6bc693b nv12 b3829e9ae2a15349432b7efac4236068 diff --git a/tests/ref/fate/filter-pixfmts-fieldorder b/tests/ref/fate/filter-pixfmts-fieldorder index d5adddc169..33bcd8eb7e 100644 --- a/tests/ref/fate/filter-pixfmts-fieldorder +++ b/tests/ref/fate/filter-pixfmts-fieldorder @@ -26,8 +26,8 @@ gbrp14le 7baa94cd296e6ec8e41446bca95151e4 gbrp9be a6eb7cde03f19a25bf13627d731a2c9a gbrp9le 1b6d228b97a370ec76707ed2dcc15a66 gray 3258910ef8c6f0c4a331368e7af87507 -gray16be 50cc8a29e8e81e174676542347804a4f -gray16le fb93e8aa2deed734dfd1ca6a5c48cf18 +gray16be 9a4c7e731ce572ad86985b56a653b5c3 +gray16le d10df57cf0de14206c8e354e8f6b732b rgb0 5f8f8076e2b9a2422cac25a4f0459d79 rgb24 66ca89ced3ade4c239ad6c5a79a6b8cd rgb444be 7197a09137ab5630a26226396bb7e313 diff --git a/tests/ref/fate/filter-pixfmts-hflip b/tests/ref/fate/filter-pixfmts-hflip index 7fc2bb62ac..f5ee81fc49 100644 --- a/tests/ref/fate/filter-pixfmts-hflip +++ b/tests/ref/fate/filter-pixfmts-hflip @@ -26,8 +26,8 @@ gbrp14le 297e71281660b905711330a86eca8a71 gbrp9be 8268b9a1e9f4d6a42e57db9c81d82fa5 gbrp9le b3a09bba825e16e6d160328706a9f62f gray aaa9c2fe3c2a2a43a4b35226ea689b3c -gray16be d206a080739d89cb7dc0009ad4082ed4 -gray16le 7ebcfd9401ba85e584230de8fc02986d +gray16be 5be35a44f0ba85eb8c55b4f062fdb80f +gray16le d9e73f7c4f53d795192ab87649270241 nv12 719adbc47fa74e92f83150921917483f nv21 9c833b3ce53539d270e1f21e4319797b pal8 19c8735b23feeed18ec2d37913a5f3f8 diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il index 707c6f2a82..cdbfca1bba 100644 --- a/tests/ref/fate/filter-pixfmts-il +++ b/tests/ref/fate/filter-pixfmts-il @@ -26,8 +26,8 @@ gbrp14le 778c97b5ed06b9f1a230840a15771bac gbrp9be b9fc10ab1ddad0e7945d6b047725d078 gbrp9le ef3d6bc8069b95cae31100908a7fa967 gray 2cadbaed81ee12181bda9f4aa87ddbc0 -gray16be cd9c1367dabd2f1858ae4f31693e622f -gray16le 4ef774c282280d7ed4780690df6e5cb4 +gray16be 34cd1af8bbdd4266d5f7985ef22cfc9f +gray16le 0eec98b32e4a2a57d9f51aac9ac3cf8d monob 07cffe7f5f25f39c3aa38866303791c6 monow f2d1bdb939813a49abd6348ecfbb2703 nv12 6847b3f7141ca1e3c40d3a494f0e13cb diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null index 9040007963..ac04857813 100644 --- a/tests/ref/fate/filter-pixfmts-null +++ b/tests/ref/fate/filter-pixfmts-null @@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7 gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf gray 2ee2ea2340d0ecf2dfa6f90f87384799 -gray16be 389f4e5a8ab413b3af32767b59ed7f9e -gray16le a1f912941247e45b394b9cf4f0e81130 +gray16be a61507aec1088f5692036e1aabdb4f41 +gray16le 171fbdd46e3737bc865d0185a0006e1c monob 309b5785a36bd988d17e15d88f4ffad1 monow 8809a02bc69b58d1114b09ca79ebffad nv12 75e90c54d858b993e99f4ee6d2a2a38f diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale index 150d8994d7..c772b242f8 100644 --- a/tests/ref/fate/filter-pixfmts-scale +++ b/tests/ref/fate/filter-pixfmts-scale @@ -26,8 +26,8 @@ gbrp14le eb6cb4555edb175d807fe1b5382d2fc7 gbrp9be 2c9adb80abc16546cac69b4872aaf557 gbrp9le fcfa1684553e3e185179462bca347649 gray c45dcee08887f43dc463f79d7ecd7d68 -gray16be 70064f9acdc5e3935ccda67e765bf2fb -gray16le 578241fb43029e5ae841a3c94d940dce +gray16be 52a6ff8ba7fe11032f370c0888d87fc4 +gray16le e78f07e83698651639743f2f8501c51c monob 91ec2a25b13f6ca34d42da778b217de0 monow a991455fda8f60f373aeb744456996b9 nv12 0617f1e13ae4a43d4cb49282b9c02f71 diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip index b513fde23b..07d2bb765e 100644 --- a/tests/ref/fate/filter-pixfmts-vflip +++ b/tests/ref/fate/filter-pixfmts-vflip @@ -26,8 +26,8 @@ gbrp14le 48b4273ff29b6b68a05a6027254ff75e gbrp9be b4361a1ad66cdff0d32d4af769a8a960 gbrp9le 5bc148ca18ff1bf7095e78a4e65ed8ab gray 800813149a825964025e75cf14ec528b -gray16be 9b23f3e79c54a6ccb62e0135a32e3045 -gray16le 93cfa8fbb2a86ead275ce1817444e6d5 +gray16be 03fdfc40a4fd25252f1b03d9358f00ef +gray16le ebcd797559fef441e5baeff4e7a02472 monob c395a8efb9477b4ec53a77326e41ccd7 monow efaee1c763ccd5ce1a8519d2ed5aa5a9 nv12 77373304a9c732b65dab0a33afba9295 diff --git a/tests/ref/lavf/pam b/tests/ref/lavf/pam index 50048edf10..abb29743d0 100644 --- a/tests/ref/lavf/pam +++ b/tests/ref/lavf/pam @@ -7,8 +7,8 @@ 35cb9e42b2d3181be494f8693af1ddea *./tests/data/images/pam/02.pam ./tests/data/images/pam/%02d.pam CRC=0x0ff205be 101445 ./tests/data/images/pam/02.pam -ebd43e97839b2538a79f35757e84ffb0 *./tests/data/images/pam/02.pam -./tests/data/images/pam/%02d.pam CRC=0x831a2963 +740eb42157af9e9eed46b70ba6a6cf4d *./tests/data/images/pam/02.pam +./tests/data/images/pam/%02d.pam CRC=0x893f10ef 202823 ./tests/data/images/pam/02.pam 032538f0313b4f240b44a5bef115f5bf *./tests/data/images/pam/02.pam ./tests/data/images/pam/%02d.pam CRC=0x5984c023 diff --git a/tests/ref/lavf/png b/tests/ref/lavf/png index 40e7cca014..9cf677b21b 100644 --- a/tests/ref/lavf/png +++ b/tests/ref/lavf/png @@ -1,9 +1,9 @@ 2af72da4468e61a37c220b25cb28618a *./tests/data/images/png/02.png ./tests/data/images/png/%02d.png CRC=0x6da01946 248633 ./tests/data/images/png/02.png -62b26c9582ba37dd37b76191338f3770 *./tests/data/images/png/02.png -./tests/data/images/png/%02d.png CRC=0x831a2963 -41687 ./tests/data/images/png/02.png +6cf54c13aa407b77547cf6dfe23ecba3 *./tests/data/images/png/02.png +./tests/data/images/png/%02d.png CRC=0x893f10ef +47365 ./tests/data/images/png/02.png b4e38244c97debe3f528e7d1adb283ef *./tests/data/images/png/02.png ./tests/data/images/png/%02d.png CRC=0x5984c023 511900 ./tests/data/images/png/02.png From 207f5a138af3c421867f25c1e5ffe29bb1fbc253 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 19 Mar 2014 09:14:53 +0100 Subject: [PATCH 115/822] Add APIchanges entry and bump libswscale micro version for making gray16 full-scale. --- doc/APIchanges | 3 +++ libswscale/version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index e52b4489d3..8a3778838c 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2012-10-22 API changes, most recent first: +2014-03-18 - e9c8a9a - lsws 2.5.102 + Make gray16 full-scale. + 2014-xx-xx - xxxxxxx - lavu 53.05.0 - frame.h Add av_frame_copy() for copying the frame data. diff --git a/libswscale/version.h b/libswscale/version.h index 99f329539b..6f82d3d059 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -28,7 +28,7 @@ #define LIBSWSCALE_VERSION_MAJOR 2 #define LIBSWSCALE_VERSION_MINOR 5 -#define LIBSWSCALE_VERSION_MICRO 101 +#define LIBSWSCALE_VERSION_MICRO 102 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ LIBSWSCALE_VERSION_MINOR, \ From daaef403d122b35d87b27d6b369d287b1ed06973 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:44 +0000 Subject: [PATCH 116/822] matroskaenc: write private data in hvcC format for HEVC. (cherry picked from commit a823d0948683bd97dd58556b5740e434166209a8) --- libavformat/Makefile | 2 +- libavformat/matroskaenc.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index a3cd5047f0..5694314af2 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -168,7 +168,7 @@ OBJS-$(CONFIG_M4V_MUXER) += rawenc.o OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o \ isom.o rmsipr.o OBJS-$(CONFIG_MATROSKA_MUXER) += matroskaenc.o matroska.o \ - isom.o avc.o \ + isom.o avc.o hevc.o \ flacenc_header.o avlanguage.o wv.o OBJS-$(CONFIG_MD5_MUXER) += md5enc.o OBJS-$(CONFIG_MJPEG_DEMUXER) += rawdec.o diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 3ab3139a29..3cb7eef25b 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -22,6 +22,7 @@ #include #include "avc.h" +#include "hevc.h" #include "avformat.h" #include "avlanguage.h" #include "flacenc.h" @@ -500,6 +501,8 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo ret = put_wv_codecpriv(dyn_cp, codec); else if (codec->codec_id == AV_CODEC_ID_H264) ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size); + else if (codec->codec_id == AV_CODEC_ID_HEVC) + ret = ff_isom_write_hvcc(dyn_cp, codec->extradata, codec->extradata_size, 0); else if (codec->codec_id == AV_CODEC_ID_ALAC) { if (codec->extradata_size < 36) { av_log(s, AV_LOG_ERROR, From 9a6a7109985cbd3a20707b40cc31ed53a174195c Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Mon, 3 Mar 2014 14:53:45 +0000 Subject: [PATCH 117/822] matroskaenc: enable Annex B to MP4 conversion for HEVC tracks. (cherry picked from commit 558b20d729bc296d8e6a69f03cd509ad26a4827d) --- libavformat/matroskaenc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 3cb7eef25b..fad1ec41cc 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1167,6 +1167,10 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, if (codec->codec_id == AV_CODEC_ID_H264 && codec->extradata_size > 0 && (AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1)) ff_avc_parse_nal_units_buf(pkt->data, &data, &size); + else if (codec->codec_id == AV_CODEC_ID_HEVC && codec->extradata_size > 6 && + (AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1)) + /* extradata is Annex B, assume the bitstream is too and convert it */ + ff_hevc_annexb2mp4_buf(pkt->data, &data, &size, 0, NULL); else if (codec->codec_id == AV_CODEC_ID_WAVPACK) { int ret = mkv_strip_wavpack(pkt->data, &data, &size); if (ret < 0) { From 29d61d73b1cbf0dcd1f79bc49c7df01b0a377c85 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 18 Mar 2014 13:11:00 +0000 Subject: [PATCH 118/822] movenc: Allow override of major brand in ftyp atom Signed-off-by: Tim Walker (cherry picked from commit 1e9db41e2a2166be5671b088ef4ad06a40af459f) --- libavformat/movenc.c | 5 ++++- libavformat/movenc.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2ae3475c17..0c688f6223 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -64,6 +64,7 @@ static const AVOption options[] = { { "min_frag_duration", "Minimum fragment duration", offsetof(MOVMuxContext, min_fragment_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, + { "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; @@ -2564,7 +2565,9 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) avio_wb32(pb, 0); /* size */ ffio_wfourcc(pb, "ftyp"); - if (mov->mode == MODE_3GP) { + if (mov->major_brand && strlen(mov->major_brand) >= 4) + ffio_wfourcc(pb, mov->major_brand); + else if (mov->mode == MODE_3GP) { ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4"); minor = has_h264 ? 0x100 : 0x200; } else if (mov->mode & MODE_3G2) { diff --git a/libavformat/movenc.h b/libavformat/movenc.h index 1b669e8613..226a28f165 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -159,6 +159,8 @@ typedef struct MOVMuxContext { AVIOContext *mdat_buf; int64_t reserved_moov_pos; + + char *major_brand; } MOVMuxContext; #define FF_MOV_FLAG_RTP_HINT 1 From 26bbc1c242ebfeec3c49585207efac7293632433 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 23 Mar 2014 11:38:38 -0400 Subject: [PATCH 119/822] Prepare for 10 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index f6f1ff6eaa..f599e28b8a 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10_beta2 +10 From 80239a8bb11f730d95f03dfbd0deab258b413b0e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 4 Mar 2014 07:19:46 +0100 Subject: [PATCH 120/822] af_channelmap: fix ONE_STR mapping mode get_channel() returns 0 on success CC:libav-stable@libav.org (cherry picked from commit e843612695007cc623813073754c651ab43021f7) --- libavfilter/af_channelmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 71d51e7594..3e5cc3d7e4 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -188,7 +188,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx) s->map[i].out_channel_idx = i; break; case MAP_ONE_STR: - if (!get_channel(&mapping, &in_ch, separator)) { + if (get_channel(&mapping, &in_ch, separator) < 0) { av_log(ctx, AV_LOG_ERROR, err); return AVERROR(EINVAL); } From f25e6e0c255a6d81971fe66f6c32d29be0706f3d Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Sun, 23 Mar 2014 17:28:34 +0100 Subject: [PATCH 121/822] RELEASE_NOTES: mention new filters --- doc/RELEASE_NOTES | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/RELEASE_NOTES b/doc/RELEASE_NOTES index b258e30abf..478bc1d20e 100644 --- a/doc/RELEASE_NOTES +++ b/doc/RELEASE_NOTES @@ -30,9 +30,12 @@ new features and countless bug fixes. We can highlight a native VP9 decoder, with encoding provided through libvpx, native decoders for WebP, JPEG 2000, and AIC, as well as improved WavPack support with encoding through libwavpack, support for more AAC flavors (LD - low delay, ELD - enhanced low delay), slice -multithreading in libavfilter, or muxing chapters in ASF. Furthermore there is -more fine-grained detection of host and target libc, which should allow better -portability to various cross compilation scenarios. +multithreading in libavfilter, or muxing chapters in ASF. Furthermore a few new +filters have been introduced, namely compand, to change audio dynamics, framepack, +to create stereoscopic videos, asetpts, to set audio pts, and interlace, to convert +progressive video to interlaced. Finally there is more fine-grained detection of +host and target libc, which should allow better portability to various cross +compilation scenarios. See the Changelog file for a fuller list of significant changes. From 13682b48e95c91cbcd80bc45880e09eca1ebdee2 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 23 Mar 2014 13:24:07 +0100 Subject: [PATCH 122/822] Autodetect VDA like all other hardware acccelerations. Signed-off-by: Michael Niedermayer (cherry picked from commit 942cded690bc6dc931c60078f39cf0f339a89058) Conflicts: configure --- Changelog | 1 + configure | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index fe2f052bed..ef8696fb4f 100644 --- a/Changelog +++ b/Changelog @@ -28,6 +28,7 @@ version 2.2: - Support DNx444 - libx265 encoder - dejudder filter +- Autodetect VDA like all other hardware accelerations version 2.1: diff --git a/configure b/configure index 39daa52ee5..e2674ac626 100755 --- a/configure +++ b/configure @@ -149,7 +149,7 @@ Component options: Hardware accelerators: --disable-dxva2 disable DXVA2 code [autodetect] --disable-vaapi disable VAAPI code [autodetect] - --enable-vda enable VDA code + --disable-vda disable VDA code [autodetect] --disable-vdpau disable VDPAU code [autodetect] Individual component options: @@ -2504,7 +2504,7 @@ enable static enable swscale_alpha # Enable hwaccels by default. -enable dxva2 vaapi vdpau xvmc +enable dxva2 vaapi vda vdpau xvmc # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' From d461e077a51c286264ed34b1a550c99311f30e8d Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 23 Mar 2014 17:57:32 +0100 Subject: [PATCH 123/822] Always pass the configure option sysroot to --sysroot and -isysroot. On darwin, --sysroot may be ignored. (cherry picked from commit cc6d549adbb838ef87b1f251ca469dc4c3dd39aa) --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index e2674ac626..e123eb333b 100755 --- a/configure +++ b/configure @@ -3324,6 +3324,9 @@ if test -n "$sysroot"; then gcc|llvm_gcc|clang) add_cppflags --sysroot="$sysroot" add_ldflags --sysroot="$sysroot" +# On Darwin --sysroot may be ignored, -isysroot always affects headers and linking + add_cppflags -isysroot "$sysroot" + add_ldflags -isysroot "$sysroot" ;; tms470) add_cppflags -I"$sysinclude" From dcf560204c5abe7ee2a98566e98ecd6a3e1ebbc8 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Thu, 20 Feb 2014 20:52:06 +0100 Subject: [PATCH 124/822] lavc/pthread: copy packet side data. (cherry picked from commit ea6825fd090ef3f8edbce506d2fbf6e187f585fa) Signed-off-by: Michael Niedermayer --- libavcodec/pthread_frame.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index d7479d2142..4e385e7136 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -317,6 +317,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt) FrameThreadContext *fctx = p->parent; PerThreadContext *prev_thread = fctx->prev_thread; const AVCodec *codec = p->avctx->codec; + int ret; if (!avpkt->size && !(codec->capabilities & CODEC_CAP_DELAY)) return 0; @@ -340,6 +341,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt) } } + av_packet_free_side_data(&p->avpkt); av_buffer_unref(&p->avpkt.buf); p->avpkt = *avpkt; if (avpkt->buf) @@ -354,6 +356,8 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt) memcpy(p->buf, avpkt->data, avpkt->size); memset(p->buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); } + if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0) + return ret; p->state = STATE_SETTING_UP; pthread_cond_signal(&p->input_cond); @@ -592,6 +596,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count) pthread_cond_destroy(&p->input_cond); pthread_cond_destroy(&p->progress_cond); pthread_cond_destroy(&p->output_cond); + av_packet_free_side_data(&p->avpkt); av_buffer_unref(&p->avpkt.buf); av_freep(&p->buf); av_freep(&p->released_buffers); From 99905118a851cd18e36fac0b84cda34ca71183b2 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Mon, 25 Nov 2013 17:26:07 +0100 Subject: [PATCH 125/822] lavd/xv: take aspect ratio into account. (cherry picked from commit c37bbe54f400edc8cb0070138328048943e90b1a) Signed-off-by: Michael Niedermayer --- libavdevice/xv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/xv.c b/libavdevice/xv.c index 89d6575f6c..fbb941579e 100644 --- a/libavdevice/xv.c +++ b/libavdevice/xv.c @@ -130,8 +130,15 @@ static int xv_write_header(AVFormatContext *s) xv->image_width = encctx->width; xv->image_height = encctx->height; if (!xv->window_width && !xv->window_height) { + AVRational sar = encctx->sample_aspect_ratio; xv->window_width = encctx->width; xv->window_height = encctx->height; + if (sar.num) { + if (sar.num > sar.den) + xv->window_width = av_rescale(xv->window_width, sar.num, sar.den); + if (sar.num < sar.den) + xv->window_height = av_rescale(xv->window_height, sar.den, sar.num); + } } xv->window = XCreateSimpleWindow(xv->display, DefaultRootWindow(xv->display), xv->window_x, xv->window_y, From 57a43142baeda0d38f085555121a86c906cf11ef Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 18 Mar 2014 00:07:53 +0100 Subject: [PATCH 126/822] avcodec/utils: fix sizeof(AVFrame) dependence in avcodec_encode_audio2() This is a bit tricky, we allocate a correctly sized AVFrame but then only copy the compile time AVFrame size, this is to ensure that user applications which do not use the correct av frame API dont end with out of array reads. Note, applications using the correct API have set extended_data and the changed code will never be executed for them. Signed-off-by: Michael Niedermayer (cherry picked from commit 8ab80707841a73ca7708e1e1aa97f3513fff3d35) Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 11b874f764..cd04ca2aaf 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1615,7 +1615,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, const AVFrame *frame, int *got_packet_ptr) { - AVFrame tmp; + AVFrame *extended_frame = NULL; AVFrame *padded_frame = NULL; int ret; AVPacket user_pkt = *avpkt; @@ -1640,9 +1640,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, } av_log(avctx, AV_LOG_WARNING, "extended_data is not set.\n"); - tmp = *frame; - tmp.extended_data = tmp.data; - frame = &tmp; + extended_frame = av_frame_alloc(); + if (!extended_frame) + return AVERROR(ENOMEM); + + memcpy(extended_frame, frame, sizeof(AVFrame)); + extended_frame->extended_data = extended_frame->data; + frame = extended_frame; } /* check for valid frame size */ @@ -1650,14 +1654,15 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) { if (frame->nb_samples > avctx->frame_size) { av_log(avctx, AV_LOG_ERROR, "more samples than frame size (avcodec_encode_audio2)\n"); - return AVERROR(EINVAL); + ret = AVERROR(EINVAL); + goto end; } } else if (!(avctx->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) { if (frame->nb_samples < avctx->frame_size && !avctx->internal->last_audio_frame) { ret = pad_last_frame(avctx, &padded_frame, frame); if (ret < 0) - return ret; + goto end; frame = padded_frame; avctx->internal->last_audio_frame = 1; @@ -1729,6 +1734,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, end: av_frame_free(&padded_frame); + av_free(extended_frame); return ret; } From c00beff5e0754706cdeec25084f4893a8bc39a5b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 19 Mar 2014 17:57:02 +0100 Subject: [PATCH 127/822] avcodec/mjpegdec: factorize parse_avid out Signed-off-by: Michael Niedermayer (cherry picked from commit 1083c479eb6e5bcd5220fdd165cf9312f29a0985) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index ac94345613..a3e258b24a 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -83,6 +83,13 @@ static void build_basic_mjpeg_vlc(MJpegDecodeContext *s) avpriv_mjpeg_val_ac_chrominance, 251, 0, 0); } +static void parse_avid(MJpegDecodeContext *s, uint8_t *buf, int len) +{ + s->buggy_avid = 1; + if (len > 14 && buf[12] == 1) /* 1 - NTSC */ + s->interlace_polarity = 1; +} + av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; @@ -1694,9 +1701,7 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) /* buggy avid, it puts EOI only at every 10th frame */ if (!strncmp(cbuf, "AVID", 4)) { - s->buggy_avid = 1; - if (len > 14 && cbuf[12] == 1) /* 1 - NTSC, 2 - PAL */ - s->interlace_polarity = 1; + parse_avid(s, cbuf, len); } else if (!strcmp(cbuf, "CS=ITU601")) s->cs_itu601 = 1; else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) || From af3d003658e5c9e3e154b29cbf9760c32e7ac6ed Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 19 Mar 2014 17:57:59 +0100 Subject: [PATCH 128/822] avcodec/mjpegdec: switch interlaced_polarity to 0 for PAL AVID 0 should have been the default, this change should make no difference but this is needed for the following bugfix Signed-off-by: Michael Niedermayer (cherry picked from commit 98f9aa389b2de69118cd599235b2208b3c311c4c) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index a3e258b24a..bcd72e2ffb 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -88,6 +88,8 @@ static void parse_avid(MJpegDecodeContext *s, uint8_t *buf, int len) s->buggy_avid = 1; if (len > 14 && buf[12] == 1) /* 1 - NTSC */ s->interlace_polarity = 1; + if (len > 14 && buf[12] == 2) /* 2 - PAL */ + s->interlace_polarity = 0; } av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) From 7bdd348e583230c440309e84cf1e86b37dff8955 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 19 Mar 2014 17:59:02 +0100 Subject: [PATCH 129/822] avcodec/mjpeg: print info from parse_avid() if requested Signed-off-by: Michael Niedermayer (cherry picked from commit 046a75eea091e7d079bd3e5c9f5f028d7b920c32) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index bcd72e2ffb..4394854234 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -90,6 +90,8 @@ static void parse_avid(MJpegDecodeContext *s, uint8_t *buf, int len) s->interlace_polarity = 1; if (len > 14 && buf[12] == 2) /* 2 - PAL */ s->interlace_polarity = 0; + if (s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_INFO, "AVID: len:%d %d\n", len, len > 14 ? buf[12] : -1); } av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) From 90c7bfb9be432075fac32a23f5e0af48da35608a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 19 Mar 2014 17:59:42 +0100 Subject: [PATCH 130/822] avcodec/mjpegdec: parse avid data from extradata Makes no difference for any file tested but is needed for following bug-fix Signed-off-by: Michael Niedermayer (cherry picked from commit 493296800c4cfd76561f71ded5f0893108063e67) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 4394854234..23075943f2 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -132,6 +132,13 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) s->interlace_polarity = 1; /* bottom field first */ av_log(avctx, AV_LOG_DEBUG, "bottom field first\n"); } + + if ( avctx->extradata_size > 8 + && AV_RL32(avctx->extradata) == 0x2C + && AV_RL32(avctx->extradata+4) == 0x18) { + parse_avid(s, avctx->extradata, avctx->extradata_size); + } + if (avctx->codec->id == AV_CODEC_ID_AMV) s->flipped = 1; From b052525f9b347d662b745da98893f00acef1204e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 19 Mar 2014 18:01:04 +0100 Subject: [PATCH 131/822] avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1 Fixes Ticket3229 Signed-off-by: Michael Niedermayer (cherry picked from commit dde16f5aaed327e15049b40a8dfae1f59647e4ec) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 23075943f2..cb8f2b9660 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -131,6 +131,9 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */ s->interlace_polarity = 1; /* bottom field first */ av_log(avctx, AV_LOG_DEBUG, "bottom field first\n"); + } else if (avctx->field_order == AV_FIELD_UNKNOWN) { + if (avctx->codec_tag == AV_RL32("MJPG")) + s->interlace_polarity = 1; } if ( avctx->extradata_size > 8 From 7c6a8afa7ea7fac599f81eb3c490e71e03944378 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2014 15:45:03 +0100 Subject: [PATCH 132/822] ffmpeg: dont call exit_program() from a signal hander This is unsafe and can deadlock amongth other things Signed-off-by: Michael Niedermayer (cherry picked from commit 9dca02ee541120de2a96c387faed9a4e033a60fd) Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 332a2338cd..1d3cfd4c03 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -323,7 +323,7 @@ sigterm_handler(int sig) received_nb_signals++; term_exit(); if(received_nb_signals > 3) - exit_program(123); + exit(123); } void term_init(void) From 25b462cab9493e7a50a5fe0602895a3a9554f5a8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2014 18:12:58 +0100 Subject: [PATCH 133/822] avcodec/mpegvideo: make mc_mb_var_sum_temp / mb_var_sum_temp 64bit This avoids a hypothetical integer overflow with very high resolution video Signed-off-by: Michael Niedermayer (cherry picked from commit c3272674c943474ec6bfcd75e0d9b4b4ca95ff32) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 8f7de9e90c..14a443985b 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -251,8 +251,8 @@ typedef struct MotionEstContext{ int stride; int uvstride; /* temp variables for picture complexity calculation */ - int mc_mb_var_sum_temp; - int mb_var_sum_temp; + int64_t mc_mb_var_sum_temp; + int64_t mb_var_sum_temp; int scene_change_score; /* cmp, chroma_cmp;*/ op_pixels_func (*hpel_put)[4]; From dca463b728c1d2c228b7b911dac812300bd0258b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2014 18:24:56 +0100 Subject: [PATCH 134/822] avcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit This avoids a hypothetical integer overflow with very high resolution video Signed-off-by: Michael Niedermayer (cherry picked from commit e92a78a4095d69d876bef189225608a35166dc4a) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.h | 4 ++-- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/ratecontrol.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 14a443985b..92aac6d18a 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -195,8 +195,8 @@ typedef struct Picture{ int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF int field_picture; ///< whether or not the picture was encoded in separate fields - int mb_var_sum; ///< sum of MB variance for current frame - int mc_mb_var_sum; ///< motion compensated MB variance for current frame + int64_t mb_var_sum; ///< sum of MB variance for current frame + int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame int b_frame_score; int needs_realloc; ///< Picture needs to be reallocated (eg due to a frame size change) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 64d73dd6eb..eaa80e2a1d 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3443,7 +3443,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA; if(s->msmpeg4_version >= 3) s->no_rounding=1; - av_dlog(s, "Scene change detected, encoding as I Frame %d %d\n", + av_dlog(s, "Scene change detected, encoding as I Frame %"PRId64" %"PRId64"\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); } diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 7db248ecf5..31eae5ba89 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -46,7 +46,7 @@ void ff_write_pass1_stats(MpegEncContext *s) { snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d " - "fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", + "fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d skipcount:%d hbits:%d;\n", s->current_picture_ptr->f.display_picture_number, s->current_picture_ptr->f.coded_picture_number, s->pict_type, @@ -879,7 +879,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) if (s->avctx->debug & FF_DEBUG_RC) { av_log(s->avctx, AV_LOG_DEBUG, "%c qp:%d<%2.1f<%d %d want:%d total:%d comp:%f st_q:%2.2f " - "size:%d var:%d/%d br:%d fps:%d\n", + "size:%d var:%"PRId64"/%"PRId64" br:%d fps:%d\n", av_get_picture_type_char(pict_type), qmin, q, qmax, picture_number, (int)wanted_bits / 1000, (int)s->total_bits / 1000, From 30ae080e9dec37269828bcab24937cf3ccc80078 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2014 18:25:36 +0100 Subject: [PATCH 135/822] avcodec/ratecontrol: make (mc_)mb_var_sum(_last) 64bit This avoids hypothetical integer overflows (cherry picked from commit b4356c9cc28197bb8da626ece08d4a062b62afc8) Signed-off-by: Michael Niedermayer --- libavcodec/ratecontrol.c | 11 ++++++----- libavcodec/ratecontrol.h | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 31eae5ba89..3e8ceb5984 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -206,7 +206,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s) assert(picture_number < rcc->num_entries); rce = &rcc->entry[picture_number]; - e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d", + e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%"SCNd64" var:%"SCNd64" icount:%d skipcount:%d hbits:%d", &rce->pict_type, &rce->qscale, &rce->i_tex_bits, &rce->p_tex_bits, &rce->mv_bits, &rce->misc_bits, &rce->f_code, &rce->b_code, @@ -753,7 +753,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) RateControlEntry local_rce, *rce; double bits; double rate_factor; - int var; + int64_t var; const int pict_type = s->pict_type; Picture * const pic = &s->current_picture; emms_c(); @@ -769,8 +769,9 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) fps = get_fps(s->avctx); /* update predictors */ if (picture_number > 2 && !dry_run) { - const int last_var = s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum - : rcc->last_mc_mb_var_sum; + const int64_t last_var = + s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum + : rcc->last_mc_mb_var_sum; av_assert1(s->frame_bits >= s->stuffing_bits); update_predictor(&rcc->pred[s->last_pict_type], rcc->last_qscale, @@ -817,7 +818,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) assert(pict_type == rce->new_pict_type); q = rce->new_qscale / br_compensation; - av_dlog(s, "%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale, + av_dlog(s, "%f %f %f last:%d var:%"PRId64" type:%d//\n", q, rce->new_qscale, br_compensation, s->frame_bits, var, pict_type); } else { rce->pict_type = diff --git a/libavcodec/ratecontrol.h b/libavcodec/ratecontrol.h index 959b6a2353..eeb4bb96c0 100644 --- a/libavcodec/ratecontrol.h +++ b/libavcodec/ratecontrol.h @@ -49,8 +49,8 @@ typedef struct RateControlEntry{ uint64_t expected_bits; int new_pict_type; float new_qscale; - int mc_mb_var_sum; - int mb_var_sum; + int64_t mc_mb_var_sum; + int64_t mb_var_sum; int i_count; int skip_count; int f_code; @@ -71,8 +71,8 @@ typedef struct RateControlContext{ double pass1_wanted_bits; ///< bits which should have been outputed by the pass1 code (including complexity init) double last_qscale; double last_qscale_for[5]; ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff - int last_mc_mb_var_sum; - int last_mb_var_sum; + int64_t last_mc_mb_var_sum; + int64_t last_mb_var_sum; uint64_t i_cplx_sum[5]; uint64_t p_cplx_sum[5]; uint64_t mv_bits_sum[5]; From 72a12f61ef66b9d401a9acbff62c9791f21ac045 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2014 18:29:16 +0100 Subject: [PATCH 136/822] avcodec/snowenc: allow larger mb variances Fixes assertion failure Fixes Ticket3463 Signed-off-by: Michael Niedermayer (cherry picked from commit 2fd14f062cfc52db1529a46b53a26b06cb418f55) Signed-off-by: Michael Niedermayer --- libavcodec/snowenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 517728586a..ed331de346 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1502,8 +1502,8 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict) } /* ugly, ratecontrol just takes a sqrt again */ - coef_sum = (uint64_t)coef_sum * coef_sum >> 16; av_assert0(coef_sum < INT_MAX); + coef_sum = (uint64_t)coef_sum * coef_sum >> 16; if(pict->pict_type == AV_PICTURE_TYPE_I){ s->m.current_picture.mb_var_sum= coef_sum; From e39a992bd155455aebe07353c34a3e29b3b79f70 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 22 Mar 2014 01:26:48 +0100 Subject: [PATCH 137/822] avformat/mp3enc: use av_copy_packet() Fixes double free Fixes Ticket3476 Signed-off-by: Michael Niedermayer (cherry picked from commit d003a0cd2e587a47627fd328f9fc5a484adc29f2) Signed-off-by: Michael Niedermayer --- libavformat/mp3enc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index adf6a32572..2ae74f9afb 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -417,14 +417,14 @@ static int mp3_write_packet(AVFormatContext *s, AVPacket *pkt) if (mp3->pics_to_write) { /* buffer audio packets until we get all the pictures */ AVPacketList *pktl = av_mallocz(sizeof(*pktl)); + int ret; if (!pktl) return AVERROR(ENOMEM); - pktl->pkt = *pkt; - pktl->pkt.buf = av_buffer_ref(pkt->buf); - if (!pktl->pkt.buf) { + ret = av_copy_packet(&pktl->pkt, pkt); + if (ret < 0) { av_freep(&pktl); - return AVERROR(ENOMEM); + return ret; } if (mp3->queue_end) From 0c88d539f8284d8625749febffd9e7ca8ef2b3be Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 18 Mar 2014 00:08:54 +0100 Subject: [PATCH 138/822] avcodec: Add padding after the remaining AVFrames This limits ABI issues in case libavcodec is linked to a libavutil with larger AVFrame Which can happen if they are shiped in seperate binary packages and libavutil is upgraded A cleaner alternative would be to replace them by pointers but this would likely cause a small speedloss Signed-off-by: Michael Niedermayer (cherry picked from commit fc567ac49e17151f00f31b59030cd10f952612ef) Conflicts: libavcodec/h264.h (cherry picked from commit 618d062bd553a7d7fad194d4236913f2b0a0251e) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.h | 1 + libavcodec/utils.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 92aac6d18a..0811e62afb 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -99,6 +99,7 @@ struct MpegEncContext; */ typedef struct Picture{ struct AVFrame f; + uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame ThreadFrame tf; AVBufferRef *qscale_table_buf; diff --git a/libavcodec/utils.c b/libavcodec/utils.c index cd04ca2aaf..19df3cc748 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -807,6 +807,7 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame) typedef struct CompatReleaseBufPriv { AVCodecContext avctx; AVFrame frame; + uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame } CompatReleaseBufPriv; static void compat_free_buffer(void *opaque, uint8_t *data) From 938ff937100541d0060d4500c153e7459385658a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Mar 2014 22:55:37 +0100 Subject: [PATCH 139/822] avformat/aviobuf: factorize buffer_size out Signed-off-by: Michael Niedermayer (cherry picked from commit 2adf422ce24bd8038d5d2f50549d0d3fb4170171) Signed-off-by: Michael Niedermayer --- libavformat/aviobuf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index eb5a6e502d..18431e7086 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -201,12 +201,14 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) int64_t offset1; int64_t pos; int force = whence & AVSEEK_FORCE; + int buffer_size; whence &= ~AVSEEK_FORCE; if(!s) return AVERROR(EINVAL); - pos = s->pos - (s->write_flag ? 0 : (s->buf_end - s->buffer)); + buffer_size = s->buf_end - s->buffer; + pos = s->pos - (s->write_flag ? 0 : buffer_size); if (whence != SEEK_CUR && whence != SEEK_SET) return AVERROR(EINVAL); @@ -219,7 +221,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) } offset1 = offset - pos; if (!s->must_flush && (!s->direct || !s->seek) && - offset1 >= 0 && offset1 <= (s->buf_end - s->buffer)) { + offset1 >= 0 && offset1 <= buffer_size) { /* can do the seek inside the buffer */ s->buf_ptr = s->buffer + offset1; } else if ((!s->seekable || From 01507eb1f87dcccfe6e0e66cd3ab0a4a973169f1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Mar 2014 23:09:40 +0100 Subject: [PATCH 140/822] avformat/aviobuf: optimize sequential backward seeking This reduces the number of protocol seeks Signed-off-by: Michael Niedermayer (cherry picked from commit 9600486d10a9728f1503363334268ecfafa9b0e5) Signed-off-by: Michael Niedermayer --- libavformat/aviobuf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 18431e7086..95fdf200ef 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -234,9 +234,20 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) if (s->eof_reached) return AVERROR_EOF; s->buf_ptr = s->buf_end + offset - s->pos; - } else { + } else if(!s->write_flag && offset1 < 0 && -offset1 < buffer_size>>1 && s->seek && offset > 0) { int64_t res; + pos -= FFMIN(buffer_size>>1, pos); + if ((res = s->seek(s->opaque, pos, SEEK_SET)) < 0) + return res; + s->buf_end = + s->buf_ptr = s->buffer; + s->pos = pos; + s->eof_reached = 0; + fill_buffer(s); + return avio_seek(s, offset, SEEK_SET | force); + } else { + int64_t res; if (s->write_flag) { flush_buffer(s); s->must_flush = 1; From b017785fa55cf42d61e84861eba7c73dd4d33e3b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Mar 2014 00:18:25 +0100 Subject: [PATCH 141/822] avformat/mp3dec: optimize mp3_seek() for dir < 0 this minimizes the amount of protocol seeks and reading needed in that case Signed-off-by: Michael Niedermayer (cherry picked from commit 171dd67520b649a5b7a0f4fbff72ac88bbedfeab) Signed-off-by: Michael Niedermayer --- libavformat/mp3dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index c1ce173737..ba77bce238 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -318,6 +318,8 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, return -1; } + if (dir < 0) + avio_seek(s->pb, FFMAX(ie->pos - 4096, 0), SEEK_SET); ret = avio_seek(s->pb, ie->pos, SEEK_SET); if (ret < 0) return ret; From e8919d6522c83732f75cd16d8babcb0527b8cc25 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Mar 2014 12:41:10 +0100 Subject: [PATCH 142/822] Revert "mpegts: do not set pts for missing dts in video streams" This reverts commit f65afef1df49f53e14c8d4173ff960fff8d44ecb. If only pts is coded then dts must be equal pts See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5 Found-by: Baptiste Coudurier (cherry picked from commit 0bf882864ecd228d53555c57595eeca048662991) Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index a7819ca97a..242d353399 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -996,10 +996,7 @@ static int mpegts_push_data(MpegTSFilter *filter, pes->pts = AV_NOPTS_VALUE; pes->dts = AV_NOPTS_VALUE; if ((flags & 0xc0) == 0x80) { - pes->pts = ff_parse_pes_pts(r); - /* video pts is not monotonic, can't be used for dts */ - if (pes->st->codec->codec_type != AVMEDIA_TYPE_VIDEO) - pes->dts = pes->pts; + pes->dts = pes->pts = ff_parse_pes_pts(r); r += 5; } else if ((flags & 0xc0) == 0xc0) { pes->pts = ff_parse_pes_pts(r); From 4b7c149306cf36aeed379063fe656d48deb9c93b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Mar 2014 15:16:37 +0100 Subject: [PATCH 143/822] avcodec/g2meet: fix error returns Fixes out of array accesses This should not affect any release Fixes: 8ab69af9e5a7a7e20fe04cdd25c0d6e7-asan_heap-oob_e72b82_5505_cov_2278389485_g2m4.wmv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 6b53c1aa822e9c92be52a462dd0aef1c2010ce73) Signed-off-by: Michael Niedermayer --- libavcodec/g2meet.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index beeb392aae..727501173f 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -717,7 +717,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Unknown compression method %d\n", c->compression); - return AVERROR_PATCHWELCOME; + ret = AVERROR_PATCHWELCOME; + goto header_fail; } c->tile_width = bytestream2_get_be32(&bc); c->tile_height = bytestream2_get_be32(&bc); @@ -737,7 +738,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, (chunk_size - 21) < 16 ) { av_log(avctx, AV_LOG_ERROR, "Display info: missing bitmasks!\n"); - return AVERROR_INVALIDDATA; + ret = AVERROR_INVALIDDATA; + goto header_fail; } r_mask = bytestream2_get_be32(&bc); g_mask = bytestream2_get_be32(&bc); @@ -746,11 +748,13 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Invalid or unsupported bitmasks: R=%X, G=%X, B=%X\n", r_mask, g_mask, b_mask); - return AVERROR_PATCHWELCOME; + ret = AVERROR_PATCHWELCOME; + goto header_fail; } } else { avpriv_request_sample(avctx, "bpp=%d", c->bpp); - return AVERROR_PATCHWELCOME; + ret = AVERROR_PATCHWELCOME; + goto header_fail; } if (g2m_init_buffers(c)) { ret = AVERROR(ENOMEM); From e1f51bbd1fbe562db189376f4b8a7afe5967f79f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Mar 2014 15:18:09 +0100 Subject: [PATCH 144/822] avcodec/g2meet: also reset local got_header when reseting the context got_header Signed-off-by: Michael Niedermayer (cherry picked from commit 8b8ae298afb32979c81310ffdc9904d29497db5f) Signed-off-by: Michael Niedermayer --- libavcodec/g2meet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 727501173f..70b5f26049 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -691,6 +691,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, } switch (chunk_type) { case DISPLAY_INFO: + got_header = c->got_header = 0; if (chunk_size < 21) { av_log(avctx, AV_LOG_ERROR, "Invalid display info size %d\n", From 8caaf260a66cfd5049e42b6a69e4fedcab2d7bfd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 3 Mar 2014 01:55:18 +0100 Subject: [PATCH 145/822] avformat/utils: detect MPEG streams with faulty DTS and discard affected DTS Fixes issue2.ts Signed-off-by: Michael Niedermayer (cherry picked from commit 2dcaa1b9d142ae113b28bffdbf7f8f8900b5e770) Signed-off-by: Michael Niedermayer --- libavformat/avformat.h | 7 +++++++ libavformat/utils.c | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 52eeb613cf..e0ec3da028 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -988,6 +988,13 @@ typedef struct AVStream { int64_t pts_reorder_error[MAX_REORDER_DELAY+1]; uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1]; + /** + * Internal data to analyze DTS and detect faulty mpeg streams + */ + int64_t last_dts_for_order_check; + uint8_t dts_ordered; + uint8_t dts_misordered; + } AVStream; AVRational av_stream_get_r_frame_rate(const AVStream *s); diff --git a/libavformat/utils.c b/libavformat/utils.c index 584edd335e..4e262b14d4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1120,6 +1120,28 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, if (s->flags & AVFMT_FLAG_NOFILLIN) return; + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pkt->dts != AV_NOPTS_VALUE) { + if (pkt->dts == pkt->pts && st->last_dts_for_order_check != AV_NOPTS_VALUE) { + if (st->last_dts_for_order_check <= pkt->dts) { + st->dts_ordered++; + } else { + av_log(s, st->dts_misordered ? AV_LOG_DEBUG : AV_LOG_WARNING, + "DTS %"PRIi64" < %"PRIi64" out of order\n", + pkt->dts, + st->last_dts_for_order_check); + st->dts_misordered++; + } + if (st->dts_ordered + st->dts_misordered > 250) { + st->dts_ordered >>= 1; + st->dts_misordered >>= 1; + } + } + + st->last_dts_for_order_check = pkt->dts; + if (st->dts_ordered < 8*st->dts_misordered && pkt->dts == pkt->pts) + pkt->dts = AV_NOPTS_VALUE; + } + if ((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE) pkt->dts = AV_NOPTS_VALUE; @@ -1664,6 +1686,7 @@ void ff_read_frame_flush(AVFormatContext *s) st->parser = NULL; } st->last_IP_pts = AV_NOPTS_VALUE; + st->last_dts_for_order_check = AV_NOPTS_VALUE; if (st->first_dts == AV_NOPTS_VALUE) st->cur_dts = RELATIVE_TS_BASE; else @@ -2488,6 +2511,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) st = ic->streams[i]; st->cur_dts = st->first_dts; st->last_IP_pts = AV_NOPTS_VALUE; + st->last_dts_for_order_check = AV_NOPTS_VALUE; for (j = 0; j < MAX_REORDER_DELAY + 1; j++) st->pts_buffer[j] = AV_NOPTS_VALUE; } @@ -3623,6 +3647,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) /* default pts setting is MPEG-like */ avpriv_set_pts_info(st, 33, 1, 90000); st->last_IP_pts = AV_NOPTS_VALUE; + st->last_dts_for_order_check = AV_NOPTS_VALUE; for (i = 0; i < MAX_REORDER_DELAY + 1; i++) st->pts_buffer[i] = AV_NOPTS_VALUE; From 4407b38b28d1e64a75195851024c58b953dfb9b2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Mar 2014 22:52:22 +0100 Subject: [PATCH 146/822] swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3() Signed-off-by: Michael Niedermayer (cherry picked from commit 6c47a4e972485e5f0c812159373f703c6f1d089f) Signed-off-by: Michael Niedermayer --- libswscale/x86/swscale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index d9294ce783..5d46f7c820 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -266,7 +266,8 @@ static void yuv2yuvX_sse3(const int16_t *filter, int filterSize, "jb 1b \n\t"\ :: "g" (filter), "r" (dest-offset), "g" ((x86_reg)(dstW+offset)), "m" (offset) - : "%"REG_d, "%"REG_S, "%"REG_c + : XMM_CLOBBERS("%xmm0" , "%xmm1" , "%xmm2" , "%xmm3" , "%xmm4" , "%xmm5" , "%xmm7" ,) + "%"REG_d, "%"REG_S, "%"REG_c ); } #endif From 9ff0467566e971a61dbc2cc7920034a1412df8ee Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 23 Mar 2014 13:25:42 +0100 Subject: [PATCH 147/822] Move avpriv_find_pix_fmt() to utils.c Fixes build with --disable-everything Signed-off-by: Michael Niedermayer (cherry picked from commit 82a90e7764ad04afd3679e4e4e89d85c7e4d4b53) Signed-off-by: Michael Niedermayer --- libavcodec/Makefile | 1 - libavcodec/rawdec.c | 11 ----------- libavcodec/utils.c | 12 ++++++++++++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 6ff8a1caa1..b56ecd1979 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -26,7 +26,6 @@ OBJS = allcodecs.o \ options.o \ parser.o \ raw.o \ - rawdec.o \ resample.o \ resample2.o \ utils.o \ diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 444cf8ed5d..d187d23cb5 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -83,17 +83,6 @@ static const PixelFormatTag pix_fmt_bps_mov[] = { { AV_PIX_FMT_NONE, 0 }, }; -enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, - unsigned int fourcc) -{ - while (tags->pix_fmt >= 0) { - if (tags->fourcc == fourcc) - return tags->pix_fmt; - tags++; - } - return AV_PIX_FMT_NONE; -} - #if LIBAVCODEC_VERSION_MAJOR < 55 enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc) { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 19df3cc748..7ffe6c6524 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -46,6 +46,7 @@ #include "thread.h" #include "frame_thread_encoder.h" #include "internal.h" +#include "raw.h" #include "bytestream.h" #include "version.h" #include @@ -1071,6 +1072,17 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, return 0; } +enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, + unsigned int fourcc) +{ + while (tags->pix_fmt >= 0) { + if (tags->fourcc == fourcc) + return tags->pix_fmt; + tags++; + } + return AV_PIX_FMT_NONE; +} + static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); From 4dc8b4d7d081648b0cdec7266acd364e38506c5b Mon Sep 17 00:00:00 2001 From: Andrey Myznikov Date: Wed, 5 Mar 2014 18:21:07 +0200 Subject: [PATCH 148/822] Fix pthread-related compile errors in iec61883.c Signed-off-by: Michael Niedermayer (cherry picked from commit 9deecdf85f0c1cebcc0a157114bf6dbc02a0a120) Signed-off-by: Michael Niedermayer --- libavdevice/iec61883.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c index a63566e9d4..443ca3cd34 100644 --- a/libavdevice/iec61883.c +++ b/libavdevice/iec61883.c @@ -102,7 +102,7 @@ static int iec61883_callback(unsigned char *data, int length, DVPacket *packet; int ret; -#ifdef THREADS +#if THREADS pthread_mutex_lock(&dv->mutex); #endif @@ -139,7 +139,7 @@ static int iec61883_callback(unsigned char *data, int length, ret = 0; exit: -#ifdef THREADS +#if THREADS pthread_cond_broadcast(&dv->cond); pthread_mutex_unlock(&dv->mutex); #endif @@ -151,7 +151,7 @@ static void *iec61883_receive_task(void *opaque) struct iec61883_data *dv = (struct iec61883_data *)opaque; int result; -#ifdef THREADS +#if THREADS while (dv->thread_loop) #endif { @@ -168,7 +168,7 @@ static void *iec61883_receive_task(void *opaque) raw1394_loop_iterate(dv->raw1394); } else if (dv->receiving) { av_log(NULL, AV_LOG_ERROR, "No more input data available\n"); -#ifdef THREADS +#if THREADS pthread_mutex_lock(&dv->mutex); dv->eof = 1; pthread_cond_broadcast(&dv->cond); @@ -413,7 +413,7 @@ static int iec61883_read_packet(AVFormatContext *context, AVPacket *pkt) * Try to parse frames from queue */ -#ifdef THREADS +#if THREADS pthread_mutex_lock(&dv->mutex); while ((size = dv->parse_queue(dv, pkt)) == -1) if (!dv->eof) From d2c76782e0e8a676159865f7c6e368ab0b1b6b51 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 23 Mar 2014 21:13:49 +0100 Subject: [PATCH 149/822] update for 2.2 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 749c29f4c7..8bbe6cf74a 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2-rc2 +2.2 diff --git a/VERSION b/VERSION index 749c29f4c7..8bbe6cf74a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2-rc2 +2.2 diff --git a/doc/Doxyfile b/doc/Doxyfile index d39e0574a6..7f1d3a3f3c 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2-rc2 +PROJECT_NUMBER = 2.2 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 3ab63abbd47156ed53994b3aaffbcc27a36d5f5b Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 25 Mar 2014 15:46:35 +0100 Subject: [PATCH 150/822] Do not set swscale sizeFactor to -1. Fixes ticket #3495. (cherry picked from commit e6fe804bdd6272de633ecf3fc73e1aba6746f641) --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index f2e41671a7..e4479925e6 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -367,7 +367,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, int sizeFactor = -1; for (i = 0; i < FF_ARRAY_ELEMS(scale_algorithms); i++) { - if (flags & scale_algorithms[i].flag) { + if (flags & scale_algorithms[i].flag && scale_algorithms[i].size_factor > 0) { sizeFactor = scale_algorithms[i].size_factor; break; } From a80a7131d11af69d2519377b35b58d8c8b3430af Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 24 Mar 2014 05:01:32 +0100 Subject: [PATCH 151/822] swscale/swscale: fix integer overflow Should fix fate failure with clang ftrapv Signed-off-by: Michael Niedermayer (cherry picked from commit c9c0451224fd7bc38b4e135e99f114f80c1ae67f) Signed-off-by: Michael Niedermayer --- libswscale/swscale.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1d623e77a2..f529331f0f 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -208,8 +208,9 @@ static void lumRangeToJpeg16_c(int16_t *_dst, int width) { int i; int32_t *dst = (int32_t *) _dst; - for (i = 0; i < width; i++) - dst[i] = (FFMIN(dst[i], 30189 << 4) * 4769 - (39057361 << 2)) >> 12; + for (i = 0; i < width; i++) { + dst[i] = ((int)(FFMIN(dst[i], 30189 << 4) * 4769U - (39057361 << 2))) >> 12; + } } static void lumRangeFromJpeg16_c(int16_t *_dst, int width) From adad1ba5d86b7fa4c3d81f79e949b866d1232b1b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 11 Mar 2014 20:45:29 +0100 Subject: [PATCH 152/822] avcodec/vorbisdec: use the stored previous window type only when the actual previous is not known Fixes Ticket3432 Signed-off-by: Michael Niedermayer (cherry picked from commit 5171ae781a240cac3860c20f9aefc6d1b2c61cac) Signed-off-by: Michael Niedermayer --- libavcodec/vorbisdec.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index a2f7dd27f8..d928446722 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -151,7 +151,7 @@ typedef struct vorbis_context_s { uint8_t mode_count; vorbis_mode *modes; uint8_t mode_number; // mode number for the current packet - uint8_t previous_window; + int8_t previous_window; float *channel_residues; float *saved; } vorbis_context; @@ -989,7 +989,7 @@ static int vorbis_parse_id_hdr(vorbis_context *vc) if (!vc->channel_residues || !vc->saved) return AVERROR(ENOMEM); - vc->previous_window = 0; + vc->previous_window = -1; ff_mdct_init(&vc->mdct[0], bl0, 1, -1.0); ff_mdct_init(&vc->mdct[1], bl1, 1, -1.0); @@ -1548,7 +1548,7 @@ static int vorbis_parse_audio_packet(vorbis_context *vc, float **floor_ptr) { GetBitContext *gb = &vc->gb; FFTContext *mdct; - unsigned previous_window = vc->previous_window; + int previous_window = vc->previous_window; unsigned mode_number, blockflag, blocksize; int i, j; uint8_t no_residue[255]; @@ -1581,9 +1581,11 @@ static int vorbis_parse_audio_packet(vorbis_context *vc, float **floor_ptr) blocksize = vc->blocksize[blockflag]; vlen = blocksize / 2; if (blockflag) { - previous_window = get_bits(gb, 1); - skip_bits1(gb); // next_window - } + int code = get_bits(gb, 2); + if (previous_window < 0) + previous_window = code>>1; + } else if (previous_window < 0) + previous_window = 0; memset(ch_res_ptr, 0, sizeof(float) * vc->audio_channels * vlen); //FIXME can this be removed ? for (i = 0; i < vc->audio_channels; ++i) @@ -1812,7 +1814,7 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avctx) memset(vc->saved, 0, (vc->blocksize[1] / 4) * vc->audio_channels * sizeof(*vc->saved)); } - vc->previous_window = 0; + vc->previous_window = -1; } AVCodec ff_vorbis_decoder = { From 2c566744c41e075ac4b882137105e73b2c1a6870 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 8 Mar 2014 05:13:05 +0100 Subject: [PATCH 153/822] avcodec/vorbis: fix decoding of single element huffman trees Fixes Ticket2893 Signed-off-by: Michael Niedermayer (cherry picked from commit 742d8601031fc69748f62fe7c5164a22a0751021) Signed-off-by: Michael Niedermayer --- libavcodec/vorbis.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c index 6eb765d7d0..05f18b474d 100644 --- a/libavcodec/vorbis.c +++ b/libavcodec/vorbis.c @@ -85,6 +85,11 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) ++p; + for (i = p; (bits[i] == 0) && (i < num); ++i) + ; + if (i == num) + return 0; + for (; p < num; ++p) { if (bits[p] > 32) return 1; From 314f055c294b1e0f5ecc2c97fe99a33c2ad7e896 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 24 Mar 2014 22:04:52 +0100 Subject: [PATCH 154/822] dox/scaler:fix bicubiclin typo See Ticket3486 Signed-off-by: Michael Niedermayer (cherry picked from commit 575b957758670d6094e9095acfcc24e4e32fc4a7) Signed-off-by: Michael Niedermayer --- doc/scaler.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/scaler.texi b/doc/scaler.texi index 08d90bcc81..f043ffd5f2 100644 --- a/doc/scaler.texi +++ b/doc/scaler.texi @@ -35,7 +35,7 @@ Select nearest neighbor rescaling algorithm. @item area Select averaging area rescaling algorithm. -@item bicubiclin +@item bicublin Select bicubic scaling algorithm for the luma component, bilinear for chroma components. From b40ab81d1f547057c563c6cc0fab106facc808fe Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 25 Mar 2014 00:15:52 +0100 Subject: [PATCH 155/822] avcodec/x86/mpegvideoenc_template: fix integer overflow Signed-off-by: Michael Niedermayer --- libavcodec/x86/mpegvideoenc_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c index 0defc404fe..bbe93e8de0 100644 --- a/libavcodec/x86/mpegvideoenc_template.c +++ b/libavcodec/x86/mpegvideoenc_template.c @@ -216,7 +216,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, "psubusw "MM"1, "MM"4 \n\t" "packuswb "MM"4, "MM"4 \n\t" #if COMPILE_TEMPLATE_SSE2 - "packuswb "MM"4, "MM"4 \n\t" + "packsswb "MM"4, "MM"4 \n\t" #endif "movd "MM"4, %0 \n\t" // *overflow : "=g" (*overflow) From 1103aec1df38df79abe2c2689818ca295383d9ed Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 25 Mar 2014 05:27:08 -0300 Subject: [PATCH 156/822] x86/cpu: check for OS support before enabling AVX2 AV_CPU_FLAG_AVX is enabled at this point only if there's OS support. Signed-off-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit 2d9821a2081aff5dca253386c6e7e71a04509cff) Signed-off-by: Michael Niedermayer --- libavutil/x86/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 356cd44f06..8ad478400c 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -143,7 +143,7 @@ int ff_get_cpu_flags_x86(void) if (max_std_level >= 7) { cpuid(7, eax, ebx, ecx, edx); #if HAVE_AVX2 - if (ebx & 0x00000020) + if ((rval & AV_CPU_FLAG_AVX) && (ebx & 0x00000020)) rval |= AV_CPU_FLAG_AVX2; #endif /* HAVE_AVX2 */ /* BMI1/2 don't need OS support */ From ef0c503d3781186356ccaa1e0979ef41ddeeaa7c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Mar 2014 18:09:23 +0100 Subject: [PATCH 157/822] avcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter sets Fixes h264_mp4toannexb_bsf_failure.mkv Signed-off-by: Michael Niedermayer (cherry picked from commit 289b149cecb381522cc9ccdf382825330169c655) Signed-off-by: Michael Niedermayer --- libavcodec/h264_mp4toannexb_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 8c0fbb3df2..0f142bb2ad 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -175,7 +175,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, goto fail; /* prepend only to the first type 5 NAL unit of an IDR picture */ - if (ctx->first_idr && unit_type == 5) { + if (ctx->first_idr && (unit_type == 5 || unit_type == 7 || unit_type == 8)) { if ((ret=alloc_and_copy(poutbuf, poutbuf_size, avctx->extradata, avctx->extradata_size, buf, nal_size)) < 0) From 81cfe391135c8c8161f1aed2ba808178f3800cc0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Mar 2014 13:53:11 +0100 Subject: [PATCH 158/822] vf_pullup: simplify, fix double free error The memory allocation for f->diffs was freed multiple times in some corner cases. Simplify the code so that this doesn't happen. Signed-off-by: Michael Niedermayer (cherry picked from commit 5b0ce5d4e3660fb0fc86779cbd027b47b1758c9f) Signed-off-by: Michael Niedermayer --- libavfilter/vf_pullup.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 58d4d7a1ea..bf8456814f 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -126,20 +126,20 @@ static int alloc_metrics(PullupContext *s, PullupField *f) return 0; } -static void free_field_queue(PullupField *head, PullupField **last) +static void free_field_queue(PullupField *head) { PullupField *f = head; - while (f) { + do { + PullupField *next; + if (!f) + break; av_free(f->diffs); av_free(f->combs); av_free(f->vars); - if (f == *last) { - av_freep(last); - break; - } - f = f->next; - av_freep(&f->prev); - }; + next = f->next; + av_free(f); + f = next; + } while (f != head); } static PullupField *make_field_queue(PullupContext *s, int len) @@ -158,14 +158,14 @@ static PullupField *make_field_queue(PullupContext *s, int len) for (; len > 0; len--) { f->next = av_mallocz(sizeof(*f->next)); if (!f->next) { - free_field_queue(head, &f); + free_field_queue(head); return NULL; } f->next->prev = f; f = f->next; if (alloc_metrics(s, f) < 0) { - free_field_queue(head, &f); + free_field_queue(head); return NULL; } } @@ -736,7 +736,8 @@ static av_cold void uninit(AVFilterContext *ctx) PullupContext *s = ctx->priv; int i; - free_field_queue(s->head, &s->last); + free_field_queue(s->head); + s->last = NULL; for (i = 0; i < FF_ARRAY_ELEMS(s->buffers); i++) { av_freep(&s->buffers[i].planes[0]); From 194485cfbaac25957721cc9cd1588678e0217f58 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Mar 2014 18:37:15 +0100 Subject: [PATCH 159/822] avfilter/vf_pullup: zero freed memory for saftey Signed-off-by: Michael Niedermayer (cherry picked from commit a44409e692e8f369368215fb16b34749cff0d35c) Signed-off-by: Michael Niedermayer --- libavfilter/vf_pullup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index bf8456814f..73ffa68f8f 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -137,6 +137,7 @@ static void free_field_queue(PullupField *head) av_free(f->combs); av_free(f->vars); next = f->next; + memset(f, 0, sizeof(*f)); av_free(f); f = next; } while (f != head); From 3cd1c8653b518b3d7e5eea65c1896ae7ddab14a4 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 26 Mar 2014 19:13:35 +0100 Subject: [PATCH 160/822] Fix texinfo error due to wrong @subsubsection Signed-off-by: Michael Niedermayer (cherry picked from commit cf3bfc970c7a567763aef4bf7ce827f84d692fd6) Signed-off-by: Michael Niedermayer --- doc/decoders.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 09c9f9c731..9309b82a58 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -62,7 +62,7 @@ AC-3 audio decoder. This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as the undocumented RealAudio 3 (a.k.a. dnet). -@subsubsection AC-3 Decoder Options +@subsection AC-3 Decoder Options @table @option From 31c21d2f690533ed9e8652b130d5ce4cad1fb13f Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 26 Mar 2014 19:24:35 +0100 Subject: [PATCH 161/822] Fix spelling errors in texi files: more informations --> more information allows to --> allows one to Signed-off-by: Michael Niedermayer (cherry picked from commit d473f2d18aef6731526324d28008874fac05f593) Signed-off-by: Michael Niedermayer --- doc/encoders.texi | 2 +- doc/ffserver.texi | 2 +- doc/outdevs.texi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index c28cbcbdf4..8aac0856fb 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -1271,7 +1271,7 @@ Requires the presence of the libtheora headers and library during configuration. You need to explicitly configure the build with @code{--enable-libtheora}. -For more informations about the libtheora project see +For more information about the libtheora project see @url{http://www.theora.org/}. @subsection Options diff --git a/doc/ffserver.texi b/doc/ffserver.texi index 4ef30faec9..fb90dd650d 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -111,7 +111,7 @@ must be configured in the stream configuration. They are sent to the @command{ffmpeg} encoders. The @command{ffmpeg} @option{override_ffserver} commandline option -allows to override the encoding parameters set by the server. +allows one to override the encoding parameters set by the server. Multiple streams can be connected to the same feed. diff --git a/doc/outdevs.texi b/doc/outdevs.texi index 5eba26fab0..620c18bab9 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -216,7 +216,7 @@ OpenGL output device. To enable this output device you need to configure FFmpeg with @code{--enable-opengl}. -Device allows to render to OpenGL context. +This output device allows one to render to OpenGL context. Context may be provided by application or default SDL window is created. When device renders to external context, application must implement handlers for following messages: From a014b9614e6165fb8df9e756f46a95d516794678 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 29 Mar 2014 13:03:59 -0400 Subject: [PATCH 162/822] Prepare for 10.1 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index f599e28b8a..ae425d6981 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10 +10.1 From e0aa76d38a02090245284fc157afb9074e9ff073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 29 Mar 2014 12:35:11 +0200 Subject: [PATCH 163/822] golomb: Fix the implementation of get_se_golomb_long MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was only used in hevc muxing code so far. This makes the return values match what get_se_golomb returns for the same bitstream reader instances. The logic for producing a signed golomb code out of an unsigned one was based on the corresponding code in get_se_golomb, which operated directly on the bitstream reader buffer - not on the equivalent return value from get_ue_golomb. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 508a84e6726ab94a740c160b30fd8162265d1fef) Signed-off-by: Martin Storsjö --- libavcodec/golomb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index ce3500f8a9..1754706077 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -211,9 +211,9 @@ static inline int get_se_golomb_long(GetBitContext *gb) unsigned int buf = get_ue_golomb_long(gb); if (buf & 1) - buf = -(buf >> 1); + buf = (buf + 1) >> 1; else - buf = (buf >> 1); + buf = -(buf >> 1); return buf; } From a221c9bd7677bd6b61ed6fdfd3be082fc2328029 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Mar 2014 00:03:38 +0100 Subject: [PATCH 164/822] avcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx & defaults fixes x264opts opengop=1 Signed-off-by: Michael Niedermayer (cherry picked from commit 64b79141bdfdffaa9fda69eecce140473d0a9a18) Signed-off-by: Michael Niedermayer --- libavcodec/libx264.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 60076301a6..685a066ce6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -391,19 +391,6 @@ static av_cold int X264_init(AVCodecContext *avctx) OPT_STR("level", x4->level); - if(x4->x264opts){ - const char *p= x4->x264opts; - while(p){ - char param[256]={0}, val[256]={0}; - if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){ - OPT_STR(param, "1"); - }else - OPT_STR(param, val); - p= strchr(p, ':'); - p+=!!p; - } - } - if (avctx->i_quant_factor > 0) x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); @@ -589,6 +576,19 @@ static av_cold int X264_init(AVCodecContext *avctx) if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) x4->params.b_repeat_headers = 0; + if(x4->x264opts){ + const char *p= x4->x264opts; + while(p){ + char param[256]={0}, val[256]={0}; + if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){ + OPT_STR(param, "1"); + }else + OPT_STR(param, val); + p= strchr(p, ':'); + p+=!!p; + } + } + if (x4->x264_params) { AVDictionary *dict = NULL; AVDictionaryEntry *en = NULL; From 5cb2a1c3f0b9e719756c7cafc32ee98ab02bd5c3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 31 Mar 2014 03:22:20 +0200 Subject: [PATCH 165/822] avfilter/vf_pullup: fix gray8 Fixes segfault Fixes Ticket3469 Signed-off-by: Michael Niedermayer (cherry picked from commit e818ee090ac53d1b333a7d6a45274f75cf1a71a1) Signed-off-by: Michael Niedermayer --- libavfilter/vf_pullup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 73ffa68f8f..5b448dd313 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -256,6 +256,8 @@ static int alloc_buffer(PullupContext *s, PullupBuffer *b) for (i = 0; i < s->nb_planes; i++) { b->planes[i] = av_malloc(s->planeheight[i] * s->planewidth[i]); } + if (s->nb_planes == 1) + b->planes[1] = av_malloc(4*256); return 0; } From 02bae9f013e73f960e9283b79d9ebf4bc81969c6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 3 Apr 2014 23:46:25 +0200 Subject: [PATCH 166/822] avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thread_context() Fixes crash Found-by: iive Signed-off-by: Michael Niedermayer (cherry picked from commit 8710ee11d75eebc17e7d63bc6ffb91766933bd68) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ec3601f994..1a6a259aa5 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1813,6 +1813,7 @@ static int decode_update_thread_context(AVCodecContext *dst, memset(&h->mb, 0, sizeof(h->mb)); memset(&h->mb_luma_dc, 0, sizeof(h->mb_luma_dc)); memset(&h->mb_padding, 0, sizeof(h->mb_padding)); + memset(&h->cur_pic, 0, sizeof(h->cur_pic)); h->avctx = dst; h->DPB = NULL; From fc8eb4c1f9847b0a465bab5cfbcc8069e9e6b308 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Fri, 4 Apr 2014 19:28:45 +0200 Subject: [PATCH 167/822] lavu/opt: validate range before dereference This change make error handling simplier. av_opt_freep_ranges may be called when some ranges are NULL, for example after memory allocation fail. Signed-off-by: Lukasz Marek Signed-off-by: Michael Niedermayer (cherry picked from commit 3aac5fcfa9d3748659d78ab2a66d0ccce22cfd4f) Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 652a2ddbb3..64901f2736 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1599,8 +1599,10 @@ void av_opt_freep_ranges(AVOptionRanges **rangesp) for (i = 0; i < ranges->nb_ranges; i++) { AVOptionRange *range = ranges->range[i]; - av_freep(&range->str); - av_freep(&ranges->range[i]); + if (range) { + av_freep(&range->str); + av_freep(&ranges->range[i]); + } } av_freep(&ranges->range); av_freep(rangesp); From f41622ecb4b35eaaad3f7c73dd0adf26472afa4b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 5 Apr 2014 21:34:03 +0200 Subject: [PATCH 168/822] avcodec/wma: use av_freep(), do not leave stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit d167faafe9dfa0b82bebb267c3c4e5fa5286bd67) Signed-off-by: Michael Niedermayer --- libavcodec/wma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/wma.c b/libavcodec/wma.c index 0122ee6fe3..b6d6351acf 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -386,9 +386,9 @@ int ff_wma_end(AVCodecContext *avctx) } for (i = 0; i < 2; i++) { ff_free_vlc(&s->coef_vlc[i]); - av_free(s->run_table[i]); - av_free(s->level_table[i]); - av_free(s->int_table[i]); + av_freep(&s->run_table[i]); + av_freep(&s->level_table[i]); + av_freep(&s->int_table[i]); } return 0; From 544accc895f33c52cf7f097b9c6c6d3eeadc6134 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 5 Apr 2014 22:07:43 +0200 Subject: [PATCH 169/822] avformat/omadec: fix probetest failure Signed-off-by: Michael Niedermayer (cherry picked from commit a84f9c75bc3f55fed4f68d2503a08ab70c76ecbe) Signed-off-by: Michael Niedermayer --- libavformat/omadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index dc6a12af3c..68cd879916 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -448,7 +448,7 @@ static int oma_read_probe(AVProbeData *p) /* This check cannot overflow as tag_len has at most 28 bits */ if (p->buf_size < tag_len + 5) /* EA3 header comes late, might be outside of the probe buffer */ - return tag_len ? AVPROBE_SCORE_EXTENSION : 0; + return tag_len ? AVPROBE_SCORE_EXTENSION/2 : 0; buf += tag_len; From 34592d04fbeaf3dc993650f1fcf54ed76af9b26b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 6 Apr 2014 00:39:58 +0200 Subject: [PATCH 170/822] examples/avio_reading: fix null dereference on error Fixed CID1197052 Signed-off-by: Michael Niedermayer (cherry picked from commit 419800acc46afc0c3b7319d6e216d0da207ebbb7) Signed-off-by: Michael Niedermayer --- doc/examples/avio_reading.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/examples/avio_reading.c b/doc/examples/avio_reading.c index 45dbd4725a..02474e907a 100644 --- a/doc/examples/avio_reading.c +++ b/doc/examples/avio_reading.c @@ -119,8 +119,10 @@ int main(int argc, char *argv[]) end: avformat_close_input(&fmt_ctx); /* note: the internal buffer could have changed, and be != avio_ctx_buffer */ - av_freep(&avio_ctx->buffer); - av_freep(&avio_ctx); + if (avio_ctx) { + av_freep(&avio_ctx->buffer); + av_freep(&avio_ctx); + } av_file_unmap(buffer, buffer_size); if (ret < 0) { From 36cab9c408bd6c1af8321c29f74fce8e0d110fd2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 6 Apr 2014 03:51:46 +0200 Subject: [PATCH 171/822] avcodec/pthread_frame: fix missing unlock on error Fixes CID1197057 Signed-off-by: Michael Niedermayer (cherry picked from commit f87b3d552394cd03c1e9f180553d41600c575c69) Signed-off-by: Michael Niedermayer --- libavcodec/pthread_frame.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 4e385e7136..addcecc70f 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -356,8 +356,10 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt) memcpy(p->buf, avpkt->data, avpkt->size); memset(p->buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); } - if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0) + if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0) { + pthread_mutex_unlock(&p->mutex); return ret; + } p->state = STATE_SETTING_UP; pthread_cond_signal(&p->input_cond); From b479b42b26b9c84b596eec1c9cf46e5221752fea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 6 Apr 2014 04:01:24 +0200 Subject: [PATCH 172/822] avcodec/msrle: check return code for success before use The check is possibly redundant, but better to check for errors that dont occur than to skip the check and crash Fixes CID1197060 Signed-off-by: Michael Niedermayer (cherry picked from commit 754f84663e8b3a88fa2e953b195d59230393fb8d) Signed-off-by: Michael Niedermayer --- libavcodec/msrle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 750e54ae99..9f0cac61e3 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -116,6 +116,9 @@ static int msrle_decode_frame(AVCodecContext *avctx, uint8_t *buf = avpkt->data + (avctx->height-1)*istride; int i, j; + if (linesize < 0) + return linesize; + for (i = 0; i < avctx->height; i++) { if (avctx->bits_per_coded_sample == 4) { for (j = 0; j < avctx->width - 1; j += 2) { From 352b0969e23c83074cb8bfb4fb268df45848a983 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 8 Apr 2014 00:19:07 +0200 Subject: [PATCH 173/822] swresample/resample: Limit filter length Related to CID1197063 The limit choosen is arbitrary and much larger than what makes sense. It avoids the need for checking arithmetic operations with the length for overflow Signed-off-by: Michael Niedermayer (cherry picked from commit f9158b01d0f3effb58e87fb07db0382bc1e47de5) Signed-off-by: Michael Niedermayer --- libswresample/resample.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libswresample/resample.c b/libswresample/resample.c index 8b1b6ca9af..b968447444 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -229,6 +229,11 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r av_assert0(0); } + if (filter_size/factor > INT32_MAX/256) { + av_log(NULL, AV_LOG_ERROR, "Filter length too large\n"); + goto error; + } + c->phase_shift = phase_shift; c->phase_mask = phase_count - 1; c->linear = linear; From d20ac551a8617533279b8b301f2749e8e5890848 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 8 Apr 2014 00:29:06 +0200 Subject: [PATCH 174/822] swresample/dither: use av_malloc_array() Signed-off-by: Michael Niedermayer (cherry picked from commit a5290cb1ac047851563da7aca06569e3ada55f79) Signed-off-by: Michael Niedermayer --- libswresample/dither.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/dither.c b/libswresample/dither.c index 7cbe410557..b8b592a7ce 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -26,7 +26,7 @@ void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale; #define TMP_EXTRA 2 - double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double)); + double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; for(i=0; i Date: Tue, 8 Apr 2014 00:29:26 +0200 Subject: [PATCH 175/822] swresample/resample: use av_malloc_array() where appropriate Signed-off-by: Michael Niedermayer (cherry picked from commit 5027f39712fdce25b9008e72d52e5abfeefd5fe6) Signed-off-by: Michael Niedermayer --- libswresample/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/resample.c b/libswresample/resample.c index b968447444..65fd817be9 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -95,7 +95,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap int filter_type, int kaiser_beta){ int ph, i; double x, y, w; - double *tab = av_malloc(tap_count * sizeof(*tab)); + double *tab = av_malloc_array(tap_count, sizeof(*tab)); const int center= (tap_count-1)/2; if (!tab) From ce94955b3c0b69e2d825bdd34f1140b2661c6419 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 8 Apr 2014 18:12:12 +0200 Subject: [PATCH 176/822] swscale/x86/swscale_template: loose hardcoded dstw_offset Signed-off-by: Michael Niedermayer (cherry picked from commit f6759d9ad4a8b71e6f212ca4f1e7da9fa56d3298) Signed-off-by: Michael Niedermayer --- libswscale/x86/swscale_template.c | 78 +++++++++++++++---------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index c7a1bb46d9..c72104bd09 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -332,7 +332,7 @@ static void RENAME(yuv2yuvX)(const int16_t *filter, int filterSize, MOVNTQ( q3, 24(dst, index, 4))\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #define WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t) REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t) @@ -358,13 +358,13 @@ static void RENAME(yuv2rgb32_X_ar)(SwsContext *c, const int16_t *lumFilter, "psraw $3, %%mm1 \n\t" "psraw $3, %%mm7 \n\t" "packuswb %%mm7, %%mm1 \n\t" - WRITEBGR32(%4, %5, %%REGa, %%mm3, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm2, %%mm6) + WRITEBGR32(%4, "%5", %%REGa, %%mm3, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm2, %%mm6) YSCALEYUV2PACKEDX_END } else { YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX "pcmpeqd %%mm7, %%mm7 \n\t" - WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) YSCALEYUV2PACKEDX_END } } @@ -387,13 +387,13 @@ static void RENAME(yuv2rgb32_X)(SwsContext *c, const int16_t *lumFilter, "psraw $3, %%mm1 \n\t" "psraw $3, %%mm7 \n\t" "packuswb %%mm7, %%mm1 \n\t" - WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) + WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) YSCALEYUV2PACKEDX_END } else { YSCALEYUV2PACKEDX YSCALEYUV2RGBX "pcmpeqd %%mm7, %%mm7 \n\t" - WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) YSCALEYUV2PACKEDX_END } } @@ -422,7 +422,7 @@ static void RENAME(yuv2rgb32_X)(SwsContext *c, const int16_t *lumFilter, MOVNTQ(%%mm1, 8(dst, index, 2))\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #define WRITERGB16(dst, dstw, index) REAL_WRITERGB16(dst, dstw, index) @@ -446,7 +446,7 @@ static void RENAME(yuv2rgb565_X_ar)(SwsContext *c, const int16_t *lumFilter, "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" "paddusb "RED_DITHER"(%0), %%mm5\n\t" #endif - WRITERGB16(%4, %5, %%REGa) + WRITERGB16(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -470,7 +470,7 @@ static void RENAME(yuv2rgb565_X)(SwsContext *c, const int16_t *lumFilter, "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" "paddusb "RED_DITHER"(%0), %%mm5 \n\t" #endif - WRITERGB16(%4, %5, %%REGa) + WRITERGB16(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -499,7 +499,7 @@ static void RENAME(yuv2rgb565_X)(SwsContext *c, const int16_t *lumFilter, MOVNTQ(%%mm1, 8(dst, index, 2))\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #define WRITERGB15(dst, dstw, index) REAL_WRITERGB15(dst, dstw, index) @@ -523,7 +523,7 @@ static void RENAME(yuv2rgb555_X_ar)(SwsContext *c, const int16_t *lumFilter, "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" "paddusb "RED_DITHER"(%0), %%mm5\n\t" #endif - WRITERGB15(%4, %5, %%REGa) + WRITERGB15(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -547,7 +547,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" "paddusb "RED_DITHER"(%0), %%mm5 \n\t" #endif - WRITERGB15(%4, %5, %%REGa) + WRITERGB15(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -601,7 +601,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, "add $24, "#dst" \n\t"\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #define WRITEBGR24MMXEXT(dst, dstw, index) \ @@ -649,7 +649,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, "add $24, "#dst" \n\t"\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #if COMPILE_TEMPLATE_MMXEXT @@ -676,7 +676,7 @@ static void RENAME(yuv2bgr24_X_ar)(SwsContext *c, const int16_t *lumFilter, "pxor %%mm7, %%mm7 \n\t" "lea (%%"REG_a", %%"REG_a", 2), %%"REG_c"\n\t" //FIXME optimize "add %4, %%"REG_c" \n\t" - WRITEBGR24(%%REGc, %5, %%REGa) + WRITEBGR24(%%REGc, "%5", %%REGa) :: "r" (&c->redDither), "m" (dummy), "m" (dummy), "m" (dummy), "r" (dest), "m" (dstW_reg), "m"(uv_off) @@ -700,7 +700,7 @@ static void RENAME(yuv2bgr24_X)(SwsContext *c, const int16_t *lumFilter, "pxor %%mm7, %%mm7 \n\t" "lea (%%"REG_a", %%"REG_a", 2), %%"REG_c" \n\t" //FIXME optimize "add %4, %%"REG_c" \n\t" - WRITEBGR24(%%REGc, %5, %%REGa) + WRITEBGR24(%%REGc, "%5", %%REGa) :: "r" (&c->redDither), "m" (dummy), "m" (dummy), "m" (dummy), "r" (dest), "m" (dstW_reg), "m"(uv_off) @@ -721,7 +721,7 @@ static void RENAME(yuv2bgr24_X)(SwsContext *c, const int16_t *lumFilter, MOVNTQ(%%mm7, 8(dst, index, 2))\ \ "add $8, "#index" \n\t"\ - "cmp "#dstw", "#index" \n\t"\ + "cmp "dstw", "#index" \n\t"\ " jb 1b \n\t" #define WRITEYUY2(dst, dstw, index) REAL_WRITEYUY2(dst, dstw, index) @@ -742,7 +742,7 @@ static void RENAME(yuv2yuyv422_X_ar)(SwsContext *c, const int16_t *lumFilter, "psraw $3, %%mm4 \n\t" "psraw $3, %%mm1 \n\t" "psraw $3, %%mm7 \n\t" - WRITEYUY2(%4, %5, %%REGa) + WRITEYUY2(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -763,7 +763,7 @@ static void RENAME(yuv2yuyv422_X)(SwsContext *c, const int16_t *lumFilter, "psraw $3, %%mm4 \n\t" "psraw $3, %%mm1 \n\t" "psraw $3, %%mm7 \n\t" - WRITEYUY2(%4, %5, %%REGa) + WRITEYUY2(%4, "%5", %%REGa) YSCALEYUV2PACKEDX_END } @@ -864,7 +864,7 @@ static void RENAME(yuv2rgb32_2)(SwsContext *c, const int16_t *buf[2], "psraw $3, %%mm1 \n\t" /* abuf0[eax] - abuf1[eax] >>7*/ "psraw $3, %%mm7 \n\t" /* abuf0[eax] - abuf1[eax] >>7*/ "packuswb %%mm7, %%mm1 \n\t" - WRITEBGR32(%4, 8280(%5), %%r8, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) + WRITEBGR32(%4, DSTW_OFFSET"(%5)", %%r8, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "r" (dest), "a" (&c->redDither), "r" (abuf0), "r" (abuf1) @@ -888,7 +888,7 @@ static void RENAME(yuv2rgb32_2)(SwsContext *c, const int16_t *buf[2], "packuswb %%mm7, %%mm1 \n\t" "pop %1 \n\t" "pop %0 \n\t" - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -902,7 +902,7 @@ static void RENAME(yuv2rgb32_2)(SwsContext *c, const int16_t *buf[2], "push %%"REG_BP" \n\t" YSCALEYUV2RGB(%%REGBP, %5) "pcmpeqd %%mm7, %%mm7 \n\t" - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -919,14 +919,13 @@ static void RENAME(yuv2bgr24_2)(SwsContext *c, const int16_t *buf[2], const int16_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; - //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" YSCALEYUV2RGB(%%REGBP, %5) "pxor %%mm7, %%mm7 \n\t" - WRITEBGR24(%%REGb, 8280(%5), %%REGBP) + WRITEBGR24(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -942,7 +941,6 @@ static void RENAME(yuv2rgb555_2)(SwsContext *c, const int16_t *buf[2], const int16_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; - //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -955,7 +953,7 @@ static void RENAME(yuv2rgb555_2)(SwsContext *c, const int16_t *buf[2], "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -971,7 +969,6 @@ static void RENAME(yuv2rgb565_2)(SwsContext *c, const int16_t *buf[2], const int16_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; - //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -984,7 +981,7 @@ static void RENAME(yuv2rgb565_2)(SwsContext *c, const int16_t *buf[2], "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1040,13 +1037,12 @@ static void RENAME(yuv2yuyv422_2)(SwsContext *c, const int16_t *buf[2], const int16_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; - //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" YSCALEYUV2PACKED(%%REGBP, %5) - WRITEYUY2(%%REGb, 8280(%5), %%REGBP) + WRITEYUY2(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1189,7 +1185,7 @@ static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1(%%REGBP, %5) YSCALEYUV2RGB1_ALPHA(%%REGBP) - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (abuf0), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1202,7 +1198,7 @@ static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1(%%REGBP, %5) "pcmpeqd %%mm7, %%mm7 \n\t" - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1218,7 +1214,7 @@ static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1b(%%REGBP, %5) YSCALEYUV2RGB1_ALPHA(%%REGBP) - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (abuf0), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1231,7 +1227,7 @@ static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1b(%%REGBP, %5) "pcmpeqd %%mm7, %%mm7 \n\t" - WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) + WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1257,7 +1253,7 @@ static void RENAME(yuv2bgr24_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1(%%REGBP, %5) "pxor %%mm7, %%mm7 \n\t" - WRITEBGR24(%%REGb, 8280(%5), %%REGBP) + WRITEBGR24(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1271,7 +1267,7 @@ static void RENAME(yuv2bgr24_1)(SwsContext *c, const int16_t *buf0, "push %%"REG_BP" \n\t" YSCALEYUV2RGB1b(%%REGBP, %5) "pxor %%mm7, %%mm7 \n\t" - WRITEBGR24(%%REGb, 8280(%5), %%REGBP) + WRITEBGR24(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1302,7 +1298,7 @@ static void RENAME(yuv2rgb555_1)(SwsContext *c, const int16_t *buf0, "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1322,7 +1318,7 @@ static void RENAME(yuv2rgb555_1)(SwsContext *c, const int16_t *buf0, "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1353,7 +1349,7 @@ static void RENAME(yuv2rgb565_1)(SwsContext *c, const int16_t *buf0, "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1373,7 +1369,7 @@ static void RENAME(yuv2rgb565_1)(SwsContext *c, const int16_t *buf0, "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif - WRITERGB16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1434,7 +1430,7 @@ static void RENAME(yuv2yuyv422_1)(SwsContext *c, const int16_t *buf0, "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" YSCALEYUV2PACKED1(%%REGBP, %5) - WRITEYUY2(%%REGb, 8280(%5), %%REGBP) + WRITEYUY2(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), @@ -1447,7 +1443,7 @@ static void RENAME(yuv2yuyv422_1)(SwsContext *c, const int16_t *buf0, "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" YSCALEYUV2PACKED1b(%%REGBP, %5) - WRITEYUY2(%%REGb, 8280(%5), %%REGBP) + WRITEYUY2(%%REGb, DSTW_OFFSET"(%5)", %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest), From dfddefa13afaafa77ab140457f1b1e51a02bae2f Mon Sep 17 00:00:00 2001 From: Anthoine Bourgeois Date: Wed, 9 Apr 2014 12:18:32 +0200 Subject: [PATCH 177/822] avcodec/dirac_arith: Fix build with PIC and stack-check options Fixes Ticket3540 The function dirac_get_arith_bit in libavcodec/dirac_arith.h can't be built with PIC and check-stack because the asm code needs 6 registers and PIC and check-stack options take 1 each and x86 is quite limited in this area. Signed-off-by: Michael Niedermayer (cherry picked from commit d8ab7f31dd819f7b3e0d460a2fa4261aaae87b98) Signed-off-by: Michael Niedermayer --- libavcodec/dirac_arith.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h index f9a8bba5fd..089c71a698 100644 --- a/libavcodec/dirac_arith.h +++ b/libavcodec/dirac_arith.h @@ -28,6 +28,7 @@ #ifndef AVCODEC_DIRAC_ARITH_H #define AVCODEC_DIRAC_ARITH_H +#include "libavutil/x86/asm.h" #include "bytestream.h" #include "get_bits.h" @@ -134,7 +135,7 @@ static inline int dirac_get_arith_bit(DiracArith *c, int ctx) range_times_prob = (c->range * prob_zero) >> 16; -#if HAVE_FAST_CMOV && HAVE_INLINE_ASM +#if HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS low -= range_times_prob << 16; range -= range_times_prob; bit = 0; From e72c0a04664a9aab449b63135fe16ade51a99bb6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 10 Apr 2014 05:09:51 +0200 Subject: [PATCH 178/822] update for 2.2.1 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 8bbe6cf74a..c043eea776 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2 +2.2.1 diff --git a/VERSION b/VERSION index 8bbe6cf74a..c043eea776 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2 +2.2.1 diff --git a/doc/Doxyfile b/doc/Doxyfile index 7f1d3a3f3c..765785b801 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2 +PROJECT_NUMBER = 2.2.1 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 96e13c9897501d91f1e2d493eee93a4f897ea462 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Tue, 8 Apr 2014 18:44:53 +0100 Subject: [PATCH 179/822] libx265: Use x265_param_parse to set the SAR Signed-off-by: Derek Buitenhuis (cherry picked from commit 8945dcbb52b6b87e1e6479912cce89c7da54ec43) Conflicts: libavcodec/libx265.c --- libavcodec/libx265.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index e03d72f968..31b85de997 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -81,6 +81,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) libx265Context *ctx = avctx->priv_data; x265_nal *nal; uint8_t *buf; + char sar[10]; int sar_num, sar_den; int nnal; int ret; @@ -121,11 +122,11 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) av_reduce(&sar_num, &sar_den, avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 4096); - ctx->params->bEnableVuiParametersPresentFlag = 1; - ctx->params->bEnableAspectRatioIdc = 1; - ctx->params->aspectRatioIdc = 255; - ctx->params->sarWidth = sar_num; - ctx->params->sarHeight = sar_den; + snprintf(sar, sizeof(sar), "%d:%d", sar_num, sar_den); + if (x265_param_parse(ctx->params, "sar", sar) == X265_PARAM_BAD_VALUE) { + av_log(avctx, AV_LOG_ERROR, "Invalid SAR: %d:%d.\n", sar_num, sar_den); + return AVERROR_INVALIDDATA; + } if (x265_max_bit_depth == 8) ctx->params->internalBitDepth = 8; From 0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 9 Apr 2014 18:22:53 +0200 Subject: [PATCH 180/822] mp3enc: Properly write bitrate value in XING header Instead of using a fixed bitrate_idx, calculate a matching bitrate for the XING header. Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1) to report wrong bitrate and bitrate mode when using CBR. Bug-Id: https://bugs.debian.org/736088 Signed-off-by: Luca Barbato (cherry picked from commit 617a1a98a6be3e59db6fbfc21afab2fb9a049c03) Signed-off-by: Reinhard Tartler --- libavformat/mp3enc.c | 46 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 46889fc134..932625864f 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -119,8 +119,11 @@ static void mp3_write_xing(AVFormatContext *s) MPADecodeHeader mpah; int srate_idx, i, channels; int bitrate_idx; + int best_bitrate_idx; + int best_bitrate_error = INT_MAX; int xing_offset; int ver = 0; + int lsf, bytes_needed; if (!s->pb->seekable || !mp3->write_xing) return; @@ -150,21 +153,51 @@ static void mp3_write_xing(AVFormatContext *s) return; } - /* 64 kbps frame, should be large enough */ - bitrate_idx = (ver == 3) ? 5 : 8; - /* dummy MPEG audio header */ header = 0xff << 24; // sync header |= (0x7 << 5 | ver << 3 | 0x1 << 1 | 0x1) << 16; // sync/audio-version/layer 3/no crc*/ - header |= (bitrate_idx << 4 | srate_idx << 2) << 8; + header |= (srate_idx << 2) << 8; header |= channels << 6; + + lsf = !((header & (1 << 20) && header & (1 << 19))); + + xing_offset = xing_offtbl[ver != 3][channels == 1]; + bytes_needed = 4 // header + + xing_offset + + 4 // xing tag + + 4 // frames/size/toc flags + + 4 // frames + + 4 // size + + XING_TOC_SIZE; // toc + + for (bitrate_idx = 1; bitrate_idx < 15; bitrate_idx++) { + int bit_rate = 1000 * avpriv_mpa_bitrate_tab[lsf][3 - 1][bitrate_idx]; + int error = FFABS(bit_rate - codec->bit_rate); + + if (error < best_bitrate_error){ + best_bitrate_error = error; + best_bitrate_idx = bitrate_idx; + } + } + + for (bitrate_idx = best_bitrate_idx; bitrate_idx < 15; bitrate_idx++) { + int32_t mask = bitrate_idx << (4 + 8); + header |= mask; + + avpriv_mpegaudio_decode_header(&mpah, header); + + if (bytes_needed <= mpah.frame_size) + break; + + header &= ~mask; + } + avio_wb32(s->pb, header); avpriv_mpegaudio_decode_header(&mpah, header); av_assert0(mpah.frame_size >= XING_MAX_SIZE); - xing_offset = xing_offtbl[ver != 3][codec->channels == 1]; ffio_fill(s->pb, 0, xing_offset); mp3->xing_offset = avio_tell(s->pb); ffio_wfourcc(s->pb, "Xing"); @@ -180,8 +213,7 @@ static void mp3_write_xing(AVFormatContext *s) for (i = 0; i < XING_TOC_SIZE; i++) avio_w8(s->pb, 255 * i / XING_TOC_SIZE); - mpah.frame_size -= 4 + xing_offset + 4 + 4 + 4 + 4 + XING_TOC_SIZE; - ffio_fill(s->pb, 0, mpah.frame_size); + ffio_fill(s->pb, 0, mpah.frame_size - bytes_needed); } /* From fe87a40de6792ee97686ce4a215268041e3fcf81 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 12 Apr 2014 20:13:13 +0200 Subject: [PATCH 181/822] ffprobe: do not lose non ascii characters in non utf8 strings Fixes Ticket3363 Using U+FFFD REPLACEMENT CHARACTER as suggested by nicolas Signed-off-by: Michael Niedermayer (cherry picked from commit ca6dd53a734d6fc453de425340d7e9ec4ef385b5) --- ffprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffprobe.c b/ffprobe.c index ef3bcc63f6..9e39ff7fa9 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -336,7 +336,7 @@ static const AVOption writer_options[] = { { "replace", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_REPLACE}, .unit = "sv" }, { "fail", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_FAIL}, .unit = "sv" }, { "string_validation_replacement", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str=""}}, - { "svr", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str=""}}, + { "svr", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str="\xEF\xBF\xBD"}}, { NULL } }; From 56f44c26f06a8d86e6768810d5c389de4671913a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 12 Apr 2014 20:01:33 +0200 Subject: [PATCH 182/822] avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode() Fixes Ticket3363 Signed-off-by: Michael Niedermayer (cherry picked from commit a31547ce2e5c46d7a7005fe70dcf9b3a7c5fc4ac) --- libavutil/avstring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavutil/avstring.c b/libavutil/avstring.c index f4374fdc74..e75cdc6312 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -331,15 +331,15 @@ int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end, while (code & top) { int tmp; if (p >= buf_end) { - ret = AVERROR(EILSEQ); /* incomplete sequence */ - goto end; + (*bufp) ++; + return AVERROR(EILSEQ); /* incomplete sequence */ } /* we assume the byte to be in the form 10xx-xxxx */ tmp = *p++ - 128; /* strip leading 1 */ if (tmp>>6) { - ret = AVERROR(EILSEQ); - goto end; + (*bufp) ++; + return AVERROR(EILSEQ); } code = (code<<6) + tmp; top <<= 5; From 32919db4fb8acd95203849582c9d73bfe8790219 Mon Sep 17 00:00:00 2001 From: Anh Date: Wed, 16 Apr 2014 20:00:17 +0200 Subject: [PATCH 183/822] Fix compilation with --disable-everything --enable-muxer=avi --disable-network. Fixes ticket #3568. (cherry picked from commit c150e2cf324ce0572bb8b9b3501c45465cfbf360) --- libavformat/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index 7b2bbed6da..09045e5bd2 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -84,7 +84,7 @@ OBJS-$(CONFIG_AST_MUXER) += ast.o astenc.o OBJS-$(CONFIG_AU_DEMUXER) += au.o pcm.o OBJS-$(CONFIG_AU_MUXER) += au.o rawenc.o OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o -OBJS-$(CONFIG_AVI_MUXER) += avienc.o +OBJS-$(CONFIG_AVI_MUXER) += avienc.o avlanguage.o OBJS-$(CONFIG_AVISYNTH) += avisynth.o OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o swf.o OBJS-$(CONFIG_AVR_DEMUXER) += avr.o pcm.o From 26b6d70c72e4c8204a428c4e64197cdf1fc8b3cf Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 18 Apr 2014 04:56:34 +0200 Subject: [PATCH 184/822] Do not overwrite VDPAU structures in ff_MPV_frame_start(). Fixes crashes with VDR and MPlayer as reported by irc user crow. (cherry picked from commit 941b2240f2ce59c41f4a9ffec88c512f64c75613) --- libavcodec/mpegvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 3df13100e6..4dc41e83da 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1774,7 +1774,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) return -1; } - if (!avctx->hwaccel) { + if (!avctx->hwaccel && !(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)) { for(i=0; iheight; i++) memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 0x80, avctx->width); From b45cd17d291d3e72ad6dd58f758cd0d3544b2522 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Sat, 19 Apr 2014 12:12:00 +1000 Subject: [PATCH 185/822] ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL Fixes ticket #3530. Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer (cherry picked from commit c94305ae23318c8956a30485cd5642829f4f16a9) --- libavformat/id3v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 3cd23c675a..efaf7682cb 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -935,6 +935,8 @@ void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta) av_freep(¤t); current = next; } + + *extra_meta = NULL; } int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta) From 30cf47c6f0168355c3ddd806cfeb563c6a2f7978 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Fri, 18 Apr 2014 14:49:40 +1000 Subject: [PATCH 186/822] ff_id3v2_read: add option to limit ID3 magic number search Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 ' chunk tag. If such chunks are stored sequentially, it is possible for the ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g. [1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] [2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] Fixes ticket #3530. Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer (cherry picked from commit 5331773cc33ba26b9e26ace643d926219e46a17b) Conflicts: libavformat/dsfdec.c --- libavformat/aiffdec.c | 2 +- libavformat/asfdec.c | 2 +- libavformat/id3v2.c | 19 ++++++++++++++----- libavformat/id3v2.h | 4 +++- libavformat/omadec.c | 2 +- libavformat/utils.c | 2 +- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index c3620716eb..81bcc64a0c 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -237,7 +237,7 @@ static int aiff_read_header(AVFormatContext *s) break; case MKTAG('I', 'D', '3', ' '): position = avio_tell(pb); - ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); + ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, size); if (id3v2_extra_meta) if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0) { ff_id3v2_free_extra_meta(&id3v2_extra_meta); diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 52773ae57e..093e328a8d 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -266,7 +266,7 @@ static void get_id3_tag(AVFormatContext *s, int len) { ID3v2ExtraMeta *id3v2_extra_meta = NULL; - ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); + ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, len); if (id3v2_extra_meta) ff_id3v2_parse_apic(s, &id3v2_extra_meta); ff_id3v2_free_extra_meta(&id3v2_extra_meta); diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index efaf7682cb..43636ec9e9 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -878,16 +878,25 @@ error: static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, AVFormatContext *s, const char *magic, - ID3v2ExtraMeta **extra_meta) + ID3v2ExtraMeta **extra_meta, int64_t max_search_size) { int len, ret; uint8_t buf[ID3v2_HEADER_SIZE]; int found_header; - int64_t off; + int64_t start, off; + if (max_search_size && max_search_size < ID3v2_HEADER_SIZE) + return; + + start = avio_tell(pb); do { /* save the current offset in case there's nothing to read/skip */ off = avio_tell(pb); + if (max_search_size && off - start >= max_search_size - ID3v2_HEADER_SIZE) { + avio_seek(pb, off, SEEK_SET); + break; + } + ret = avio_read(pb, buf, ID3v2_HEADER_SIZE); if (ret != ID3v2_HEADER_SIZE) { avio_seek(pb, off, SEEK_SET); @@ -914,13 +923,13 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *magic, ID3v2ExtraMeta **extra_meta) { - id3v2_read_internal(pb, metadata, NULL, magic, extra_meta); + id3v2_read_internal(pb, metadata, NULL, magic, extra_meta, 0); } void ff_id3v2_read(AVFormatContext *s, const char *magic, - ID3v2ExtraMeta **extra_meta) + ID3v2ExtraMeta **extra_meta, unsigned int max_search_size) { - id3v2_read_internal(s->pb, &s->metadata, s, magic, extra_meta); + id3v2_read_internal(s->pb, &s->metadata, s, magic, extra_meta, max_search_size); } void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta) diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h index eb4dc799e6..9d7bf1c03c 100644 --- a/libavformat/id3v2.h +++ b/libavformat/id3v2.h @@ -112,8 +112,10 @@ void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *ma * * @param extra_meta If not NULL, extra metadata is parsed into a list of * ID3v2ExtraMeta structs and *extra_meta points to the head of the list + * @param[opt] max_search_search restrict ID3 magic number search (bytes from start) */ -void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta); +void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta, + unsigned int max_search_size); /** * Initialize an ID3v2 tag. diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 68cd879916..7542eb1fd4 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -293,7 +293,7 @@ static int oma_read_header(AVFormatContext *s) ID3v2ExtraMeta *extra_meta = NULL; OMAContext *oc = s->priv_data; - ff_id3v2_read(s, ID3v2_EA3_MAGIC, &extra_meta); + ff_id3v2_read(s, ID3v2_EA3_MAGIC, &extra_meta, 0); ret = avio_read(s->pb, buf, EA3_HEADER_SIZE); if (ret < EA3_HEADER_SIZE) return -1; diff --git a/libavformat/utils.c b/libavformat/utils.c index 4e262b14d4..eac71dc366 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -564,7 +564,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, /* e.g. AVFMT_NOFILE formats will not have a AVIOContext */ if (s->pb) - ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); + ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, 0); if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) if ((ret = s->iformat->read_header(s)) < 0) From 9d02e38d3f03100784348ff75fd181d2aaad7e43 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 20 Mar 2014 20:40:24 +0100 Subject: [PATCH 187/822] lavr: allocate the resampling buffer with a positive size This fixes cases where very few input samples (fewer than needed for one output sample) are passed to lavr at the beginning. CC:libav-stable@libav.org (cherry picked from commit ac976ed91e323754e9a84509873ebdb437372797) Signed-off-by: Reinhard Tartler --- libavresample/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavresample/utils.c b/libavresample/utils.c index 2dd3d0616f..bc295d6a58 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -184,7 +184,7 @@ int avresample_open(AVAudioResampleContext *avr) } if (avr->resample_needed) { avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels, - 0, avr->internal_sample_fmt, + 1024, avr->internal_sample_fmt, "resample_out_buffer"); if (!avr->resample_out_buffer) { ret = AVERROR(EINVAL); From c4e764aa6980dd9dc7c423921b415ff7261c944a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 13 Apr 2014 13:44:03 +0300 Subject: [PATCH 188/822] rtmpproto: Make sure to pass on the error code if read_connect failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, if read_connect failed, the ret variable was unmodified and had the value 0, indicating success, which then was returned from the rtmp_open function, even though it actually failed. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 6477139721f559b26eafd415e23e13ea2b0c27e1) Signed-off-by: Reinhard Tartler --- libavformat/rtmpproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 51381a4d0c..bc6a4fef69 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2555,7 +2555,7 @@ reconnect: if ((ret = gen_connect(s, rt)) < 0) goto fail; } else { - if (read_connect(s, s->priv_data) < 0) + if ((ret = read_connect(s, s->priv_data)) < 0) goto fail; } From 0385c824f101151b6f0c4eda59249d70bd48fb53 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 21 Apr 2014 03:38:07 +0200 Subject: [PATCH 189/822] avformat: Fix decoder search in find stream info Fixes Ticket3548 Signed-off-by: Michael Niedermayer (cherry picked from commit f3743901d7df906342f99b179382b19d8a4d9716) --- libavformat/avformat.h | 6 ++++++ libavformat/utils.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index e0ec3da028..7839c0adc5 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -844,6 +844,12 @@ typedef struct AVStream { double (*duration_error)[2][MAX_STD_TIMEBASES]; int64_t codec_info_duration; int64_t codec_info_duration_fields; + + /** + * 0 -> decoder has not been searched for yet. + * >0 -> decoder found + * <0 -> decoder with codec_id == -found_decoder has not been found + */ int found_decoder; int64_t last_duration; diff --git a/libavformat/utils.c b/libavformat/utils.c index eac71dc366..bff961a90b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2623,13 +2623,15 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt, if (!frame) return AVERROR(ENOMEM); - if (!avcodec_is_open(st->codec) && !st->info->found_decoder) { + if (!avcodec_is_open(st->codec) && + st->info->found_decoder <= 0 && + (st->codec->codec_id != -st->info->found_decoder || !st->codec->codec_id)) { AVDictionary *thread_opt = NULL; codec = find_decoder(s, st, st->codec->codec_id); if (!codec) { - st->info->found_decoder = -1; + st->info->found_decoder = -st->codec->codec_id; ret = -1; goto fail; } @@ -2641,7 +2643,7 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt, if (!options) av_dict_free(&thread_opt); if (ret < 0) { - st->info->found_decoder = -1; + st->info->found_decoder = -st->codec->codec_id; goto fail; } st->info->found_decoder = 1; From abd6decd554dbccb6eacb23e2cc78acc72202d2d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 21 Apr 2014 00:58:24 +0200 Subject: [PATCH 190/822] avformat/pmpdec: remove cur_dts timestamp hack It appears the demuxer works fine without it Fixes Ticket3534 Signed-off-by: Michael Niedermayer (cherry picked from commit 5b19fc7aae986d6fa3d689f581b37e4bfba4f2d0) --- libavformat/pmpdec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index 25a5c3e684..d03283722a 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -160,10 +160,6 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt) ret = av_get_packet(pb, pkt, pmp->packet_sizes[pmp->current_packet]); if (ret >= 0) { ret = 0; - // FIXME: this is a hack that should be removed once - // compute_pkt_fields() can handle timestamps properly - if (pmp->cur_stream == 0) - pkt->dts = s->streams[0]->cur_dts++; pkt->stream_index = pmp->cur_stream; } if (pmp->current_packet % pmp->audio_packets == 0) From e9e42beed2acc876498737272112e89a3605e104 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 21 Apr 2014 02:39:00 +0200 Subject: [PATCH 191/822] avformat/asfenc: dont allow non interleaved packets The muxer does not support this currently Fixes ticket #3547. Fixes ticket #3555. Signed-off-by: Michael Niedermayer (cherry picked from commit 369cdf917aaa5d7fbc61d57f87e638772e806716) (cherry picked from commit 514ec9bece86fed440ac829c10e82c4a0569c3a5) --- libavformat/asfenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index b456730229..8f7297734d 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -611,6 +611,7 @@ static int asf_write_header(AVFormatContext *s) ASFContext *asf = s->priv_data; s->packet_size = PACKET_SIZE; + s->max_interleave_delta = 0; asf->nb_packets = 0; asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK); From 14404170b95913e80555416f921e78c58f3ffff0 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 22 Apr 2014 13:01:14 +0200 Subject: [PATCH 192/822] ffprobe: fix scaling of vali in value_string() in case -prefix is selected Fix trac ticket #3523. (cherry picked from commit 1ba59b1cbeafe7cd28db04f772abd89eb7e4ce1e) --- ffprobe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffprobe.c b/ffprobe.c index 9e39ff7fa9..319bbc65c8 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -246,6 +246,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv) vald /= pow(10, index * 3); prefix_string = decimal_unit_prefixes[index]; } + vali = vald; } if (show_float || (use_value_prefix && vald != (long long int)vald)) From 6896dcbf5f1f2f2b0e4425bc96a328299487c0ea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 22 Apr 2014 04:00:32 +0200 Subject: [PATCH 193/822] avformat/avidec: Speed up keyframe detection code Fixes Ticket3531 Signed-off-by: Michael Niedermayer (cherry picked from commit 57fb570908df2e84b11635f12b5be1fb27f053eb) --- libavformat/avidec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index bab62a08c1..0e38281c03 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1315,7 +1315,7 @@ FF_ENABLE_DEPRECATION_WARNINGS AVIndexEntry *e; int index; - index = av_index_search_timestamp(st, ast->frame_offset, 0); + index = av_index_search_timestamp(st, ast->frame_offset, AVSEEK_FLAG_ANY); e = &st->index_entries[index]; if (index >= 0 && e->timestamp == ast->frame_offset) { From 4f41717d0100129d2e2616f339d60f7cf9755802 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 23 Apr 2014 06:04:50 +0200 Subject: [PATCH 194/822] avformat/mux: Check for and remove invalid packet durations Fixes assertion failure Fixes Ticket3575 Signed-off-by: Michael Niedermayer (cherry picked from commit dc6a17cf74a90e41d70ea1753cdb70c0a5b2ced8) --- libavformat/mux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mux.c b/libavformat/mux.c index 1c15a91cd0..a5a16e5455 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -435,6 +435,12 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt) av_dlog(s, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n", av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index); + if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) { + av_log(s, AV_LOG_WARNING, "Packet with invalid duration %d in stream %d\n", + pkt->duration, pkt->stream_index); + pkt->duration = 0; + } + /* duration field */ if (pkt->duration == 0) { ff_compute_frame_duration(&num, &den, st, NULL, pkt); From 4a479fd3e6a7776e2302405d9a177e5f1ecc5acb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Apr 2014 01:25:46 +0200 Subject: [PATCH 195/822] swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input Fixes Ticket 3542 Signed-off-by: Michael Niedermayer (cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74) --- libswresample/rematrix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index e146edfcf7..bf2abcfb20 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -127,6 +127,11 @@ av_cold static int auto_matrix(SwrContext *s) ) out_ch_layout = AV_CH_LAYOUT_STEREO; + if( in_ch_layout == AV_CH_LAYOUT_STEREO_DOWNMIX + && (out_ch_layout & AV_CH_LAYOUT_STEREO_DOWNMIX) == 0 + ) + in_ch_layout = AV_CH_LAYOUT_STEREO; + if(!sane_layout(in_ch_layout)){ av_get_channel_layout_string(buf, sizeof(buf), -1, s->in_ch_layout); av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf); From 43d64829e6219aa1b26add0e02b3f0d955116f07 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Apr 2014 04:12:29 +0200 Subject: [PATCH 196/822] avcodec/vorbisdec: try to workaround libvorbisenc bug Fixes Ticket3590 Signed-off-by: Michael Niedermayer (cherry picked from commit 0a266cb55af9794fc5cff695d35cae4111e4334f) --- libavcodec/vorbisdec.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index d928446722..dfffc6f046 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -701,8 +701,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context *vc) res_setup->partition_size = get_bits(gb, 24) + 1; /* Validations to prevent a buffer overflow later. */ if (res_setup->begin>res_setup->end || - res_setup->end > (res_setup->type == 2 ? vc->audio_channels : 1) * vc->blocksize[1] / 2 || - (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) { + (res_setup->end-res_setup->begin) / res_setup->partition_size > FFMIN(V_MAX_PARTITIONS, 65535)) { av_log(vc->avctx, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %"PRIu16", %"PRIu32", %"PRIu32", %u, %"PRIu32"\n", res_setup->type, res_setup->begin, res_setup->end, @@ -1372,6 +1371,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, unsigned pass, ch_used, i, j, k, l; unsigned max_output = (ch - 1) * vlen; int ptns_to_read = vr->ptns_to_read; + int libvorbis_bug = 0; if (vr_type == 2) { for (j = 1; j < ch; ++j) @@ -1386,8 +1386,13 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, } if (max_output > ch_left * vlen) { - av_log(vc->avctx, AV_LOG_ERROR, "Insufficient output buffer\n"); - return AVERROR_INVALIDDATA; + if (max_output <= ch_left * vlen + vr->partition_size*ch_used/ch) { + ptns_to_read--; + libvorbis_bug = 1; + } else { + av_log(vc->avctx, AV_LOG_ERROR, "Insufficient output buffer\n"); + return AVERROR_INVALIDDATA; + } } av_dlog(NULL, " residue type 0/1/2 decode begin, ch: %d cpc %d \n", ch, c_p_c); @@ -1496,6 +1501,14 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, voffset += vr->partition_size; } } + if (libvorbis_bug && !pass) { + for (j = 0; j < ch_used; ++j) { + if (!do_not_decode[j]) { + get_vlc2(&vc->gb, vc->codebooks[vr->classbook].vlc.table, + vc->codebooks[vr->classbook].nb_bits, 3); + } + } + } } return 0; } From 09abca68025f6c20618c81f710dc7af57548b103 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Apr 2014 06:21:58 +0200 Subject: [PATCH 197/822] sws: dont use the optimized 410->420 unscaled conversion when height%4 Fixes Ticket3594 Signed-off-by: Michael Niedermayer (cherry picked from commit 421b21ca8a02a346ba03cea3bb2ecc33f791fc30) --- libswscale/swscale_unscaled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 16d2de27c5..5f1676b755 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -1585,7 +1585,7 @@ void ff_get_unscaled_swscale(SwsContext *c) c->swscale = ff_yuv2rgb_get_func_ptr(c); } - if (srcFormat == AV_PIX_FMT_YUV410P && + if (srcFormat == AV_PIX_FMT_YUV410P && !(dstH & 3) && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) && !(flags & SWS_BITEXACT)) { c->swscale = yvu9ToYv12Wrapper; From 82cebc0e0544dce507749dd9b1c2983f083de836 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 29 Apr 2014 12:03:13 +0200 Subject: [PATCH 198/822] matroskadec: read the CodecDelay element (cherry picked from commit eb3b5501e8b85bfea09d533314cb6920efc42639) Signed-off-by: Reinhard Tartler Conflicts: libavformat/matroskadec.c --- libavformat/matroska.h | 1 + libavformat/matroskadec.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/matroska.h b/libavformat/matroska.h index 0dbc724d56..667f92a720 100644 --- a/libavformat/matroska.h +++ b/libavformat/matroska.h @@ -86,6 +86,7 @@ #define MATROSKA_ID_CODECINFOURL 0x3B4040 #define MATROSKA_ID_CODECDOWNLOADURL 0x26B240 #define MATROSKA_ID_CODECDECODEALL 0xAA +#define MATROSKA_ID_CODECDELAY 0x56AA #define MATROSKA_ID_TRACKNAME 0x536E #define MATROSKA_ID_TRACKLANGUAGE 0x22B59C #define MATROSKA_ID_TRACKFLAGENABLED 0xB9 diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index bcd7d1acc2..8aae26c1c1 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -44,6 +44,7 @@ #include "libavutil/avstring.h" #include "libavutil/lzo.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #if CONFIG_ZLIB #include #endif @@ -148,6 +149,7 @@ typedef struct { MatroskaTrackVideo video; MatroskaTrackAudio audio; EbmlList encodings; + uint64_t codec_delay; AVStream *stream; int64_t end_timecode; @@ -348,6 +350,7 @@ static EbmlSyntax matroska_track[] = { { MATROSKA_ID_TRACKTYPE, EBML_UINT, 0, offsetof(MatroskaTrack,type) }, { MATROSKA_ID_CODECID, EBML_STR, 0, offsetof(MatroskaTrack,codec_id) }, { MATROSKA_ID_CODECPRIVATE, EBML_BIN, 0, offsetof(MatroskaTrack,codec_priv) }, + { MATROSKA_ID_CODECDELAY, EBML_UINT, 0, offsetof(MatroskaTrack, codec_delay) }, { MATROSKA_ID_TRACKLANGUAGE, EBML_UTF8, 0, offsetof(MatroskaTrack,language), {.s="eng"} }, { MATROSKA_ID_TRACKDEFAULTDURATION, EBML_UINT, 0, offsetof(MatroskaTrack,default_duration) }, { MATROSKA_ID_TRACKTIMECODESCALE, EBML_FLOAT,0, offsetof(MatroskaTrack,time_scale), {.f=1.0} }, @@ -1658,6 +1661,11 @@ static int matroska_read_header(AVFormatContext *s) track->time_scale = 1.0; avpriv_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ + /* convert the delay from ns to the track timebase */ + track->codec_delay = av_rescale_q(track->codec_delay, + (AVRational){ 1, 1000000000 }, + st->time_base); + st->codec->codec_id = codec_id; st->start_time = 0; if (strcmp(track->language, "und")) @@ -2190,7 +2198,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, if (cluster_time != (uint64_t)-1 && (block_time >= 0 || cluster_time >= -block_time)) { - timecode = cluster_time + block_time; + timecode = cluster_time + block_time - track->codec_delay; if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE && timecode < track->end_timecode) is_keyframe = 0; /* overlapping subtitles are not key frame */ From 79041d92ee7421853ee8c57fc13891cb0c272e0e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Apr 2014 13:40:11 +0200 Subject: [PATCH 199/822] matroska: add the Opus mapping (cherry picked from commit 141fdc763c2841b572d29a2ad78513e8d5325870) Signed-off-by: Reinhard Tartler --- libavformat/matroska.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 410e2f40c3..9628abcda1 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -32,6 +32,7 @@ const CodecTags ff_mkv_codec_tags[]={ {"A_MPEG/L2" , AV_CODEC_ID_MP2}, {"A_MPEG/L1" , AV_CODEC_ID_MP2}, {"A_MPEG/L3" , AV_CODEC_ID_MP3}, + {"A_OPUS" , AV_CODEC_ID_OPUS}, {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE}, {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE}, {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S16BE}, From e3b08b3ad4daec0950a285cf9dbfa7bbdf45f927 Mon Sep 17 00:00:00 2001 From: Stephan Soller Date: Sun, 13 Apr 2014 01:06:22 +0200 Subject: [PATCH 200/822] avformat/rtmpproto: Added handling of an initial RTMP chunk size packet. Fixes ticket #2911. Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer (cherry picked from commit 36b9c27dae452e10b4fff3d10f836160a5b8fbbd) Signed-off-by: Michael Niedermayer --- libavformat/rtmpproto.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 0b39b98124..26c4d8e0bc 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -150,6 +150,8 @@ static const uint8_t rtmp_server_key[] = { 0xE6, 0x36, 0xCF, 0xEB, 0x31, 0xAE }; +static int handle_chunk_size(URLContext *s, RTMPPacket *pkt); + static int add_tracked_method(RTMPContext *rt, const char *name, int id) { int err; @@ -408,6 +410,17 @@ static int read_connect(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmp_packet_read(rt->stream, &pkt, rt->in_chunk_size, &rt->prev_pkt[0], &rt->nb_prev_pkt[0])) < 0) return ret; + + if (pkt.type == RTMP_PT_CHUNK_SIZE) { + if ((ret = handle_chunk_size(s, &pkt)) < 0) + return ret; + + ff_rtmp_packet_destroy(&pkt); + if ((ret = ff_rtmp_packet_read(rt->stream, &pkt, rt->in_chunk_size, + &rt->prev_pkt[0], &rt->nb_prev_pkt[0])) < 0) + return ret; + } + cp = pkt.data; bytestream2_init(&gbc, cp, pkt.size); if (ff_amf_read_string(&gbc, command, sizeof(command), &stringlen)) { From 366cdd35484c64d9fc146f28470ab4f389d982d5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 14 Apr 2014 17:29:27 +0200 Subject: [PATCH 201/822] avcodec/x86/idct_sse2_xvid: fix non C99 inline function Found-by: Matt Oliver Signed-off-by: Michael Niedermayer (cherry picked from commit 46d5625f44185271862337d61cd246fd569c42a4) Signed-off-by: Michael Niedermayer --- libavcodec/x86/idct_sse2_xvid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/idct_sse2_xvid.c b/libavcodec/x86/idct_sse2_xvid.c index af4790ca92..4c5e74b98f 100644 --- a/libavcodec/x86/idct_sse2_xvid.c +++ b/libavcodec/x86/idct_sse2_xvid.c @@ -343,7 +343,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = { "movdqa %%xmm6, 4*16("dct") \n\t" \ "movdqa "SREG2", 7*16("dct") \n\t" -inline void ff_idct_xvid_sse2(short *block) +av_extern_inline void ff_idct_xvid_sse2(short *block) { __asm__ volatile( "movq "MANGLE(m127)", %%mm0 \n\t" From 26becbcd2a15bd609b4da59c5aa7bbf61ccf64bd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 01:55:08 +0200 Subject: [PATCH 202/822] swscale/swscale: fix srcStride/srcSlice typo Fixes part of Ticket3466 Found by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit 14fa7fc6a81d5e59e05243cdc92108eab1b138ac) Signed-off-by: Michael Niedermayer --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f529331f0f..4827aa69be 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -922,7 +922,7 @@ int attribute_align_arg sws_scale(struct SwsContext *c, uint8_t *dst2[4]; uint8_t *rgb0_tmp = NULL; - if (!srcSlice || !dstStride || !dst || !srcSlice) { + if (!srcStride || !dstStride || !dst || !srcSlice) { av_log(c, AV_LOG_ERROR, "One of the input parameters to sws_scale() is NULL, please check the calling code\n"); return 0; } From 1131e7a1a4c90b20830ff42dc0e33668ead612c7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 203/822] avcodec/mjpegen: Fix declared argument size Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit 256f530603ef3838a712a4fcd737b46b7bce455e) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegenc.c | 2 +- libavcodec/mjpegenc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 7487ef8f66..842528e5f1 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -487,7 +487,7 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) put_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]); } -void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[6][64]) +void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) { int i; if (s->chroma_format == CHROMA_444) { diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h index c5b05b511b..94bb652fba 100644 --- a/libavcodec/mjpegenc.h +++ b/libavcodec/mjpegenc.h @@ -61,6 +61,6 @@ void ff_mjpeg_encode_stuffing(MpegEncContext *s); void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[3], int vsample[3]); void ff_mjpeg_encode_dc(PutBitContext *pb, int val, uint8_t *huff_size, uint16_t *huff_code); -void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[6][64]); +void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]); #endif /* AVCODEC_MJPEGENC_H */ From 5191b00155b539ea4e069130c51ae7ab561cd87e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 204/822] avcodec/dcadec: fix error message suppression code Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit f202af29c93f3e9b4103c3c254a8974d7c662315) Signed-off-by: Michael Niedermayer --- libavcodec/dcadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index e7021ffddd..b5604f6ca8 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1370,7 +1370,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index) * Decode VQ encoded high frequencies */ if (s->subband_activity[k] > s->vq_start_subband[k]) { - if (!s->debug_flag & 0x01) { + if (!(s->debug_flag & 0x01)) { av_log(s->avctx, AV_LOG_DEBUG, "Stream with high frequencies VQ coding\n"); s->debug_flag |= 0x01; From 8ab849cddca157fece5ad18f05ace2bb8eed3018 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 205/822] avcodec/fic: Fix return value check Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit 230db1426d127a25c03b457fec25900653de2721) Signed-off-by: Michael Niedermayer --- libavcodec/fic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 63faef2687..6b8ac83b56 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -246,8 +246,8 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, ctx->slice_data[slice].y_off = y_off; } - if (ret = avctx->execute(avctx, fic_decode_slice, ctx->slice_data, - NULL, nslices, sizeof(ctx->slice_data[0])) < 0) + if ((ret = avctx->execute(avctx, fic_decode_slice, ctx->slice_data, + NULL, nslices, sizeof(ctx->slice_data[0]))) < 0) return ret; skip: From 27a3a59428e711181a562c101657ed391faba790 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 206/822] avformat/mpegts: Remove redundant check Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit ff6fa0b4b980fc5b9f7653d7b159ae02c3d95210) Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 242d353399..286b30b4f2 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1370,7 +1370,7 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_le AVStream *st; if (ts->pids[pid]->es_id != mp4_descr[i].es_id) continue; - if (!(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES)) { + if (ts->pids[pid]->type != MPEGTS_PES) { av_log(s, AV_LOG_ERROR, "pid %x is not PES\n", pid); continue; } From 10e023c4fa73269ab9f65339c919cb113700c08c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 207/822] avcodec/diracdec: fix undefined behavior with shifts Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit b8598f6ce61ccda3f2ff0c730b009fb650e42986) Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 0ab74749d5..8ab0eb0872 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1355,8 +1355,8 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5], motion_y >>= s->chroma_y_shift; } - mx = motion_x & ~(-1 << s->mv_precision); - my = motion_y & ~(-1 << s->mv_precision); + mx = motion_x & ~(-1U << s->mv_precision); + my = motion_y & ~(-1U << s->mv_precision); motion_x >>= s->mv_precision; motion_y >>= s->mv_precision; /* normalize subpel coordinates to epel */ From fc5b32877a47dcdb88734f2becfb7ad5155cb73d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:55:13 +0200 Subject: [PATCH 208/822] avcodec/g723_1: add assert to help static code analyzers Signed-off-by: Michael Niedermayer (cherry picked from commit 1457f3fd90e17745791354fbb87899fc4803085a) Signed-off-by: Michael Niedermayer --- libavcodec/g723_1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 09da7665b8..e4bde2afd1 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -2285,7 +2285,8 @@ static int pack_bitstream(G723_1_Context *p, unsigned char *frame, int size) if (p->cur_rate == RATE_6300) { info_bits = 0; put_bits(&pb, 2, info_bits); - } + }else + av_assert0(0); put_bits(&pb, 8, p->lsp_index[2]); put_bits(&pb, 8, p->lsp_index[1]); From 83fb31a76da133747a22e3776c1c67da3d0ffb78 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 209/822] avfilter/f_select: fix loss of precission in SAD calculation Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit 5a8ef3c66b762f265b05aa096105555f1d26879c) Signed-off-by: Michael Niedermayer --- libavfilter/f_select.c | 2 +- tests/ref/fate/filter-metadata-scenedetect | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index ec84da8a84..1ffc00652c 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -279,7 +279,7 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *frame) p2 += 8 * linesize; } emms_c(); - mafd = nb_sad ? sad / nb_sad : 0; + mafd = nb_sad ? (double)sad / nb_sad : 0; diff = fabs(mafd - select->prev_mafd); ret = av_clipf(FFMIN(mafd, diff) / 100., 0, 1); select->prev_mafd = mafd; diff --git a/tests/ref/fate/filter-metadata-scenedetect b/tests/ref/fate/filter-metadata-scenedetect index 67251dfe60..4e70723fe8 100644 --- a/tests/ref/fate/filter-metadata-scenedetect +++ b/tests/ref/fate/filter-metadata-scenedetect @@ -1,10 +1,10 @@ pkt_pts=1620|tag:lavfi.scene_score=1.000000 -pkt_pts=4140|tag:lavfi.scene_score=0.880000 +pkt_pts=4140|tag:lavfi.scene_score=0.876043 pkt_pts=5800|tag:lavfi.scene_score=1.000000 -pkt_pts=6720|tag:lavfi.scene_score=0.460000 +pkt_pts=6720|tag:lavfi.scene_score=0.463259 pkt_pts=8160|tag:lavfi.scene_score=1.000000 pkt_pts=9760|tag:lavfi.scene_score=1.000000 -pkt_pts=14080|tag:lavfi.scene_score=0.840000 +pkt_pts=14080|tag:lavfi.scene_score=0.841420 pkt_pts=15700|tag:lavfi.scene_score=1.000000 -pkt_pts=18500|tag:lavfi.scene_score=0.470000 +pkt_pts=18500|tag:lavfi.scene_score=0.471738 pkt_pts=21760|tag:lavfi.scene_score=1.000000 From 16a9c5ea9e68ec647b1b0411d3000ef39ffcdb50 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 210/822] avfilter/vf_deshake: fix loss of precission with odd resolutions Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit 73734282e0e4df92269984ee1671424e39249481) Signed-off-by: Michael Niedermayer --- libavfilter/vf_deshake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 1d62c440a6..f77a9bd445 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -306,8 +306,8 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2, //av_log(NULL, AV_LOG_ERROR, "\n"); } - p_x = (center_x - width / 2); - p_y = (center_y - height / 2); + p_x = (center_x - width / 2.0); + p_y = (center_y - height / 2.0); t->vector.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y; t->vector.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y; From afd1f6194447bd7d983f54e6cbbe154e4bbe4f4a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Apr 2014 02:06:37 +0200 Subject: [PATCH 211/822] iavcodec/vc1dec: Fix missing {} Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer (cherry picked from commit cb53beb81a5b9192c79de401f1e1e13fadddc429) Signed-off-by: Michael Niedermayer --- libavcodec/vc1dec.c | 3 ++- tests/ref/fate/vc1_sa10143 | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 30fee4756f..593e69f9f9 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1912,9 +1912,10 @@ static void vc1_interp_mc(VC1Context *v) uvmx = (mx + ((mx & 3) == 3)) >> 1; uvmy = (my + ((my & 3) == 3)) >> 1; if (v->field_mode) { - if (v->cur_field_type != v->ref_field_type[1]) + if (v->cur_field_type != v->ref_field_type[1]) { my = my - 2 + 4 * v->cur_field_type; uvmy = uvmy - 2 + 4 * v->cur_field_type; + } } if (v->fastuvmc) { uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1)); diff --git a/tests/ref/fate/vc1_sa10143 b/tests/ref/fate/vc1_sa10143 index 6a5137f712..c0ecc3bb9d 100644 --- a/tests/ref/fate/vc1_sa10143 +++ b/tests/ref/fate/vc1_sa10143 @@ -1,31 +1,31 @@ #tb 0: 1/25 0, 0, 0, 1, 518400, 0x89407f55 -0, 2, 2, 1, 518400, 0x8611849c +0, 2, 2, 1, 518400, 0xaa896afd 0, 3, 3, 1, 518400, 0x0e69ff59 -0, 4, 4, 1, 518400, 0xf31adb03 +0, 4, 4, 1, 518400, 0x0c30bfa0 0, 5, 5, 1, 518400, 0x1a5b6a69 -0, 6, 6, 1, 518400, 0x6ae6232e +0, 6, 6, 1, 518400, 0x23470858 0, 7, 7, 1, 518400, 0x9a4e3c54 -0, 8, 8, 1, 518400, 0xe5852b45 +0, 8, 8, 1, 518400, 0xad63160b 0, 9, 9, 1, 518400, 0x0fcfeebc -0, 10, 10, 1, 518400, 0x06e22dc3 +0, 10, 10, 1, 518400, 0x20b31777 0, 11, 11, 1, 518400, 0x9d79df09 -0, 12, 12, 1, 518400, 0xcb2c716f +0, 12, 12, 1, 518400, 0x3e86766f 0, 13, 13, 1, 518400, 0x638a8746 -0, 14, 14, 1, 518400, 0xf7032efd +0, 14, 14, 1, 518400, 0x7a6c1a0e 0, 15, 15, 1, 518400, 0x306f6cef -0, 16, 16, 1, 518400, 0xe83d2518 +0, 16, 16, 1, 518400, 0x81f81281 0, 17, 17, 1, 518400, 0x49ab5bf5 -0, 18, 18, 1, 518400, 0x6b336b6f +0, 18, 18, 1, 518400, 0x8f316e44 0, 19, 19, 1, 518400, 0x95ae00c9 -0, 20, 20, 1, 518400, 0x68ddb64f +0, 20, 20, 1, 518400, 0xf71bb7f5 0, 21, 21, 1, 518400, 0x5205ea68 -0, 22, 22, 1, 518400, 0xb088e617 +0, 22, 22, 1, 518400, 0x74a1d8b9 0, 23, 23, 1, 518400, 0xa3217616 -0, 24, 24, 1, 518400, 0x1723bc53 +0, 24, 24, 1, 518400, 0x2b28bbf8 0, 25, 25, 1, 518400, 0xf024872a -0, 26, 26, 1, 518400, 0x2e81a8bb +0, 26, 26, 1, 518400, 0x2fdbaaf3 0, 27, 27, 1, 518400, 0xa3a2418e -0, 28, 28, 1, 518400, 0xb7beffed +0, 28, 28, 1, 518400, 0x55bfe435 0, 29, 29, 1, 518400, 0x50fb6c94 0, 30, 30, 1, 518400, 0x5584bb40 From c588316555f9c793e7ae86b98c2d49855c424fb3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 21 Apr 2014 11:33:17 +0200 Subject: [PATCH 212/822] avfilter/filtfmts: Support dynamically allocated in/outputs Fixes crash Fixes Ticket3468 Signed-off-by: Michael Niedermayer (cherry picked from commit 59c7615d58b5b7ea9caff2c8c774677973eb4f1c) Signed-off-by: Michael Niedermayer --- libavfilter/filtfmts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/filtfmts.c b/libavfilter/filtfmts.c index e6c9b039be..b3efa78343 100644 --- a/libavfilter/filtfmts.c +++ b/libavfilter/filtfmts.c @@ -38,7 +38,7 @@ static void print_formats(AVFilterContext *filter_ctx) for (j = 0; j < fmts->nb_formats; j++) \ if(av_get_pix_fmt_name(fmts->formats[j])) \ printf(#INOUT "PUT[%d] %s: fmt:%s\n", \ - i, filter_ctx->filter->inout##puts[i].name, \ + i, filter_ctx->inout##put_pads[i].name, \ av_get_pix_fmt_name(fmts->formats[j])); \ } else if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_AUDIO) { \ AVFilterFormats *fmts; \ @@ -47,7 +47,7 @@ static void print_formats(AVFilterContext *filter_ctx) fmts = filter_ctx->inout##puts[i]->outin##_formats; \ for (j = 0; j < fmts->nb_formats; j++) \ printf(#INOUT "PUT[%d] %s: fmt:%s\n", \ - i, filter_ctx->filter->inout##puts[i].name, \ + i, filter_ctx->inout##put_pads[i].name, \ av_get_sample_fmt_name(fmts->formats[j])); \ \ layouts = filter_ctx->inout##puts[i]->outin##_channel_layouts; \ @@ -56,7 +56,7 @@ static void print_formats(AVFilterContext *filter_ctx) av_get_channel_layout_string(buf, sizeof(buf), -1, \ layouts->channel_layouts[j]); \ printf(#INOUT "PUT[%d] %s: chlayout:%s\n", \ - i, filter_ctx->filter->inout##puts[i].name, buf); \ + i, filter_ctx->inout##put_pads[i].name, buf); \ } \ } \ } \ @@ -113,12 +113,12 @@ int main(int argc, char **argv) /* create a link for each of the input pads */ for (i = 0; i < filter_ctx->nb_inputs; i++) { AVFilterLink *link = av_mallocz(sizeof(AVFilterLink)); - link->type = filter_ctx->filter->inputs[i].type; + link->type = filter_ctx->input_pads[i].type; filter_ctx->inputs[i] = link; } for (i = 0; i < filter_ctx->nb_outputs; i++) { AVFilterLink *link = av_mallocz(sizeof(AVFilterLink)); - link->type = filter_ctx->filter->outputs[i].type; + link->type = filter_ctx->output_pads[i].type; filter_ctx->outputs[i] = link; } From f1b5830182086905c412042f34ede7782dde9919 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 23 Apr 2014 21:47:48 +0200 Subject: [PATCH 213/822] avformat/h263dec: Fix h263 probe The code was missing 1 bit in the src format Signed-off-by: Michael Niedermayer (cherry picked from commit fc145e576a443bfc89efdf35b91fd3c9ca0d8388) Signed-off-by: Michael Niedermayer --- libavformat/h263dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/h263dec.c b/libavformat/h263dec.c index e6e0345b69..19ed6a94ca 100644 --- a/libavformat/h263dec.c +++ b/libavformat/h263dec.c @@ -35,7 +35,7 @@ static int h263_probe(AVProbeData *p) for(i=0; ibuf_size; i++){ code = (code<<8) + p->buf[i]; if ((code & 0xfffffc0000) == 0x800000) { - src_fmt= (code>>2)&3; + src_fmt= (code>>2)&7; if( src_fmt != last_src_fmt && last_src_fmt>0 && last_src_fmt<6 && src_fmt<6) From 2d18e7f3ef05532aac8aa4d455b6b1b5a1377456 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 27 Apr 2014 05:32:56 +0200 Subject: [PATCH 214/822] avcodec/mjpegdec: Fix undefined shift Fixes CID1194388 Signed-off-by: Michael Niedermayer (cherry picked from commit b4329605289e25bb071ec1c1182bf25fc83b09aa) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index cb8f2b9660..2c79da533c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1251,7 +1251,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, } if (!Al) { - s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss); + s->coefs_finished[c] |= (2LL << se) - (1LL << ss); last_scan = !~s->coefs_finished[c]; } From 56436683085b17aa47e83521cef8703728b64358 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 27 Apr 2014 03:45:12 +0200 Subject: [PATCH 215/822] ffmpeg_filter: fix pointer to local outside scope Fixes CID1206652 Signed-off-by: Michael Niedermayer (cherry picked from commit 09b16619d33ddf93005060d0782f28a1c1cbb7f6) Signed-off-by: Michael Niedermayer --- ffmpeg_filter.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 9d945fca49..582c66183d 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -44,12 +44,15 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target); int has_alpha = desc ? desc->nb_components % 2 == 0 : 0; enum AVPixelFormat best= AV_PIX_FMT_NONE; + const enum AVPixelFormat mjpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE }; + const enum AVPixelFormat ljpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE }; + if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) { if (st->codec->codec_id == AV_CODEC_ID_MJPEG) { - p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE }; + p = mjpeg_formats; } else if (st->codec->codec_id == AV_CODEC_ID_LJPEG) { - p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P, - AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE }; + p =ljpeg_formats; } } for (; *p != AV_PIX_FMT_NONE; p++) { From 02b7b125b52216dae7415c57eafd57208d63baa6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 28 Apr 2014 04:01:50 +0200 Subject: [PATCH 216/822] avfilter/graphdump: Fix pointer to local outside scope Fixes CID1194435 Signed-off-by: Michael Niedermayer (cherry picked from commit 18af0ce62da322176f7bd283b85314d2f41bee2c) Signed-off-by: Michael Niedermayer --- libavfilter/graphdump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/graphdump.c b/libavfilter/graphdump.c index 1b5932115b..3d702c6af5 100644 --- a/libavfilter/graphdump.c +++ b/libavfilter/graphdump.c @@ -31,9 +31,10 @@ static int print_link_prop(AVBPrint *buf, AVFilterLink *link) { char *format; char layout[64]; + AVBPrint dummy_buffer = { 0 }; if (!buf) - buf = &(AVBPrint){ 0 }; /* dummy buffer */ + buf = &dummy_buffer; switch (link->type) { case AVMEDIA_TYPE_VIDEO: format = av_x_if_null(av_get_pix_fmt_name(link->format), "?"); From 9d0ff6436ef748f9f81eb5e4cfe93c34461a9997 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 31 Mar 2014 04:31:28 +0200 Subject: [PATCH 217/822] ffmpeg: print an error at the end if conversion failed Fixes Ticket3477 Signed-off-by: Michael Niedermayer (cherry picked from commit fed0acebade8d27c428da5cad483cd6a5b64b354) Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 1d3cfd4c03..5caac1f36f 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -514,6 +514,8 @@ static void ffmpeg_cleanup(int ret) if (received_sigterm) { av_log(NULL, AV_LOG_INFO, "Received signal %d: terminating.\n", (int) received_sigterm); + } else if (ret) { + av_log(NULL, AV_LOG_INFO, "Conversion failed!\n"); } term_exit(); } From c9c223ba0028498969019d4c133375b7c8d6c240 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Wed, 30 Apr 2014 20:49:52 +0200 Subject: [PATCH 218/822] lavd/opengl_enc: fix pixel data alignment Signed-off-by: Lukasz Marek Signed-off-by: Michael Niedermayer (cherry picked from commit 8ff72924cfeb3c8fa8fc57cfea3f78ca0caaec0f) Signed-off-by: Michael Niedermayer --- libavdevice/opengl_enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 1b993906f8..5ca0c02d07 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -1204,6 +1204,8 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt) glClear(GL_COLOR_BUFFER_BIT); if (!repaint) { + if (is_pkt) + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); LOAD_TEXTURE_DATA(0, 0) if (desc->flags & AV_PIX_FMT_FLAG_PLANAR) { LOAD_TEXTURE_DATA(1, 1) From c2eb668617555cb8b8bcfb9796241ada9471ac65 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 5 May 2014 00:41:34 +0200 Subject: [PATCH 219/822] Update for 2.2.2 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index c043eea776..b1b25a5ffa 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.1 +2.2.2 diff --git a/VERSION b/VERSION index c043eea776..b1b25a5ffa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.1 +2.2.2 diff --git a/doc/Doxyfile b/doc/Doxyfile index 765785b801..3f1e1f8ece 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.1 +PROJECT_NUMBER = 2.2.2 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From b3d8276d2dc913d708d187fb15f6e98869d00500 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Sat, 12 Apr 2014 22:11:52 +0200 Subject: [PATCH 220/822] dcadec: Do not decode the XCh extension when downmixing to stereo This is neither necessary nor currently supported. Signed-off-by: Luca Barbato (cherry picked from commit c8cf461c19e8e35df4b7364d9b90aa42f1ab4560) --- libavcodec/dcadec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 6c240ee5fd..cfce654561 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1856,6 +1856,16 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, if (s->amode < 16) { avctx->channel_layout = dca_core_channel_layout[s->amode]; + if (s->prim_channels + !!s->lfe > 2 && + avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) { + /* + * Neither the core's auxiliary data nor our default tables contain + * downmix coefficients for the additional channel coded in the XCh + * extension, so when we're doing a Stereo downmix, don't decode it. + */ + s->xch_disable = 1; + } + #if FF_API_REQUEST_CHANNELS FF_DISABLE_DEPRECATION_WARNINGS if (s->xch_present && !s->xch_disable && From 194d12345d86c15b20b7e44a3679c9df3075d7f6 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Sat, 12 Apr 2014 22:11:53 +0200 Subject: [PATCH 221/822] dcadec: Use correct channel count in stereo downmix check s->prim_channels is greater than num_core_channels when an XCh extension is present in the bitstream. Signed-off-by: Luca Barbato (cherry picked from commit 801c39e1e3058fc4ba822bfb5d8612d777111e32) --- libavcodec/dcadec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index cfce654561..ce8660d2b0 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1896,7 +1896,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->channel_order_tab[channels - 1 - !!s->lfe] < 0) return AVERROR_INVALIDDATA; - if (s->prim_channels + !!s->lfe > 2 && + if (num_core_channels + !!s->lfe > 2 && avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) { channels = 2; s->output = s->prim_channels == 2 ? s->amode : DCA_STEREO; @@ -1910,7 +1910,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (s->core_downmix && (s->core_downmix_amode == DCA_STEREO || s->core_downmix_amode == DCA_STEREO_TOTAL)) { int sign, code; - for (i = 0; i < s->prim_channels + !!s->lfe; i++) { + for (i = 0; i < num_core_channels + !!s->lfe; i++) { sign = s->core_downmix_codes[i][0] & 0x100 ? 1 : -1; code = s->core_downmix_codes[i][0] & 0x0FF; s->downmix_coef[i][0] = (!code ? 0.0f : @@ -1928,19 +1928,19 @@ FF_ENABLE_DEPRECATION_WARNINGS "Invalid channel mode %d\n", am); return AVERROR_INVALIDDATA; } - if (s->prim_channels + !!s->lfe > + if (num_core_channels + !!s->lfe > FF_ARRAY_ELEMS(dca_default_coeffs[0])) { avpriv_request_sample(s->avctx, "Downmixing %d channels", s->prim_channels + !!s->lfe); return AVERROR_PATCHWELCOME; } - for (i = 0; i < s->prim_channels + !!s->lfe; i++) { + for (i = 0; i < num_core_channels + !!s->lfe; i++) { s->downmix_coef[i][0] = dca_default_coeffs[am][i][0]; s->downmix_coef[i][1] = dca_default_coeffs[am][i][1]; } } av_dlog(s->avctx, "Stereo downmix coeffs:\n"); - for (i = 0; i < s->prim_channels + !!s->lfe; i++) { + for (i = 0; i < num_core_channels + !!s->lfe; i++) { av_dlog(s->avctx, "L, input channel %d = %f\n", i, s->downmix_coef[i][0]); av_dlog(s->avctx, "R, input channel %d = %f\n", i, From 428b629eb28907738ae98331b9f6c25cc9a8f3c8 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 2 May 2014 00:18:04 +0200 Subject: [PATCH 222/822] vp9: Read the frame size as unsigned Sample-Id: 00001723-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit 925c37874b617816b6f460c6f229c18b46548b46) --- libavcodec/vp9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index c04a3b8fc3..2a6a138aa1 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1198,7 +1198,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame, const uint8_t *idx = data + size + 1 - idx_sz; while (n_frames--) { - int sz = AV_RL32(idx); + unsigned sz = AV_RL32(idx); if (nbytes < 4) sz &= (1 << (8 * nbytes)) - 1; @@ -1206,7 +1206,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame, if (sz > size) { av_log(avctx, AV_LOG_ERROR, - "Superframe packet size too big: %d > %d\n", + "Superframe packet size too big: %u > %d\n", sz, size); return AVERROR_INVALIDDATA; } From a56a9e65c6a17dd8b6303dd45bdc3e3368093092 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 2 May 2014 00:21:23 +0200 Subject: [PATCH 223/822] swscale: Fix an undefined behaviour Prevent a division by zero down the codepath. Sample-Id: 00001721-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit 3a177a9cca924e097265b32f9282814f6b653e08) --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 2111fc2a62..ea5f36833e 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -326,7 +326,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, xDstInSrc = xInc - 0x10000; for (i = 0; i < dstW; i++) { - int xx = (xDstInSrc - ((filterSize - 2) << 16)) / (1 << 17); + int xx = (xDstInSrc - ((int64_t)(filterSize - 2) << 16)) / (1 << 17); int j; (*filterPos)[i] = xx; for (j = 0; j < filterSize; j++) { From 7d97cc8d87ebf6ebe7ec1865d6f932c652dbce3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 8 May 2014 15:12:23 +0300 Subject: [PATCH 224/822] rtmpproto: Check the buffer sizes when copying app/playpath strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As pointed out by Reimar Döffinger. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 0bacfa8d37710b904897e7cbeb8d6f96fbf75e2e) Conflicts: libavformat/rtmpproto.c --- libavformat/rtmpproto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index bc6a4fef69..ead5ccd57a 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2483,10 +2483,10 @@ reconnect: fname = strchr(p + 1, '/'); if (!fname || (c && c < fname)) { fname = p + 1; - av_strlcpy(rt->app, path + 1, p - path); + av_strlcpy(rt->app, path + 1, FFMIN(p - path, APP_MAX_LENGTH)); } else { fname++; - av_strlcpy(rt->app, path + 1, fname - path - 1); + av_strlcpy(rt->app, path + 1, FFMIN(fname - path - 1, APP_MAX_LENGTH)); } } } From 6c3985713b77c5c1155f31c3fbb8236f9b4cdfb5 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 10 May 2014 10:01:31 -0400 Subject: [PATCH 225/822] Add missing changelog entries for v10 --- Changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Changelog b/Changelog index 29902f42b4..9a1fe51016 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,13 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10: +- af_channelmap: fix ONE_STR mapping mode +- matroskaenc: HEVC fixeswrite private data in hvcC format for HEVC. +- doc: Point to the correct, actually maintained gas-preprocessor repo +- http: Add support reading ICY metadata +- configure: Support older version of openjpeg1 + version 10~beta2: - compand audio filter - and many various smaller fixes, for a full changelog, please refer to: From e2a83d72da866a29f5307a56f66c469966f02473 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 10 May 2014 10:05:03 -0400 Subject: [PATCH 226/822] Update Changelog for v10.1 --- Changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Changelog b/Changelog index 9a1fe51016..967a09eb6a 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,19 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.1: +- rtmpproto: Check the buffer sizes when copying app/playpath strings +- swscale: Fix an undefined behaviour +- vp9: Read the frame size as unsigned +- dcadec: Use correct channel count in stereo downmix check +- dcadec: Do not decode the XCh extension when downmixing to stereo +- matroska: add the Opus mapping +- matroskadec: read the CodecDelay element +- rtmpproto: Make sure to pass on the error code if read_connect failed +- lavr: allocate the resampling buffer with a positive size +- mp3enc: Properly write bitrate value in XING header (debian/736088) +- golomb: Fix the implementation of get_se_golomb_long + version 10: - af_channelmap: fix ONE_STR mapping mode - matroskaenc: HEVC fixeswrite private data in hvcC format for HEVC. From ff79f6b35a94dde69b3d52bd2abdfdb793f525c3 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 5 Mar 2014 10:41:33 +0100 Subject: [PATCH 227/822] avfilter: Add missing emms_c when needed Arch specific calls should have an emms_c following to keep the cpu state consistent. Reported-By: wm4 CC: libav-stable@libav.org (cherry picked from commit e995cf1bccc6e91bbaa6a8771e23fb3ab259c110) --- libavfilter/af_volume.c | 2 ++ libavfilter/vf_gradfun.c | 1 + libavfilter/vf_hqdn3d.c | 1 + 3 files changed, 4 insertions(+) diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 12d496ed4d..59223e548b 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -278,6 +278,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) } } + emms_c(); + if (buf != out_buf) av_frame_free(&buf); diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 79f6790f30..f7c4372dd3 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -118,6 +118,7 @@ static void filter(GradFunContext *ctx, uint8_t *dst, uint8_t *src, int width, i ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]); if (++y >= height) break; } + emms_c(); } static av_cold int init(AVFilterContext *ctx) diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index cd9f0d2856..be6b7616b6 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -147,6 +147,7 @@ static void denoise_depth(HQDN3DContext *s, else denoise_temporal(src, dst, frame_ant, w, h, sstride, dstride, temporal, depth); + emms_c(); } #define denoise(...) \ From 40ffa99dfa39c574d8784a3c4eaf6406198d675d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 5 Mar 2014 12:44:57 +0100 Subject: [PATCH 228/822] arm: hpeldsp: prevent overreads in armv6 asm Based on a patch by Russel King Bug-Id: 646 CC: libav-stable@libav.org (cherry picked from commit cbddee1cca0ebd01e8c5aa694d31228eb4de4b41) --- libavcodec/arm/hpeldsp_armv6.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/arm/hpeldsp_armv6.S b/libavcodec/arm/hpeldsp_armv6.S index f1abc328eb..984e0f0e32 100644 --- a/libavcodec/arm/hpeldsp_armv6.S +++ b/libavcodec/arm/hpeldsp_armv6.S @@ -132,11 +132,12 @@ function ff_put_pixels8_y2_armv6, export=1 uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r10, r4, r6 eor r6, r4, r6 uhadd8 r11, r5, r7 @@ -193,9 +194,10 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uhadd8 r9, r5, r7 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r12, r4, r6 ldrc_pre ne, r6, r1, r2 uhadd8 r14, r5, r7 From 1bd6372cd34935815c0a061adbf3bc68ca68ff73 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 8 Mar 2014 11:52:14 +0100 Subject: [PATCH 229/822] arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6 The overread avoidance fix in cbddee1cca0ebd01e8c5aa694d31228eb4de4b41 broke the computation for the last row since it prevented the safe reading from the height+1-th row. CC: libav-stable@libav.org (cherry picked from commit 61985ad72c47bbb668f2d3923bf5c9df83e79323) --- libavcodec/arm/hpeldsp_armv6.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/arm/hpeldsp_armv6.S b/libavcodec/arm/hpeldsp_armv6.S index 984e0f0e32..f1abc328eb 100644 --- a/libavcodec/arm/hpeldsp_armv6.S +++ b/libavcodec/arm/hpeldsp_armv6.S @@ -132,12 +132,11 @@ function ff_put_pixels8_y2_armv6, export=1 uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldrc_pre ne, r4, r1, r2 + ldr_pre r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 - it ne - ldrne r5, [r1, #4] + ldr r5, [r1, #4] uhadd8 r10, r4, r6 eor r6, r4, r6 uhadd8 r11, r5, r7 @@ -194,10 +193,9 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldrc_pre ne, r4, r1, r2 + ldr_pre r4, r1, r2 uhadd8 r9, r5, r7 - it ne - ldrne r5, [r1, #4] + ldr r5, [r1, #4] uhadd8 r12, r4, r6 ldrc_pre ne, r6, r1, r2 uhadd8 r14, r5, r7 From 8e9e57ed0c7f40741da1ca83e52c851263e0c168 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Mon, 3 Mar 2014 20:20:14 +0000 Subject: [PATCH 230/822] Update Changelog --- Changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog b/Changelog index 967a09eb6a..48dcc18405 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,9 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 10.1: +- arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6 +- arm: hpeldsp: prevent overreads in armv6 asm (bug/646) +- avfilter: Add missing emms_c when needed - rtmpproto: Check the buffer sizes when copying app/playpath strings - swscale: Fix an undefined behaviour - vp9: Read the frame size as unsigned From 7f954ca502a16feeca44d4e9a7d450b404dabc94 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 2 Apr 2014 09:11:10 +0200 Subject: [PATCH 231/822] avi: Improve non-interleaved detection Additional fixes by Nigel Touati-Evans . Check the index for streams with a time drift of 2s or a buffer drift of 64MB. Bug-Id: 666 CC: libav-stable@libav.org Sample-Id: yet-another-broken-interleaved-avi.avi Signed-off-by: Vittorio Giovara Signed-off-by: Luca Barbato Signed-off-by: Diego Biurrun (cherry picked from commit 9d599e3f6e61438772d8cddd6c9b7c495251f51e) Signed-off-by: Reinhard Tartler --- Changelog | 1 + libavformat/avidec.c | 70 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 48dcc18405..fd49c6fd44 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 10.1: +- avi: Improve non-interleaved detection (bug/666) - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6 - arm: hpeldsp: prevent overreads in armv6 asm (bug/646) - avfilter: Add missing emms_c when needed diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 6f80d2119a..e851f0b2fa 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -795,7 +795,11 @@ fail: if (!avi->index_loaded && pb->seekable) avi_load_index(s); avi->index_loaded = 1; - avi->non_interleaved |= guess_ni_flag(s); + + if ((ret = guess_ni_flag(s)) < 0) + return ret; + + avi->non_interleaved |= ret; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; if (st->nb_index_entries) @@ -1307,6 +1311,64 @@ static int avi_read_idx1(AVFormatContext *s, int size) return 0; } +/* Scan the index and consider any file with streams more than + * 2 seconds or 64MB apart non-interleaved. */ +static int check_stream_max_drift(AVFormatContext *s) +{ + int64_t min_pos, pos; + int i; + int *idx = av_mallocz_array(s->nb_streams, sizeof(*idx)); + if (!idx) + return AVERROR(ENOMEM); + + for (min_pos = pos = 0; min_pos != INT64_MAX; pos = min_pos + 1LU) { + int64_t max_dts = INT64_MIN / 2; + int64_t min_dts = INT64_MAX / 2; + int64_t max_buffer = 0; + + min_pos = INT64_MAX; + + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + AVIStream *ast = st->priv_data; + int n = st->nb_index_entries; + while (idx[i] < n && st->index_entries[idx[i]].pos < pos) + idx[i]++; + if (idx[i] < n) { + int64_t dts; + dts = av_rescale_q(st->index_entries[idx[i]].timestamp / + FFMAX(ast->sample_size, 1), + st->time_base, AV_TIME_BASE_Q); + min_dts = FFMIN(min_dts, dts); + min_pos = FFMIN(min_pos, st->index_entries[idx[i]].pos); + } + } + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + AVIStream *ast = st->priv_data; + + if (idx[i] && min_dts != INT64_MAX / 2) { + int64_t dts; + dts = av_rescale_q(st->index_entries[idx[i] - 1].timestamp / + FFMAX(ast->sample_size, 1), + st->time_base, AV_TIME_BASE_Q); + max_dts = FFMAX(max_dts, dts); + max_buffer = FFMAX(max_buffer, + av_rescale(dts - min_dts, + st->codec->bit_rate, + AV_TIME_BASE)); + } + } + if (max_dts - min_dts > 2 * AV_TIME_BASE || + max_buffer > 1024 * 1024 * 8 * 8) { + av_free(idx); + return 1; + } + } + av_free(idx); + return 0; +} + static int guess_ni_flag(AVFormatContext *s) { int i; @@ -1336,7 +1398,11 @@ static int guess_ni_flag(AVFormatContext *s) first_end = st->index_entries[n - 1].pos; } avio_seek(s->pb, oldpos, SEEK_SET); - return last_start > first_end; + + if (last_start > first_end) + return 1; + + return check_stream_max_drift(s); } static int avi_load_index(AVFormatContext *s) From e780c3daafe0588e035e752c771ebfcd2201746a Mon Sep 17 00:00:00 2001 From: nu774 Date: Fri, 9 May 2014 21:47:41 +0900 Subject: [PATCH 232/822] pcm-dvd: Fix 20bit decoding Increment the pointer as needed. Bug-Id: 592 Signed-off-by: Luca Barbato (cherry picked from commit 9880a0d4b131ef36694d62f78060350a81f08b80) Signed-off-by: Reinhard Tartler --- Changelog | 1 + libavcodec/pcm-dvd.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index fd49c6fd44..30e63c9cf2 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 10.1: +- pcm-dvd: Fix 20bit decoding (bug/592) - avi: Improve non-interleaved detection (bug/666) - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6 - arm: hpeldsp: prevent overreads in armv6 asm (bug/646) diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c index 172e93ae82..0872d293b0 100644 --- a/libavcodec/pcm-dvd.c +++ b/libavcodec/pcm-dvd.c @@ -177,11 +177,11 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src, dst32[2] = bytestream2_get_be16u(&gb) << 16; dst32[3] = bytestream2_get_be16u(&gb) << 16; t = bytestream2_get_byteu(&gb); - *dst32 += (t & 0xf0) << 8; - *dst32 += (t & 0x0f) << 12; + *dst32++ += (t & 0xf0) << 8; + *dst32++ += (t & 0x0f) << 12; t = bytestream2_get_byteu(&gb); - *dst32 += (t & 0xf0) << 8; - *dst32 += (t & 0x0f) << 12; + *dst32++ += (t & 0xf0) << 8; + *dst32++ += (t & 0x0f) << 12; } } while (--blocks); return dst32; From 2b14d980863d7a4044d20978ba5b3bda1c96f607 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 11 Mar 2014 19:18:23 +0100 Subject: [PATCH 233/822] avformat/avidec: Check required demuxing buffer sizes in guess_ni_flag() Fixes Ticket3421 Signed-off-by: Michael Niedermayer (cherry picked from commit 5d75730c58f72918a41bb5abda4b448ecdd4273c) Signed-off-by: Michael Niedermayer --- libavformat/avidec.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 0e38281c03..27f87dadb0 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1493,6 +1493,7 @@ static int guess_ni_flag(AVFormatContext *s) return 0; for (min_pos=pos=0; min_pos!=INT64_MAX; pos= min_pos+1LU) { int64_t max_dts = INT64_MIN/2, min_dts= INT64_MAX/2; + int64_t max_buffer = 0; min_pos = INT64_MAX; for (i=0; inb_streams; i++) { @@ -1505,10 +1506,20 @@ static int guess_ni_flag(AVFormatContext *s) min_dts = FFMIN(min_dts, av_rescale_q(st->index_entries[idx[i]].timestamp/FFMAX(ast->sample_size, 1), st->time_base, AV_TIME_BASE_Q)); min_pos = FFMIN(min_pos, st->index_entries[idx[i]].pos); } - if (idx[i]) - max_dts = FFMAX(max_dts, av_rescale_q(st->index_entries[idx[i]-1].timestamp/FFMAX(ast->sample_size, 1), st->time_base, AV_TIME_BASE_Q)); } - if (max_dts - min_dts > 2*AV_TIME_BASE) { + for (i=0; inb_streams; i++) { + AVStream *st = s->streams[i]; + AVIStream *ast = st->priv_data; + + if (idx[i] && min_dts != INT64_MAX/2) { + int64_t dts = av_rescale_q(st->index_entries[idx[i]-1].timestamp/FFMAX(ast->sample_size, 1), st->time_base, AV_TIME_BASE_Q); + max_dts = FFMAX(max_dts, dts); + max_buffer = FFMAX(max_buffer, av_rescale(dts - min_dts, st->codec->bit_rate, AV_TIME_BASE)); + } + } + if (max_dts - min_dts > 2*AV_TIME_BASE || + max_buffer > 1024 * 1024 * 8 *8 + ) { av_free(idx); return 1; } From bc0c49b83e4b4b06f421820f6cc903834872f70c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 2 Apr 2014 19:04:58 +0200 Subject: [PATCH 234/822] avformat/avidec: remove unused variables Signed-off-by: Michael Niedermayer (cherry picked from commit cc8b45c0ce35465fd0efee7103e41bcc28251f99) Signed-off-by: Michael Niedermayer --- libavformat/avidec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index b51350478e..9b706b2d96 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1522,7 +1522,6 @@ static int guess_ni_flag(AVFormatContext *s) int64_t last_start = 0; int64_t first_end = INT64_MAX; int64_t oldpos = avio_tell(s->pb); - int64_t min_pos, pos; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; From bb01956d67f9515c0b8d77ab7800cc3bda010033 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 12 May 2014 18:12:28 +0200 Subject: [PATCH 235/822] Use Matroska document version 2 for WebM files if possible. Google's plugin for the Internet Explorer refuses to play files with another document version. Fixes ticket #3583. (cherry picked from commit ab21acecc72a0299895583cf83347ab5e2444b71) --- libavformat/matroskaenc.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 7d83665f94..21cf3336ca 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1088,7 +1088,7 @@ static int mkv_write_header(AVFormatContext *s) AVIOContext *pb = s->pb; ebml_master ebml_header, segment_info; AVDictionaryEntry *tag; - int ret, i; + int ret, i, version = 2; if (!strcmp(s->oformat->name, "webm")) mkv->mode = MODE_WEBM; else mkv->mode = MODE_MATROSKAv2; @@ -1096,7 +1096,12 @@ static int mkv_write_header(AVFormatContext *s) if (s->avoid_negative_ts < 0) s->avoid_negative_ts = 1; - for (i = 0; i < s->nb_streams; i++) + if (mkv->mode != MODE_WEBM || + av_dict_get(s->metadata, "stereo_mode", NULL, 0) || + av_dict_get(s->metadata, "alpha_mode", NULL, 0)) + version = 4; + + for (i = 0; i < s->nb_streams; i++) { if (s->streams[i]->codec->codec_id == AV_CODEC_ID_ATRAC3 || s->streams[i]->codec->codec_id == AV_CODEC_ID_COOK || s->streams[i]->codec->codec_id == AV_CODEC_ID_RA_288 || @@ -1108,6 +1113,11 @@ static int mkv_write_header(AVFormatContext *s) avcodec_get_name(s->streams[i]->codec->codec_id)); return AVERROR_PATCHWELCOME; } + if (s->streams[i]->codec->codec_id == AV_CODEC_ID_OPUS || + av_dict_get(s->streams[i]->metadata, "stereo_mode", NULL, 0) || + av_dict_get(s->streams[i]->metadata, "alpha_mode", NULL, 0)) + version = 4; + } mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks)); if (!mkv->tracks) @@ -1119,7 +1129,7 @@ static int mkv_write_header(AVFormatContext *s) put_ebml_uint (pb, EBML_ID_EBMLMAXIDLENGTH , 4); put_ebml_uint (pb, EBML_ID_EBMLMAXSIZELENGTH , 8); put_ebml_string (pb, EBML_ID_DOCTYPE , s->oformat->name); - put_ebml_uint (pb, EBML_ID_DOCTYPEVERSION , 4); + put_ebml_uint (pb, EBML_ID_DOCTYPEVERSION , version); put_ebml_uint (pb, EBML_ID_DOCTYPEREADVERSION , 2); end_ebml_master(pb, ebml_header); From acafd1814e68d41a3adc508c03f4fd6254826c1d Mon Sep 17 00:00:00 2001 From: Anshul Date: Wed, 14 May 2014 22:21:58 +0530 Subject: [PATCH 236/822] ffprobe: fix crash happening because of new streams occuring Fix trac ticket #3603. Signed-off-by: Stefano Sabatini (cherry picked from commit 73a60633143b7c51333a0772b45a47282ac445b6) --- ffprobe.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ffprobe.c b/ffprobe.c index 319bbc65c8..4ca181f90e 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -191,6 +191,7 @@ static const char unit_hertz_str[] = "Hz" ; static const char unit_byte_str[] = "byte" ; static const char unit_bit_per_second_str[] = "bit/s"; +static int nb_streams; static uint64_t *nb_streams_packets; static uint64_t *nb_streams_frames; static int *selected_streams; @@ -1632,6 +1633,14 @@ static void writer_register_all(void) #define print_section_header(s) writer_print_section_header(w, s) #define print_section_footer(s) writer_print_section_footer(w, s) +#define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n) \ +{ \ + ret = av_reallocp_array(&(ptr), (new_n), sizeof(*(ptr))); \ + if (ret < 0) \ + goto end; \ + memset( (ptr) + (cur_n), 0, ((new_n) - (cur_n)) * sizeof(*(ptr)) ); \ +} + static inline int show_tags(WriterContext *w, AVDictionary *tags, int section_id) { AVDictionaryEntry *tag = NULL; @@ -1893,6 +1902,12 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx, goto end; } while (!av_read_frame(fmt_ctx, &pkt)) { + if (fmt_ctx->nb_streams > nb_streams) { + REALLOCZ_ARRAY_STREAM(nb_streams_frames, nb_streams, fmt_ctx->nb_streams); + REALLOCZ_ARRAY_STREAM(nb_streams_packets, nb_streams, fmt_ctx->nb_streams); + REALLOCZ_ARRAY_STREAM(selected_streams, nb_streams, fmt_ctx->nb_streams); + nb_streams = fmt_ctx->nb_streams; + } if (selected_streams[pkt.stream_index]) { AVRational tb = fmt_ctx->streams[pkt.stream_index]->time_base; @@ -2367,9 +2382,10 @@ static int probe_file(WriterContext *wctx, const char *filename) #define CHECK_END if (ret < 0) goto end - nb_streams_frames = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_frames)); - nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets)); - selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams)); + nb_streams = fmt_ctx->nb_streams; + REALLOCZ_ARRAY_STREAM(nb_streams_frames,0,fmt_ctx->nb_streams); + REALLOCZ_ARRAY_STREAM(nb_streams_packets,0,fmt_ctx->nb_streams); + REALLOCZ_ARRAY_STREAM(selected_streams,0,fmt_ctx->nb_streams); for (i = 0; i < fmt_ctx->nb_streams; i++) { if (stream_specifier) { From 34fb994d9340313b0d247899a4a7a97cc010df92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 29 May 2014 14:37:31 +0300 Subject: [PATCH 237/822] aarch64: Use the correct syntax for relocations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes building in PIC mode with gas. The examples in the gas manual showed using a # here even though gas itself actually didn't support that syntax (and the gas test suite only tests it without the extra hash sign). CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 08cd92144e73195eecc28ed0348e66e255516b82) Signed-off-by: Martin Storsjö --- libavutil/aarch64/asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S index 94e5a84583..66084726a6 100644 --- a/libavutil/aarch64/asm.S +++ b/libavutil/aarch64/asm.S @@ -55,8 +55,8 @@ ELF .size \name, . - \name .macro movrel rd, val #if CONFIG_PIC - adrp \rd, #:pg_hi21:\val - add \rd, \rd, #:lo12:\val + adrp \rd, :pg_hi21:\val + add \rd, \rd, :lo12:\val #else ldr \rd, =\val #endif From 0ec75a04e5fc714bc3cd6e2a6b783e6df834ad01 Mon Sep 17 00:00:00 2001 From: Thierry Fauck Date: Thu, 29 May 2014 15:22:27 +0300 Subject: [PATCH 238/822] ppc: Fix compilation for ppc64le (ELFv2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit d6d767d93e532246cacf3567e6bcad76a821f838) Signed-off-by: Martin Storsjö --- libavcodec/ppc/asm.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S index 4d4285b6d3..141dee9b78 100644 --- a/libavcodec/ppc/asm.S +++ b/libavcodec/ppc/asm.S @@ -36,12 +36,20 @@ .macro extfunc name .global X(\name) +#if _CALL_ELF == 2 + .text +X(\name): + addis %r2, %r12, .TOC.-X(\name)@ha + addi %r2, %r2, .TOC.-X(\name)@l + .localentry X(\name), .-X(\name) +#else .section .opd, "aw" X(\name): .quad L(\name), .TOC.@tocbase, 0 .previous .type X(\name), STT_FUNC L(\name): +#endif .endm .macro movrel rd, sym, gp From f15f4cefd7bf60c7c546ef0577c9d9699058bb98 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 26 May 2014 18:07:55 +0200 Subject: [PATCH 239/822] Improve the detection of architecture x86. This fixes building on Debian GNU/Hurd. Signed-off-by: Michael Niedermayer (cherry picked from commit 0f17bc644c4af0f9e0fab714fadf4f4f02140a0e) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e123eb333b..f9dce4ed92 100755 --- a/configure +++ b/configure @@ -3386,7 +3386,7 @@ case "$arch" in tilegx|tile-gx) arch="tilegx" ;; - i[3-6]86|i86pc|BePC|x86pc|x86_64|x86_32|amd64) + i[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64) arch="x86" ;; esac From d773d7775a632785f99ee1a69f4a776f956844b3 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 6 Mar 2014 18:58:04 +0100 Subject: [PATCH 240/822] Correct the FSF address for two avisynth files to '51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA' Signed-off-by: Michael Niedermayer (cherry picked from commit 64b6164b721c77cbb28b381af31bd8ea753818c5) --- compat/avisynth/avisynth_c.h | 3 ++- compat/avisynth/avxsynth_c.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h index 84b6e13684..448493b839 100644 --- a/compat/avisynth/avisynth_c.h +++ b/compat/avisynth/avisynth_c.h @@ -13,7 +13,8 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301 USA, or visit // http://www.gnu.org/copyleft/gpl.html . // // As a special exception, I give you permission to link to the diff --git a/compat/avisynth/avxsynth_c.h b/compat/avisynth/avxsynth_c.h index 7a81e2195a..b20f46081e 100644 --- a/compat/avisynth/avxsynth_c.h +++ b/compat/avisynth/avxsynth_c.h @@ -13,7 +13,8 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301 USA, or visit // http://www.gnu.org/copyleft/gpl.html . // // As a special exception, I give you permission to link to the From f183eaa3adb5db7c82a38aaa441f3a972b651757 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 6 Mar 2014 19:07:53 +0100 Subject: [PATCH 241/822] Fix spelling errors in texi files: accomodate -> accommodate allows to -> allows one to choosen -> chosen compability -> compatibility explictly -> explicitly overriden -> overridden specifed -> specified Trasmission -> Transmission Signed-off-by: Michael Niedermayer (cherry picked from commit 9898bd9a82ad16f7ef2dcc26542827ff92255821) --- doc/demuxers.texi | 2 +- doc/encoders.texi | 8 ++++---- doc/ffmpeg-resampler.texi | 2 +- doc/ffmpeg-scaler.texi | 2 +- doc/filters.texi | 18 +++++++++--------- doc/git-howto.texi | 2 +- doc/indevs.texi | 6 +++--- doc/muxers.texi | 2 +- doc/outdevs.texi | 6 +++--- doc/protocols.texi | 4 ++-- doc/utils.texi | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index bfc0bdc6b1..1ea796bfce 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -296,7 +296,7 @@ teletext packet PTS and DTS values untouched. Raw video demuxer. -This demuxer allows to read raw video data. Since there is no header +This demuxer allows one to read raw video data. Since there is no header specifying the assumed video parameters, the user must specify them in order to be able to decode the data correctly. diff --git a/doc/encoders.texi b/doc/encoders.texi index 8aac0856fb..386ac19cca 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -807,7 +807,7 @@ while producing the worst quality. @item reservoir Enable use of bit reservoir when set to 1. Default value is 1. LAME -has this enabled by default, but can be overriden by use +has this enabled by default, but can be overridden by use @option{--nores} option. @item joint_stereo (@emph{-m j}) @@ -1525,7 +1525,7 @@ for detail retention (adaptive quantization, psy-RD, psy-trellis). Many libx264 encoder options are mapped to FFmpeg global codec options, while unique encoder options are provided through private options. Additionally the @option{x264opts} and @option{x264-params} -private options allows to pass a list of key=value tuples as accepted +private options allows one to pass a list of key=value tuples as accepted by the libx264 @code{x264_param_parse} function. The x264 project website is at @@ -1853,7 +1853,7 @@ Override the x264 configuration using a :-separated list of key=value parameters. This option is functionally the same as the @option{x264opts}, but is -duplicated for compability with the Libav fork. +duplicated for compatibility with the Libav fork. For example to specify libx264 encoding options with @command{ffmpeg}: @example @@ -2047,7 +2047,7 @@ Set physical density of pixels, in dots per meter, unset by default Apple ProRes encoder. FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder. -The used encoder can be choosen with the @code{-vcodec} option. +The used encoder can be chosen with the @code{-vcodec} option. @subsection Private Options for prores-ks diff --git a/doc/ffmpeg-resampler.texi b/doc/ffmpeg-resampler.texi index 69767a29ca..5bef78967b 100644 --- a/doc/ffmpeg-resampler.texi +++ b/doc/ffmpeg-resampler.texi @@ -14,7 +14,7 @@ The FFmpeg resampler provides a high-level interface to the libswresample library audio resampling utilities. In particular it -allows to perform audio resampling, audio channel layout rematrixing, +allows one to perform audio resampling, audio channel layout rematrixing, and convert audio format and packing layout. @c man end DESCRIPTION diff --git a/doc/ffmpeg-scaler.texi b/doc/ffmpeg-scaler.texi index 1eb8cd6bdd..c4ddc0972a 100644 --- a/doc/ffmpeg-scaler.texi +++ b/doc/ffmpeg-scaler.texi @@ -13,7 +13,7 @@ @c man begin DESCRIPTION The FFmpeg rescaler provides a high-level interface to the libswscale -library image conversion utilities. In particular it allows to perform +library image conversion utilities. In particular it allows one to perform image rescaling and pixel format conversion. @c man end DESCRIPTION diff --git a/doc/filters.texi b/doc/filters.texi index 8e465ce7e0..8bf29ec04f 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -172,7 +172,7 @@ terminated when the next special character (belonging to the set The name and arguments of the filter are optionally preceded and followed by a list of link labels. -A link label allows to name a link and associate it to a filter output +A link label allows one to name a link and associate it to a filter output or input pad. The preceding labels @var{in_link_1} ... @var{in_link_N}, are associated to the filter input pads, the following labels @var{out_link_1} ... @var{out_link_M}, are @@ -3921,7 +3921,7 @@ The high threshold selects the "strong" edge pixels, which are then connected through 8-connectivity with the "weak" edge pixels selected by the low threshold. -@var{low} and @var{high} threshold values must be choosen in the range +@var{low} and @var{high} threshold values must be chosen in the range [0,1], and @var{low} should be lesser or equal to @var{high}. Default value for @var{low} is @code{20/255}, and default value for @var{high} @@ -5238,7 +5238,7 @@ Set progressive threshold. Deinterleave or interleave fields. -This filter allows to process interlaced images fields without +This filter allows one to process interlaced images fields without deinterlacing them. Deinterleaving splits the input frame into 2 fields (so called half pictures). Odd lines are moved to the top half of the output image, even lines to the bottom half. @@ -6860,7 +6860,7 @@ rotate=A*sin(2*PI/T*t) @end example @item -Rotate the video, output size is choosen so that the whole rotating +Rotate the video, output size is chosen so that the whole rotating input video is always completely contained in the output: @example rotate='2*PI*t:ow=hypot(iw,ih):oh=ow' @@ -6983,7 +6983,7 @@ Default value is @samp{0}. @item flags Set libswscale scaling flags. See @ref{sws_flags,,the ffmpeg-scaler manual,ffmpeg-scaler} for the -complete list of values. If not explictly specified the filter applies +complete list of values. If not explicitly specified the filter applies the default flags. @item size, s @@ -7797,7 +7797,7 @@ Produce 8x8 PNG tiles of all keyframes (@option{-skip_frame nokey}) in a movie: ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png @end example The @option{-vsync 0} is necessary to prevent @command{ffmpeg} from -duplicating each output frame to accomodate the originally detected frame +duplicating each output frame to accommodate the originally detected frame rate. @item @@ -8394,7 +8394,7 @@ Set dithering to reduce the circular banding effects. Default is @code{1} (enabled). @item aspect -Set vignette aspect. This setting allows to adjust the shape of the vignette. +Set vignette aspect. This setting allows one to adjust the shape of the vignette. Setting this value to the SAR of the input will make a rectangular vignetting following the dimensions of the video. @@ -8903,7 +8903,7 @@ horizontally, vertically, or diagonally adjacent. At each interaction the grid evolves according to the adopted rule, which specifies the number of neighbor alive cells which will make a -cell stay alive or born. The @option{rule} option allows to specify +cell stay alive or born. The @option{rule} option allows one to specify the rule to adopt. This source accepts the following options: @@ -10323,7 +10323,7 @@ Note that when the movie is looped the source timestamps are not changed, so it will generate non monotonically increasing timestamps. @end table -This filter allows to overlay a second video on top of main input of +This filter allows one to overlay a second video on top of main input of a filtergraph as shown in this graph: @example input -----------> deltapts0 --> overlay --> output diff --git a/doc/git-howto.texi b/doc/git-howto.texi index 44e1cc6439..750662a458 100644 --- a/doc/git-howto.texi +++ b/doc/git-howto.texi @@ -299,7 +299,7 @@ the current branch history. git commit --amend @end example -allows to amend the last commit details quickly. +allows one to amend the last commit details quickly. @example git rebase -i origin/master diff --git a/doc/indevs.texi b/doc/indevs.texi index 72b1493522..93fbbe822f 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -409,7 +409,7 @@ OpenAL is part of Core Audio, the official Mac OS X Audio interface. See @url{http://developer.apple.com/technologies/mac/audio-and-video.html} @end table -This device allows to capture from an audio input device handled +This device allows one to capture from an audio input device handled through OpenAL. You need to specify the name of the device to capture in the provided @@ -617,7 +617,7 @@ Select the pixel format (only valid for raw video input). @item input_format Set the preferred pixel format (for raw video) or a codec name. -This option allows to select the input format, when several are +This option allows one to select the input format, when several are available. @item framerate @@ -678,7 +678,7 @@ other filename will be interpreted as device number 0. X11 video input device. -This device allows to capture a region of an X11 display. +This device allows one to capture a region of an X11 display. The filename passed as input has the syntax: @example diff --git a/doc/muxers.texi b/doc/muxers.texi index 0ecc04c206..d9596ebcef 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -758,7 +758,7 @@ The segment muxer supports the following options: @table @option @item reference_stream @var{specifier} Set the reference stream, as specified by the string @var{specifier}. -If @var{specifier} is set to @code{auto}, the reference is choosen +If @var{specifier} is set to @code{auto}, the reference is chosen automatically. Otherwise it must be a stream specifier (see the ``Stream specifiers'' chapter in the ffmpeg manual) which specifies the reference stream. The default value is @code{auto}. diff --git a/doc/outdevs.texi b/doc/outdevs.texi index 620c18bab9..bc94b9ed0c 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -42,7 +42,7 @@ ffmpeg -i INPUT -f alsa hw:1,7 CACA output device. -This output device allows to show a video stream in CACA window. +This output device allows one to show a video stream in CACA window. Only one CACA window is allowed per application, so you can have only one instance of this output device in an application. @@ -302,7 +302,7 @@ ffmpeg -i INPUT -f pulse "stream name" SDL (Simple DirectMedia Layer) output device. -This output device allows to show a video stream in an SDL +This output device allows one to show a video stream in an SDL window. Only one SDL window is allowed per application, so you can have only one instance of this output device in an application. @@ -361,7 +361,7 @@ sndio audio output device. XV (XVideo) output device. -This output device allows to show a video stream in a X Window System +This output device allows one to show a video stream in a X Window System window. @subsection Options diff --git a/doc/protocols.texi b/doc/protocols.texi index 01c1a4998d..91b8244306 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -960,7 +960,7 @@ used as master salt. @section tcp -Trasmission Control Protocol. +Transmission Control Protocol. The required syntax for a TCP url is: @example @@ -1066,7 +1066,7 @@ udp://@var{hostname}:@var{port}[?@var{options}] @var{options} contains a list of &-separated options of the form @var{key}=@var{val}. In case threading is enabled on the system, a circular buffer is used -to store the incoming data, which allows to reduce loss of data due to +to store the incoming data, which allows one to reduce loss of data due to UDP socket buffer overruns. The @var{fifo_size} and @var{overrun_nonfatal} options are related to this buffer. diff --git a/doc/utils.texi b/doc/utils.texi index 305566246c..5abfb0ccc6 100644 --- a/doc/utils.texi +++ b/doc/utils.texi @@ -1056,7 +1056,7 @@ which can be obtained with @code{ffmpeg -opencl_bench} or @code{av_opencl_get_de @item device_idx Select the index of the device used to run OpenCL code. -The specifed index must be one of the indexes in the device list which +The specified index must be one of the indexes in the device list which can be obtained with @code{ffmpeg -opencl_bench} or @code{av_opencl_get_device_list()}. @end table From 88544e8cebf00cc39ed504ed5cb603e4d89e4c7d Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 6 Mar 2014 19:03:07 +0100 Subject: [PATCH 242/822] Fix spelling error 'Inconsistant -> Inconsistent' Signed-off-by: Michael Niedermayer (cherry picked from commit eeb3baf7f7257ea5586bf857cc668f6aff81d556) --- libavcodec/dcadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 79d50975be..4392f032f9 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2426,7 +2426,7 @@ FF_ENABLE_DEPRECATION_WARNINGS * masks in some sense -- unfortunately some channels could overlap */ if (av_popcount(channel_mask) != av_popcount(channel_layout)) { av_log(avctx, AV_LOG_DEBUG, - "DTS-XXCH: Inconsistant avcodec/dts channel layouts\n"); + "DTS-XXCH: Inconsistent avcodec/dts channel layouts\n"); return AVERROR_INVALIDDATA; } From a5a6f6fec338112966d1bc21a52440c75831050f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 26 May 2014 01:23:16 +0200 Subject: [PATCH 243/822] avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe Fixes Ticket 3663 Signed-off-by: Michael Niedermayer (cherry picked from commit 96470ca22b3b46677de0e2df64e87c5ec80d752b) --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3434d4f100..3fb774742b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2167,7 +2167,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) if (sc->keyframe_absent && !sc->stps_count && !rap_group_present - && st->codec->codec_type == AVMEDIA_TYPE_AUDIO) + && (st->codec->codec_type == AVMEDIA_TYPE_AUDIO || (i==0 && j==0))) keyframe = 1; if (keyframe) distance = 0; From 9ea1e82d68c1308657e4cbbfab0e6610c4d4aeb9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 19 May 2014 06:19:23 +0200 Subject: [PATCH 244/822] avcodec/diracdec: move mc buffer allocation to per frame Fixes out of array accesses for non default buffers with large strides Signed-off-by: Michael Niedermayer (cherry picked from commit 4a30f08505a4e85718896ff233c97be41a9754ca) --- libavcodec/diracdec.c | 47 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 8ab0eb0872..06d8b79b12 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -201,6 +201,7 @@ typedef struct DiracContext { uint16_t *mctmp; /* buffer holding the MC data multipled by OBMC weights */ uint8_t *mcscratch; + int buffer_stride; DECLARE_ALIGNED(16, uint8_t, obmc_weight)[3][MAX_BLOCKSIZE*MAX_BLOCKSIZE]; @@ -343,22 +344,44 @@ static int alloc_sequence_buffers(DiracContext *s) return AVERROR(ENOMEM); } - w = s->source.width; - h = s->source.height; - /* fixme: allocate using real stride here */ - s->sbsplit = av_malloc(sbwidth * sbheight); - s->blmotion = av_malloc(sbwidth * sbheight * 16 * sizeof(*s->blmotion)); - s->edge_emu_buffer_base = av_malloc((w+64)*MAX_BLOCKSIZE); + s->sbsplit = av_malloc_array(sbwidth, sbheight); + s->blmotion = av_malloc_array(sbwidth, sbheight * 16 * sizeof(*s->blmotion)); - s->mctmp = av_malloc((w+64+MAX_BLOCKSIZE) * (h+MAX_BLOCKSIZE) * sizeof(*s->mctmp)); - s->mcscratch = av_malloc((w+64)*MAX_BLOCKSIZE); - - if (!s->sbsplit || !s->blmotion || !s->mctmp || !s->mcscratch) + if (!s->sbsplit || !s->blmotion) return AVERROR(ENOMEM); return 0; } +static int alloc_buffers(DiracContext *s, int stride) +{ + int w = s->source.width; + int h = s->source.height; + + av_assert0(stride >= w); + stride += 64; + + if (s->buffer_stride >= stride) + return 0; + s->buffer_stride = 0; + + av_freep(&s->edge_emu_buffer_base); + memset(s->edge_emu_buffer, 0, sizeof(s->edge_emu_buffer)); + av_freep(&s->mctmp); + av_freep(&s->mcscratch); + + s->edge_emu_buffer_base = av_malloc_array(stride, MAX_BLOCKSIZE); + + s->mctmp = av_malloc_array((stride+MAX_BLOCKSIZE), (h+MAX_BLOCKSIZE) * sizeof(*s->mctmp)); + s->mcscratch = av_malloc_array(stride, MAX_BLOCKSIZE); + + if (!s->edge_emu_buffer_base || !s->mctmp || !s->mcscratch) + return AVERROR(ENOMEM); + + s->buffer_stride = stride; + return 0; +} + static void free_sequence_buffers(DiracContext *s) { int i, j, k; @@ -382,6 +405,7 @@ static void free_sequence_buffers(DiracContext *s) av_freep(&s->plane[i].idwt_tmp); } + s->buffer_stride = 0; av_freep(&s->sbsplit); av_freep(&s->blmotion); av_freep(&s->edge_emu_buffer_base); @@ -1854,6 +1878,9 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int s->plane[1].stride = pic->avframe->linesize[1]; s->plane[2].stride = pic->avframe->linesize[2]; + if (alloc_buffers(s, FFMAX3(FFABS(s->plane[0].stride), FFABS(s->plane[1].stride), FFABS(s->plane[2].stride))) < 0) + return AVERROR(ENOMEM); + /* [DIRAC_STD] 11.1 Picture parse. picture_parse() */ if (dirac_decode_picture_header(s)) return -1; From d575984dfcf7f5e8c6e8fef91a3e20455cd69a47 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 20 May 2014 05:23:52 +0200 Subject: [PATCH 245/822] avutil/cpu: force mmx on selection of higher x86 SIMD features Fixes various runtime failures with manually set flags that represent no existing CPU Fixes Ticket3653 Signed-off-by: Michael Niedermayer (cherry picked from commit 6310eb8010b7a3b3016e297132380cbd4e3d2d10) Signed-off-by: Michael Niedermayer --- libavutil/cpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index 256bd237d5..d6d93a35d6 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -47,6 +47,26 @@ static int flags, checked; void av_force_cpu_flags(int arg){ + if ( (arg & ( AV_CPU_FLAG_3DNOW | + AV_CPU_FLAG_3DNOWEXT | + AV_CPU_FLAG_SSE | + AV_CPU_FLAG_SSE2 | + AV_CPU_FLAG_SSE2SLOW | + AV_CPU_FLAG_SSE3 | + AV_CPU_FLAG_SSE3SLOW | + AV_CPU_FLAG_SSSE3 | + AV_CPU_FLAG_SSE4 | + AV_CPU_FLAG_SSE42 | + AV_CPU_FLAG_AVX | + AV_CPU_FLAG_XOP | + AV_CPU_FLAG_FMA3 | + AV_CPU_FLAG_FMA4 | + AV_CPU_FLAG_AVX2 )) + && !(arg & AV_CPU_FLAG_MMX)) { + av_log(NULL, AV_LOG_WARNING, "MMX implied by specified flags\n"); + arg |= AV_CPU_FLAG_MMX; + } + flags = arg; checked = arg != -1; } From e0407a7bf7f0e6826dab150c8a4035fbcfc877ea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 21 May 2014 03:02:06 +0200 Subject: [PATCH 246/822] avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE Signed-off-by: Michael Niedermayer (cherry picked from commit 19e66c7232d96e4ae8f05b52da2b84dfaa4e4da3) Signed-off-by: Michael Niedermayer --- libavcodec/libvorbisenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index 4ca8955b2f..6a77670284 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -349,7 +349,8 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, avctx->delay = duration; av_assert0(!s->afq.remaining_delay); s->afq.frames->duration += duration; - s->afq.frames->pts -= duration; + if (s->afq.frames->pts != AV_NOPTS_VALUE) + s->afq.frames->pts -= duration; s->afq.remaining_samples += duration; } ff_af_queue_remove(&s->afq, duration, &avpkt->pts, &avpkt->duration); From ba88a6e4e442e936794dfb3a25387799aab56050 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 03:19:47 +0200 Subject: [PATCH 247/822] avcodec/aac: fix () in IS_CODEBOOK_UNSIGNED macro Signed-off-by: Michael Niedermayer (cherry picked from commit fa915d4193e13187773c500b80c7df6baeb22c3b) Signed-off-by: Michael Niedermayer --- libavcodec/aac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aac.h b/libavcodec/aac.h index 89f463e341..1bcd95c7ad 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -81,7 +81,7 @@ enum BandType { INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions. }; -#define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10) +#define IS_CODEBOOK_UNSIGNED(x) (((x) - 1) & 10) enum ChannelPosition { AAC_CHANNEL_OFF = 0, From 4261778dbdb68debf9315be16bf0c913467a3d05 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 03:27:56 +0200 Subject: [PATCH 248/822] avcodec/golomb-test: fix () in EXTEND() macro Signed-off-by: Michael Niedermayer (cherry picked from commit 97e6b5ee3a16fee7d130f19f4dcee030f14d91cf) Signed-off-by: Michael Niedermayer --- libavcodec/golomb-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/golomb-test.c b/libavcodec/golomb-test.c index 8adcdf63d8..2dfe917144 100644 --- a/libavcodec/golomb-test.c +++ b/libavcodec/golomb-test.c @@ -58,7 +58,7 @@ int main(void) } } -#define EXTEND(i) (i << 3 | i & 7) +#define EXTEND(i) ((i) << 3 | (i) & 7) init_put_bits(&pb, temp, SIZE); for (i = 0; i < COUNT; i++) set_ue_golomb(&pb, EXTEND(i)); From cb9379065f821bd4c28c0ca7d4fcee0752f4619a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 03:30:13 +0200 Subject: [PATCH 249/822] avcodec/h264: fix () in macros Signed-off-by: Michael Niedermayer (cherry picked from commit af62b42736c00332d39965168b5cc966a06f07d6) Signed-off-by: Michael Niedermayer --- libavcodec/h264.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 840a91d35b..1a106d6762 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -61,10 +61,10 @@ #define MAX_SLICES 16 #ifdef ALLOW_INTERLACE -#define MB_MBAFF(h) h->mb_mbaff -#define MB_FIELD(h) h->mb_field_decoding_flag -#define FRAME_MBAFF(h) h->mb_aff_frame -#define FIELD_PICTURE(h) (h->picture_structure != PICT_FRAME) +#define MB_MBAFF(h) (h)->mb_mbaff +#define MB_FIELD(h) (h)->mb_field_decoding_flag +#define FRAME_MBAFF(h) (h)->mb_aff_frame +#define FIELD_PICTURE(h) ((h)->picture_structure != PICT_FRAME) #define LEFT_MBS 2 #define LTOP 0 #define LBOT 1 @@ -84,12 +84,12 @@ #define FIELD_OR_MBAFF_PICTURE(h) (FRAME_MBAFF(h) || FIELD_PICTURE(h)) #ifndef CABAC -#define CABAC(h) h->pps.cabac +#define CABAC(h) (h)->pps.cabac #endif -#define CHROMA(h) (h->sps.chroma_format_idc) -#define CHROMA422(h) (h->sps.chroma_format_idc == 2) -#define CHROMA444(h) (h->sps.chroma_format_idc == 3) +#define CHROMA(h) ((h)->sps.chroma_format_idc) +#define CHROMA422(h) ((h)->sps.chroma_format_idc == 2) +#define CHROMA444(h) ((h)->sps.chroma_format_idc == 3) #define EXTENDED_SAR 255 From 7bce659e18fd907ffc08655f38e9343e16cb1a38 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 03:36:03 +0200 Subject: [PATCH 250/822] avcodec/hevc: fix () in macros Signed-off-by: Michael Niedermayer (cherry picked from commit 70f671c39e53f0e54914185dd3ed5afa6b66708b) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index 4a6620f67b..a1c76fe49b 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -81,10 +81,10 @@ #define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)]) #define SAMPLE_CBF(tab, x, y) ((tab)[((y) & ((1<nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP) -#define IS_BLA(s) (s->nal_unit_type == NAL_BLA_W_RADL || s->nal_unit_type == NAL_BLA_W_LP || \ - s->nal_unit_type == NAL_BLA_N_LP) -#define IS_IRAP(s) (s->nal_unit_type >= 16 && s->nal_unit_type <= 23) +#define IS_IDR(s) ((s)->nal_unit_type == NAL_IDR_W_RADL || (s)->nal_unit_type == NAL_IDR_N_LP) +#define IS_BLA(s) ((s)->nal_unit_type == NAL_BLA_W_RADL || (s)->nal_unit_type == NAL_BLA_W_LP || \ + (s)->nal_unit_type == NAL_BLA_N_LP) +#define IS_IRAP(s) ((s)->nal_unit_type >= 16 && (s)->nal_unit_type <= 23) /** * Table 7-3: NAL unit type codes From f2dbd64bde67a69db881821c303af99fd0f0aa25 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 03:39:08 +0200 Subject: [PATCH 251/822] avcodec/ivi_dsp: add some missing () to macros Signed-off-by: Michael Niedermayer (cherry picked from commit f276bf303cbb7a8fed3c388135007bc29f45f8d5) Signed-off-by: Michael Niedermayer --- libavcodec/ivi_dsp.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/ivi_dsp.c b/libavcodec/ivi_dsp.c index f5e5e6b52e..9537cb0376 100644 --- a/libavcodec/ivi_dsp.c +++ b/libavcodec/ivi_dsp.c @@ -235,15 +235,15 @@ void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, /** butterfly operation for the inverse Haar transform */ #define IVI_HAAR_BFLY(s1, s2, o1, o2, t) \ - t = (s1 - s2) >> 1;\ - o1 = (s1 + s2) >> 1;\ - o2 = t;\ + t = ((s1) - (s2)) >> 1;\ + o1 = ((s1) + (s2)) >> 1;\ + o2 = (t);\ /** inverse 8-point Haar transform */ #define INV_HAAR8(s1, s5, s3, s7, s2, s4, s6, s8,\ d1, d2, d3, d4, d5, d6, d7, d8,\ t0, t1, t2, t3, t4, t5, t6, t7, t8) {\ - t1 = s1 << 1; t5 = s5 << 1;\ + t1 = (s1) << 1; t5 = (s5) << 1;\ IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\ IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\ IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\ @@ -485,21 +485,21 @@ void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, /** butterfly operation for the inverse slant transform */ #define IVI_SLANT_BFLY(s1, s2, o1, o2, t) \ - t = s1 - s2;\ - o1 = s1 + s2;\ - o2 = t;\ + t = (s1) - (s2);\ + o1 = (s1) + (s2);\ + o2 = (t);\ /** This is a reflection a,b = 1/2, 5/4 for the inverse slant transform */ #define IVI_IREFLECT(s1, s2, o1, o2, t) \ - t = ((s1 + s2*2 + 2) >> 2) + s1;\ - o2 = ((s1*2 - s2 + 2) >> 2) - s2;\ - o1 = t;\ + t = (((s1) + (s2)*2 + 2) >> 2) + (s1);\ + o2 = (((s1)*2 - (s2) + 2) >> 2) - (s2);\ + o1 = (t);\ /** This is a reflection a,b = 1/2, 7/8 for the inverse slant transform */ #define IVI_SLANT_PART4(s1, s2, o1, o2, t) \ - t = s2 + ((s1*4 - s2 + 4) >> 3);\ - o2 = s1 + ((-s1 - s2*4 + 4) >> 3);\ - o1 = t;\ + t = (s2) + (((s1)*4 - (s2) + 4) >> 3);\ + o2 = (s1) + ((-(s1) - (s2)*4 + 4) >> 3);\ + o1 = (t);\ /** inverse slant8 transform */ #define IVI_INV_SLANT8(s1, s4, s8, s5, s2, s6, s3, s7,\ @@ -557,7 +557,7 @@ void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch, c } #undef COMPENSATE -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) src = tmp; for (i = 0; i < 8; i++) { if (!src[0] && !src[1] && !src[2] && !src[3] && !src[4] && !src[5] && !src[6] && !src[7]) { @@ -597,7 +597,7 @@ void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch, c } #undef COMPENSATE -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) src = tmp; for (i = 0; i < 4; i++) { if (!src[0] && !src[1] && !src[2] && !src[3]) { @@ -631,7 +631,7 @@ void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui int i; int t0, t1, t2, t3, t4, t5, t6, t7, t8; -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 8; i++) { if (!in[0] && !in[1] && !in[2] && !in[3] && !in[4] && !in[5] && !in[6] && !in[7]) { memset(out, 0, 8*sizeof(out[0])); @@ -673,7 +673,7 @@ void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui row4 = pitch << 2; row8 = pitch << 3; -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 8; i++) { if (flags[i]) { IVI_INV_SLANT8(in[0], in[8], in[16], in[24], in[32], in[40], in[48], in[56], @@ -710,7 +710,7 @@ void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui int i; int t0, t1, t2, t3, t4; -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 4; i++) { if (!in[0] && !in[1] && !in[2] && !in[3]) { memset(out, 0, 4*sizeof(out[0])); @@ -732,7 +732,7 @@ void ff_ivi_col_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui row2 = pitch << 1; -#define COMPENSATE(x) ((x + 1)>>1) +#define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 4; i++) { if (flags[i]) { IVI_INV_SLANT4(in[0], in[4], in[8], in[12], From 3f743e3e4c344c25f376b1de535a15e9dafb48fd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 05:17:51 +0200 Subject: [PATCH 252/822] avcodec/mlpdec: fix () in MSB_MASK() macro Signed-off-by: Michael Niedermayer (cherry picked from commit fa160af08b6f42f17e93124aef86e3f6eec70d51) Signed-off-by: Michael Niedermayer --- libavcodec/mlpdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 93ed55212f..292f3ab94f 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -872,7 +872,7 @@ static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp, return 0; } -#define MSB_MASK(bits) (-1u << bits) +#define MSB_MASK(bits) (-1u << (bits)) /** Generate PCM samples using the prediction filters and residual values * read from the data stream, and update the filter state. */ From f6c628f0297a967671dc373074051a78f1c58d9c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 05:18:47 +0200 Subject: [PATCH 253/822] avcodec/mss34dsp: fix () in SOP* macros Signed-off-by: Michael Niedermayer (cherry picked from commit 6e720c5c815e510188a0bda654662383f2c48050) Signed-off-by: Michael Niedermayer --- libavcodec/mss34dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mss34dsp.c b/libavcodec/mss34dsp.c index e4d4299805..0397add17d 100644 --- a/libavcodec/mss34dsp.c +++ b/libavcodec/mss34dsp.c @@ -84,8 +84,8 @@ void ff_mss34_gen_quant_mat(uint16_t *qmat, int quality, int luma) blk[6 * step] = (-(t3 + t7) + t8 + tA) >> shift; \ blk[7 * step] = (-(t1 + t6) + t9 + tB) >> shift; \ -#define SOP_ROW(a) ((a) << 16) + 0x2000 -#define SOP_COL(a) ((a + 32) << 16) +#define SOP_ROW(a) (((a) << 16) + 0x2000) +#define SOP_COL(a) (((a) + 32) << 16) void ff_mss34_dct_put(uint8_t *dst, int stride, int *block) { From 2d97ad38ed3fc5fc84742acd6db5b5403a72a574 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 May 2014 05:19:09 +0200 Subject: [PATCH 254/822] avcodec/mss4: Fix () in MKVAL() macro Signed-off-by: Michael Niedermayer (cherry picked from commit cf7ff0146c76b93c32edf5230a28b9590acf5105) Signed-off-by: Michael Niedermayer --- libavcodec/mss4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index 662cf24df5..6dadf07313 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -364,7 +364,7 @@ static int get_value_cached(GetBitContext *gb, int vec_pos, uint8_t *vec, return prev[component]; } -#define MKVAL(vals) (vals[0] | (vals[1] << 3) | (vals[2] << 6)) +#define MKVAL(vals) ((vals)[0] | ((vals)[1] << 3) | ((vals)[2] << 6)) /* Image mode - the hardest to comprehend MSS4 coding mode. * From 2545defeac7730cd5f4fae3c06af1f4da736afa4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 31 May 2014 01:43:41 +0200 Subject: [PATCH 255/822] avformat/flvenc: fix assertion failure after 4h muxing Signed-off-by: Michael Niedermayer (cherry picked from commit 2e532aa82d2b938a3cd913a363a79bf92ddf1a33) Signed-off-by: Michael Niedermayer --- libavformat/flvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index c16f8ebb4a..15c9997e6b 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -536,7 +536,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) sc->last_ts = ts; avio_wb24(pb, size + flags_size); - avio_wb24(pb, ts); + avio_wb24(pb, ts & 0xFFFFFF); avio_w8(pb, (ts >> 24) & 0x7F); // timestamps are 32 bits _signed_ avio_wb24(pb, flv->reserved); From 96047b3150c4b918257ed50bfeecae0e4e43c362 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 2 Jun 2014 17:09:53 +0200 Subject: [PATCH 256/822] avformat/utils: Call ff_rfps_add_frame() only for video This avoids some unneeded computations Signed-off-by: Michael Niedermayer (cherry picked from commit 6f6edfe1c0ede584ea4edf5bb0fc9b961f299631) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index bff961a90b..27b37b22e1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3234,7 +3234,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } } #if FF_API_R_FRAME_RATE - ff_rfps_add_frame(ic, st, pkt->dts); + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) + ff_rfps_add_frame(ic, st, pkt->dts); #endif if (st->parser && st->parser->parser->split && !st->codec->extradata) { int i = st->parser->parser->split(st->codec, pkt->data, pkt->size); From fb7e76d1cfc516b6d6eff36ba0efb1c983acb86a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 5 May 2014 23:30:35 +0200 Subject: [PATCH 257/822] avcodec/svq3: Fix "incompatible pointer type" warnings Signed-off-by: Michael Niedermayer (cherry picked from commit 89d2fc62db985263fdbfb1f44b23e98d24d77c9e) Signed-off-by: Michael Niedermayer --- libavcodec/svq3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index f41fa599c3..d3c5672d42 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1187,7 +1187,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (h->pict_type != AV_PICTURE_TYPE_I) { if (!s->last_pic->f.data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); - av_frame_unref(s->last_pic); + av_frame_unref(&s->last_pic->f); ret = get_buffer(avctx, s->last_pic); if (ret < 0) return ret; @@ -1200,7 +1200,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (h->pict_type == AV_PICTURE_TYPE_B && !s->next_pic->f.data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); - av_frame_unref(s->next_pic); + av_frame_unref(&s->next_pic->f); ret = get_buffer(avctx, s->next_pic); if (ret < 0) return ret; From e529ff52a05f7533059ff17b30b5a1474d2719e5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 7 May 2014 03:12:34 +0200 Subject: [PATCH 258/822] avformat/h263dec: shift data in state to make more bits available to probe Signed-off-by: Michael Niedermayer (cherry picked from commit 04b15a6055fc230a655091ce21303f9d2a996ed9) Signed-off-by: Michael Niedermayer --- libavformat/h263dec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/h263dec.c b/libavformat/h263dec.c index 19ed6a94ca..486e4b0eb8 100644 --- a/libavformat/h263dec.c +++ b/libavformat/h263dec.c @@ -34,21 +34,21 @@ static int h263_probe(AVProbeData *p) for(i=0; ibuf_size; i++){ code = (code<<8) + p->buf[i]; - if ((code & 0xfffffc0000) == 0x800000) { - src_fmt= (code>>2)&7; + if ((code & 0xfffffc000000) == 0x80000000) { + src_fmt= (code>>10)&7; if( src_fmt != last_src_fmt && last_src_fmt>0 && last_src_fmt<6 && src_fmt<6) res_change++; - if((code&0x300)==0x200 && src_fmt){ + if((code&0x30000)==0x20000 && src_fmt){ valid_psc++; last_gn=0; }else invalid_psc++; last_src_fmt= src_fmt; - } else if((code & 0xffff800000) == 0x800000) { - int gn= (code>>(23-5)) & 0x1F; + } else if((code & 0xffff80000000) == 0x80000000) { + int gn= (code>>(31-5)) & 0x1F; if(gn Date: Wed, 7 May 2014 03:20:13 +0200 Subject: [PATCH 259/822] avformat/h263dec/h263_probe: Check PSC bit 9 and 13 in Signed-off-by: Michael Niedermayer (cherry picked from commit 3ad21c50af042ab17bedf755ff8245392425c259) Signed-off-by: Michael Niedermayer --- libavformat/h263dec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/h263dec.c b/libavformat/h263dec.c index 486e4b0eb8..a581d4c4b5 100644 --- a/libavformat/h263dec.c +++ b/libavformat/h263dec.c @@ -41,6 +41,11 @@ static int h263_probe(AVProbeData *p) && src_fmt<6) res_change++; + if (src_fmt != 7 && !(code&(1<<9)) && (code&(1<<5))) { + invalid_psc++; + continue; + } + if((code&0x30000)==0x20000 && src_fmt){ valid_psc++; last_gn=0; From 54bec22a6e3f2115eac1c2f079c25dcb19b2813e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 7 May 2014 03:41:41 +0200 Subject: [PATCH 260/822] avformat/h263dec/h263_probe: Check TR Fixes missdetection of Misdetection_345.mp3 Fixes missdetection of Misdetection_421.mp3 Signed-off-by: Michael Niedermayer (cherry picked from commit cd20b93e2f5171054d6b3dd9daee1e832c1f9090) Signed-off-by: Michael Niedermayer --- libavformat/h263dec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/h263dec.c b/libavformat/h263dec.c index a581d4c4b5..145fb85902 100644 --- a/libavformat/h263dec.c +++ b/libavformat/h263dec.c @@ -31,16 +31,23 @@ static int h263_probe(AVProbeData *p) int res_change=0; int src_fmt, last_src_fmt=-1; int last_gn=0; + int tr, last_tr = -1; for(i=0; ibuf_size; i++){ code = (code<<8) + p->buf[i]; if ((code & 0xfffffc000000) == 0x80000000) { + tr = (code >> 18) & 0xFF; src_fmt= (code>>10)&7; if( src_fmt != last_src_fmt && last_src_fmt>0 && last_src_fmt<6 && src_fmt<6) res_change++; + if (tr == last_tr) { + invalid_psc++; + continue; + } + if (src_fmt != 7 && !(code&(1<<9)) && (code&(1<<5))) { invalid_psc++; continue; @@ -52,6 +59,7 @@ static int h263_probe(AVProbeData *p) }else invalid_psc++; last_src_fmt= src_fmt; + last_tr = tr; } else if((code & 0xffff80000000) == 0x80000000) { int gn= (code>>(31-5)) & 0x1F; if(gn Date: Mon, 2 Jun 2014 23:08:27 +0200 Subject: [PATCH 261/822] Update for 2.2.3 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index b1b25a5ffa..585940699b 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.2 +2.2.3 diff --git a/VERSION b/VERSION index b1b25a5ffa..585940699b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.2 +2.2.3 diff --git a/doc/Doxyfile b/doc/Doxyfile index 3f1e1f8ece..584781641c 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.2 +PROJECT_NUMBER = 2.2.3 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 8c33d40a7b8a44f550a1fb11a082a95aaa606284 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Jun 2014 18:37:32 +0200 Subject: [PATCH 262/822] ffmpeg: prevent pts < dts to be passed through to the muxer on stream copy Fixes Ticket3658 Signed-off-by: Michael Niedermayer (cherry picked from commit 27856b2fe9cdbcf48ad996647cb104667b373fa4) --- ffmpeg.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 5caac1f36f..5463f06207 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -621,7 +621,8 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) bsfc = bsfc->next; } - if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS) && + if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { + if( (avctx->codec_type == AVMEDIA_TYPE_AUDIO || avctx->codec_type == AVMEDIA_TYPE_VIDEO) && pkt->dts != AV_NOPTS_VALUE && ost->last_mux_dts != AV_NOPTS_VALUE) { @@ -642,6 +643,16 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) pkt->pts = FFMAX(pkt->pts, max); pkt->dts = max; } + } + if (pkt->dts != AV_NOPTS_VALUE && + pkt->pts != AV_NOPTS_VALUE && + pkt->dts > pkt->pts) { + av_log(s, AV_LOG_WARNING, "Invalid DTS: %"PRId64" PTS: %"PRId64" in output stream %d:%d\n", + pkt->dts, pkt->pts, + ost->file_index, ost->st->index); + pkt->pts = AV_NOPTS_VALUE; + pkt->dts = AV_NOPTS_VALUE; + } } ost->last_mux_dts = pkt->dts; From 29c8fac3f72c4a6e8c5e2492d0edcb6b979ac9d4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Jun 2014 05:04:13 +0200 Subject: [PATCH 263/822] avformat/avidec: allow rounding errors between scale/rate and timebase Fixes Ticket3670 Signed-off-by: Michael Niedermayer (cherry picked from commit 571ab8344a9a2864d22d01af41283cee9328b927) --- libavformat/avidec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 9b706b2d96..a7e1c5b8d1 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1685,8 +1685,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, continue; // av_assert1(st2->codec->block_align); - av_assert0((int64_t)st2->time_base.num * ast2->rate == - (int64_t)st2->time_base.den * ast2->scale); + av_assert0(fabs(av_q2d(st2->time_base) - ast2->scale / (double)ast2->rate) < av_q2d(st2->time_base) * 0.00000001); index = av_index_search_timestamp(st2, av_rescale_q(timestamp, st->time_base, From d1b62a9a07719480f6d306420f1abac3fc07cfa2 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 3 Jun 2014 00:54:46 +0200 Subject: [PATCH 264/822] Do not limit blocksize when reading PCM from aiff. Fixes ticket #3695. (cherry picked from commit 763e714442e07f6430b003c8a9f4b62deaa7b3a5) --- libavformat/aiffdec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 81bcc64a0c..7accec453f 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -344,10 +344,16 @@ static int aiff_read_packet(AVFormatContext *s, return AVERROR_EOF; /* Now for that packet */ - if (st->codec->block_align >= 17) // GSM, QCLP, IMA4 + switch (st->codec->codec_id) { + case AV_CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_GSM: + case AV_CODEC_ID_QDM2: + case AV_CODEC_ID_QCELP: size = st->codec->block_align; - else + break; + default: size = (MAX_SIZE / st->codec->block_align) * st->codec->block_align; + } size = FFMIN(max_size, size); res = av_get_packet(s->pb, pkt, size); if (res < 0) From 09d406eec811e0f7a0a64c2d54e259e18a964922 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 29 May 2014 08:41:15 +0200 Subject: [PATCH 265/822] avcodec/utvideodec: Increase vlc len Fixes a regression since fb3e380 similar to ticket #2661, reported by fluffrabbit at aol dot com. Signed-off-by: Michael Niedermayer (cherry picked from commit 673716c54b39eba9579a38ad222130e3f9549167) --- libavcodec/utvideodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index e3ef22d2a2..1c7677345c 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -70,7 +70,7 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym) code += 0x80000000u >> (he[i].len - 1); } - return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 10), last + 1, + return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 11), last + 1, bits, sizeof(*bits), sizeof(*bits), codes, sizeof(*codes), sizeof(*codes), syms, sizeof(*syms), sizeof(*syms), 0); From 989adf5ee5214a82340eba70be6f9ea719a998a6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Jun 2014 04:25:14 +0200 Subject: [PATCH 266/822] avcodec/h264: in the absence of recovery points, be more tolerant on accepting plain I frames Fixes: Ticket3652 Signed-off-by: Michael Niedermayer (cherry picked from commit 19c9d1e8e71da04c3ac940206619c0a2d01e5193) --- libavcodec/h264.c | 1 + libavcodec/h264.h | 2 ++ libavcodec/h264_refs.c | 2 +- libavcodec/h264_sei.c | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 1a6a259aa5..d855b7bfb7 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4950,6 +4950,7 @@ again: if(!idr_cleared) idr(h); // FIXME ensure we don't lose some frames if there is reordering idr_cleared = 1; + h->has_recovery_point = 1; case NAL_SLICE: init_get_bits(&hx->gb, ptr, bit_length); hx->intra_gb_ptr = diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 1a106d6762..4a41fffe66 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -677,6 +677,8 @@ typedef struct H264Context { int frame_recovered; ///< Initial frame has been completely recovered + int has_recovery_point; + int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 253cd85029..1cd8a6dfda 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -771,7 +771,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count) if ( err >= 0 && h->long_ref_count==0 && (h->short_ref_count<=2 || h->pps.ref_count[0] <= 1 && h->pps.ref_count[1] <= 1 && pps_count == 1) - && h->pps.ref_count[0]<=2 + (h->picture_structure != PICT_FRAME) + && h->pps.ref_count[0]<=2 + (h->picture_structure != PICT_FRAME) + (2*!h->has_recovery_point) && h->cur_pic_ptr->f.pict_type == AV_PICTURE_TYPE_I){ h->cur_pic_ptr->recovered |= 1; if(!h->avctx->has_b_frames) diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c index 4e2f981181..88bf0f4977 100644 --- a/libavcodec/h264_sei.c +++ b/libavcodec/h264_sei.c @@ -183,6 +183,8 @@ static int decode_recovery_point(H264Context *h) if (h->avctx->debug & FF_DEBUG_PICT_INFO) av_log(h->avctx, AV_LOG_DEBUG, "sei_recovery_frame_cnt: %d\n", h->sei_recovery_frame_cnt); + h->has_recovery_point = 1; + return 0; } From dae6c199950ffd34e53d1fd2522e212e32bfe667 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Jun 2014 01:32:22 +0200 Subject: [PATCH 267/822] avcodec/mjpegdec: Improve intel jpeg flip heuristic Fixes Ticket3698 Signed-off-by: Michael Niedermayer (cherry picked from commit 0545ef7116db1e87894d978bfa400578652c716d) --- libavcodec/mjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 2c79da533c..b498d0fad3 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1718,7 +1718,7 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) parse_avid(s, cbuf, len); } else if (!strcmp(cbuf, "CS=ITU601")) s->cs_itu601 = 1; - else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) || + else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32) && s->avctx->codec_tag) || (!strncmp(cbuf, "Metasoft MJPEG Codec", 20))) s->flipped = 1; From 1e8ff7d21dc4906281ecd54d44b8b56a398d6c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 5 Jun 2014 11:56:10 +0300 Subject: [PATCH 268/822] adpcm: Fix trellis encoding of IMA QT This was broken in 095be4fb - samples+ch (for the previous non-planar case) equals &samples_p[ch][0]. The confusion probably stemmed from the IMA WAV case where it originally was &samples[avctx->channels + ch], which was correctly changed into &samples_p[ch][1]. Fixes part of Ticket3701 Signed-off-by: Michael Niedermayer (cherry picked from commit a32765c4252eb106a2ade543026ef6f59e699bfa) --- libavcodec/adpcmenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 5391570de7..bfcce328ef 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -549,7 +549,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, put_bits(&pb, 7, status->step_index); if (avctx->trellis > 0) { uint8_t buf[64]; - adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status, + adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status, 64, 1); for (i = 0; i < 64; i++) put_bits(&pb, 4, buf[i ^ 1]); From 3002e5976d43947ce2bd760c7135a09b85ab5ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 6 Jun 2014 12:03:09 +0300 Subject: [PATCH 269/822] adpcm: Write the proper predictor in trellis mode in IMA QT The actual predictor value, set by the trellis code, never was written back into the variable that was written into the block header. This was accidentally removed in b304244b. This significantly improves the audio quality of the trellis case, which was plain broken since b304244b. Encoding IMA QT with trellis still actually gives a slightly worse quality than without trellis, since the trellis encoder doesn't use the exact same way of rounding as in adpcm_ima_qt_compress_sample and adpcm_ima_qt_expand_nibble. Fixes part of Ticket3701 Signed-off-by: Michael Niedermayer (cherry picked from commit fa8f060b75bf9074792a0f9ff4ed002652ef62b8) Conflicts: tests/ref/acodec/adpcm-ima_qt-trellis --- libavcodec/adpcmenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index bfcce328ef..da149a3962 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -553,6 +553,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, 64, 1); for (i = 0; i < 64; i++) put_bits(&pb, 4, buf[i ^ 1]); + status->prev_sample = status->predictor; } else { for (i = 0; i < 64; i += 2) { int t1, t2; From 6672f672d98cf4887e13321b6f67682cfd1273b4 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 10 Jun 2014 17:41:57 +0200 Subject: [PATCH 270/822] avconv: make -shortest work with streamcopy CC: libav-stable@libav.org (cherry picked from commit 48e50921337984ba4ec2c1cafe45d43787f84498) Signed-off-by: Anton Khirnov --- avconv.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/avconv.c b/avconv.c index 64e832149c..5a7c4774c9 100644 --- a/avconv.c +++ b/avconv.c @@ -687,6 +687,19 @@ static int poll_filter(OutputStream *ost) return 0; } +static void finish_output_stream(OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + int i; + + ost->finished = 1; + + if (of->shortest) { + for (i = 0; i < of->ctx->nb_streams; i++) + output_streams[of->ost_index + i]->finished = 1; + } +} + /* * Read as many frames from possible from lavfi and encode them. * @@ -697,7 +710,7 @@ static int poll_filter(OutputStream *ost) */ static int poll_filters(void) { - int i, j, ret = 0; + int i, ret = 0; while (ret >= 0 && !received_sigterm) { OutputStream *ost = NULL; @@ -724,15 +737,7 @@ static int poll_filters(void) ret = poll_filter(ost); if (ret == AVERROR_EOF) { - OutputFile *of = output_files[ost->file_index]; - - ost->finished = 1; - - if (of->shortest) { - for (j = 0; j < of->ctx->nb_streams; j++) - output_streams[of->ost_index + j]->finished = 1; - } - + finish_output_stream(ost); ret = 0; } else if (ret == AVERROR(EAGAIN)) return 0; @@ -2205,7 +2210,7 @@ static int process_input(void) if (ost->source_index == ifile->ist_index + i && (ost->stream_copy || ost->enc->type == AVMEDIA_TYPE_SUBTITLE)) - ost->finished= 1; + finish_output_stream(ost); } } From 98f33430a2a7ecb98fd91d0a37c5fea5766900e1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 11 Jun 2014 21:09:54 -0400 Subject: [PATCH 271/822] vp9/x86: fix overwrite in ipred_vl_4x4_ssse3. Fixes track ticket 3717. Signed-off-by: Michael Niedermayer (cherry picked from commit 385a3420d1da2f6812dda56750b41edd469c6079) --- libavcodec/x86/vp9intrapred.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/vp9intrapred.asm b/libavcodec/x86/vp9intrapred.asm index 3faf1c564d..a6b5442b06 100644 --- a/libavcodec/x86/vp9intrapred.asm +++ b/libavcodec/x86/vp9intrapred.asm @@ -817,13 +817,13 @@ cglobal vp9_ipred_vl_4x4, 4, 4, 0, dst, stride, l, a psrlq m2, m1, 8 LOWPASS 2, 1, 0, 3 pavgb m1, m0 - movq [dstq+strideq*0], m1 - movq [dstq+strideq*1], m2 + movd [dstq+strideq*0], m1 + movd [dstq+strideq*1], m2 lea dstq, [dstq+strideq*2] psrlq m1, 8 psrlq m2, 8 - movq [dstq+strideq*0], m1 - movq [dstq+strideq*1], m2 + movd [dstq+strideq*0], m1 + movd [dstq+strideq*1], m2 RET %macro VL_XMM_FUNCS 1 From f378636d90af664e162f75c295167078e3a97360 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 13 Apr 2014 20:03:24 +0200 Subject: [PATCH 272/822] avformat/mp3enc: drop redundant and uninitialized variable Signed-off-by: Michael Niedermayer (cherry picked from commit eccec203978e53f897a3c6105d011bbdff2a978b) Signed-off-by: Michael Niedermayer --- libavformat/mp3enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 0eecdb7f1b..9c9bd5e862 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -124,7 +124,7 @@ static int mp3_write_xing(AVFormatContext *s) int best_bitrate_error = INT_MAX; int xing_offset; int ver = 0; - int bytes_needed, lsf; + int bytes_needed; const char *vendor = (codec->flags & CODEC_FLAG_BITEXACT) ? "Lavf" : LIBAVFORMAT_IDENT; if (!s->pb->seekable || !mp3->write_xing) @@ -161,7 +161,7 @@ static int mp3_write_xing(AVFormatContext *s) header |= channels << 6; for (bitrate_idx = 1; bitrate_idx < 15; bitrate_idx++) { - int bit_rate = 1000 * avpriv_mpa_bitrate_tab[lsf][3 - 1][bitrate_idx]; + int bit_rate = 1000 * avpriv_mpa_bitrate_tab[ver != 3][3 - 1][bitrate_idx]; int error = FFABS(bit_rate - codec->bit_rate); if (error < best_bitrate_error) { From 52572ca1b33932eb4db01acc1fb37e85264efbab Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 21 Jun 2014 19:35:06 +0200 Subject: [PATCH 273/822] Show duration for large asf files as written in the file header. Fixes ticket #3428. (cherry picked from commit e3fd263f0b73e4425192d6dd1ab18027ecaa35db) --- libavformat/asfdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 093e328a8d..9bbc70467d 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -370,7 +370,8 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) if (!(asf->hdr.flags & 0x01)) { // if we aren't streaming... int64_t fsize = avio_size(pb); - if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 || FFABS(fsize - (int64_t)asf->hdr.file_size) < 10000) + if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 || + FFABS(fsize - (int64_t)asf->hdr.file_size) / (float)FFMIN(fsize, asf->hdr.file_size) < 0.05) st->duration = asf->hdr.play_time / (10000000 / 1000) - start_time; } From 7d9c059a3525aa9f3e257b4c13df2b8c30409f3c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Jun 2014 03:15:28 +0200 Subject: [PATCH 274/822] avutil/lzo: Fix integer overflow Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list) Fixes: LMS-2014-06-16-4 Found-by: "Don A. Bailey" See: ccda51b14c0fcae2fad73a24872dce75a7964996 Signed-off-by: Michael Niedermayer (cherry picked from commit d6af26c55c1ea30f85a7d9edbc373f53be1743ee) Signed-off-by: Michael Niedermayer --- libavutil/lzo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 221a66b9ab..82dba94771 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -65,8 +65,13 @@ static inline int get_len(LZOContext *c, int x, int mask) { int cnt = x & mask; if (!cnt) { - while (!(x = get_byte(c))) + while (!(x = get_byte(c))) { + if (cnt >= INT_MAX - 1000) { + c->error |= AV_LZO_ERROR; + break; + } cnt += 255; + } cnt += mask + x; } return cnt; From 61796a8999f5ef39cd4f5aa81bfd7d3f62dc17f2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 23 Jun 2014 14:45:47 +0200 Subject: [PATCH 275/822] avutil/lzo: add asserts to be double sure against overflows These asserts cannot fail since d6af26c55c1ea30f85a7d9edbc373f53be1743ee Based-on: ccda51b14c0fcae2fad73a24872dce75a7964996 Signed-off-by: Michael Niedermayer (cherry picked from commit cf2b7c01f81c1fb3283a1390c0ca9a2f81f4f4a8) Signed-off-by: Michael Niedermayer --- libavutil/lzo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 82dba94771..6104fc3085 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -22,6 +22,7 @@ #include #include "avutil.h" +#include "avassert.h" #include "common.h" #include "intreadwrite.h" #include "lzo.h" @@ -85,6 +86,7 @@ static inline void copy(LZOContext *c, int cnt) { register const uint8_t *src = c->in; register uint8_t *dst = c->out; + av_assert0(cnt >= 0); if (cnt > c->in_end - src) { cnt = FFMAX(c->in_end - src, 0); c->error |= AV_LZO_INPUT_DEPLETED; @@ -116,6 +118,7 @@ static inline void copy(LZOContext *c, int cnt) static inline void copy_backptr(LZOContext *c, int back, int cnt) { register uint8_t *dst = c->out; + av_assert0(cnt > 0); if (dst - c->out_start < back) { c->error |= AV_LZO_INVALID_BACKPTR; return; From 63e3a978157987aa9e4d5e004f8e2d45b967ef94 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Jun 2014 23:21:15 +0200 Subject: [PATCH 276/822] avcodec/aic: fix quantization table permutation Fixes Ticket3700 Signed-off-by: Michael Niedermayer (cherry picked from commit 0a2004b6d11ff962361420c3150fe760cf1f7115) Signed-off-by: Michael Niedermayer --- libavcodec/aic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/aic.c b/libavcodec/aic.c index a7e3691aa0..3963642194 100644 --- a/libavcodec/aic.c +++ b/libavcodec/aic.c @@ -150,6 +150,7 @@ typedef struct AICContext { int16_t *data_ptr[NUM_BANDS]; DECLARE_ALIGNED(16, int16_t, block)[64]; + DECLARE_ALIGNED(16, uint8_t, quant_matrix)[64]; } AICContext; static int aic_decode_header(AICContext *ctx, const uint8_t *src, int size) @@ -285,7 +286,7 @@ static void recombine_block_il(int16_t *dst, const uint8_t *scan, } } -static void unquant_block(int16_t *block, int q) +static void unquant_block(int16_t *block, int q, uint8_t *quant_matrix) { int i; @@ -293,7 +294,7 @@ static void unquant_block(int16_t *block, int q) int val = (uint16_t)block[i]; int sign = val & 1; - block[i] = (((val >> 1) ^ -sign) * q * aic_quant_matrix[i] >> 4) + block[i] = (((val >> 1) ^ -sign) * q * quant_matrix[i] >> 4) + sign; } } @@ -334,7 +335,7 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, else recombine_block_il(ctx->block, ctx->scantable.permutated, &base_y, &ext_y, blk); - unquant_block(ctx->block, ctx->quant); + unquant_block(ctx->block, ctx->quant, ctx->quant_matrix); ctx->dsp.idct(ctx->block); if (!ctx->interlaced) { @@ -352,7 +353,7 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, for (blk = 0; blk < 2; blk++) { recombine_block(ctx->block, ctx->scantable.permutated, &base_c, &ext_c); - unquant_block(ctx->block, ctx->quant); + unquant_block(ctx->block, ctx->quant, ctx->quant_matrix); ctx->dsp.idct(ctx->block); ctx->dsp.put_signed_pixels_clamped(ctx->block, C[blk], ctx->frame->linesize[blk + 1]); @@ -430,6 +431,8 @@ static av_cold int aic_decode_init(AVCodecContext *avctx) for (i = 0; i < 64; i++) scan[i] = i; ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, scan); + for (i = 0; i < 64; i++) + ctx->quant_matrix[ctx->dsp.idct_permutation[i]] = aic_quant_matrix[i]; ctx->mb_width = FFALIGN(avctx->width, 16) >> 4; ctx->mb_height = FFALIGN(avctx->height, 16) >> 4; From e173834af8b531b16a5cf367b4ea1f8e1b5fb403 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Jun 2014 12:03:31 +0200 Subject: [PATCH 277/822] avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled. Found-by: Jean-Baptiste Kempf Signed-off-by: Michael Niedermayer (cherry picked from commit 74760883fcb4443d105814ed246b3cf51d7e9dca) Signed-off-by: Michael Niedermayer --- libavformat/flvenc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 15c9997e6b..9778719a39 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -223,6 +223,18 @@ static int flv_write_header(AVFormatContext *s) avcodec_get_name(enc->codec_id), i); return AVERROR(EINVAL); } + if (enc->codec_id == AV_CODEC_ID_MPEG4 || + enc->codec_id == AV_CODEC_ID_H263) { + int error = enc->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL; + av_log(s, error ? AV_LOG_ERROR : AV_LOG_WARNING, + "Codec %s is not supported in the official FLV specification,\n", avcodec_get_name(enc->codec_id)); + + if (error) { + av_log(s, AV_LOG_ERROR, + "use vstrict=-1 / -strict -1 to use it anyway.\n"); + return AVERROR(EINVAL); + } + } break; case AVMEDIA_TYPE_AUDIO: if (audio_enc) { From dad0c9d686a3377cd699907a5e1717f234289be0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Jun 2014 14:30:30 +0200 Subject: [PATCH 278/822] avcodec/alsdec: Clear MPEG4AudioConfig so that no use of uninitialized memory is possible Signed-off-by: Michael Niedermayer (cherry picked from commit 6e6bd5481cf42a9765c492c77754d4633092cece) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 27d190241c..89cc8a6230 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -280,7 +280,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx) GetBitContext gb; uint64_t ht_size; int i, config_offset; - MPEG4AudioConfig m4ac; + MPEG4AudioConfig m4ac = {0}; ALSSpecificConfig *sconf = &ctx->sconf; AVCodecContext *avctx = ctx->avctx; uint32_t als_id, header_size, trailer_size; From 252a0ccb80b40f1b3af99b0823d59d052940a26a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 9 Jun 2014 05:47:49 +0200 Subject: [PATCH 279/822] cavsdec: fix qp fixed slice handling Fixes Ticket3400 Signed-off-by: Michael Niedermayer (cherry picked from commit 0accf24b15ac5a01a67768f41c896ef4e4b8b4a2) Signed-off-by: Michael Niedermayer --- libavcodec/cavs.h | 1 + libavcodec/cavsdec.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index f3c05dc9f0..f85140927b 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -214,6 +214,7 @@ typedef struct AVSContext { int luma_scan[4]; int qp; int qp_fixed; + int pic_qp_fixed; int cbp; ScanTable scantable; diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 93d1c59d5a..399b5b914f 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -904,7 +904,7 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) /* mark top macroblocks as unavailable */ h->flags &= ~(B_AVAIL | C_AVAIL); - if ((h->mby == 0) && (!h->qp_fixed)) { + if (!h->pic_qp_fixed) { h->qp_fixed = get_bits1(gb); h->qp = get_bits(gb, 6); } @@ -1027,6 +1027,7 @@ static int decode_pic(AVSContext *h) skip_bits1(&h->gb); //advanced_pred_mode_disable skip_bits1(&h->gb); //top_field_first skip_bits1(&h->gb); //repeat_first_field + h->pic_qp_fixed = h->qp_fixed = get_bits1(&h->gb); h->qp = get_bits(&h->gb, 6); if (h->cur.f->pict_type == AV_PICTURE_TYPE_I) { From e4cdde96b381f2b92ff65ce4793840f82b414157 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 9 Jun 2014 05:17:34 +0200 Subject: [PATCH 280/822] avformat/cavsvideodec: Fix probing when the file extension is avs Signed-off-by: Michael Niedermayer (cherry picked from commit 52e563bb2f7897d615391520c3c4acba1ee7dcb4) Signed-off-by: Michael Niedermayer --- libavformat/cavsvideodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/cavsvideodec.c b/libavformat/cavsvideodec.c index 5ca3c80b32..880f4ab534 100644 --- a/libavformat/cavsvideodec.c +++ b/libavformat/cavsvideodec.c @@ -61,7 +61,7 @@ static int cavsvideo_probe(AVProbeData *p) } } if(seq && seq*9<=pic*10) - return AVPROBE_SCORE_EXTENSION; + return AVPROBE_SCORE_EXTENSION+1; return 0; } From d07be523f5d8e2184b581c564e1b5e00440c5dc2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 15 Jun 2014 00:49:02 +0200 Subject: [PATCH 281/822] avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it Signed-off-by: Michael Niedermayer (cherry picked from commit 86a9370e2b91d67375e66a06d6eb573b5a017775) Signed-off-by: Michael Niedermayer --- libavformat/mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpc.c b/libavformat/mpc.c index c3faebe6c0..8f8ac9c389 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -152,7 +152,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt) } c->curbits = (curbits + size2) & 0x1F; - if ((ret = av_new_packet(pkt, size)) < 0) + if ((ret = av_new_packet(pkt, size + 4)) < 0) return ret; pkt->data[0] = curbits; From e0a03d1f9cb18139ede8c3d0263a21828494c951 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 23 Jun 2014 15:51:02 +0200 Subject: [PATCH 282/822] update for FFmpeg 2.2.4 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 585940699b..530cdd91a2 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.3 +2.2.4 diff --git a/VERSION b/VERSION index 585940699b..530cdd91a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.3 +2.2.4 diff --git a/doc/Doxyfile b/doc/Doxyfile index 584781641c..1e5778ca7d 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.3 +PROJECT_NUMBER = 2.2.4 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 6d899d0206e91a3a74680b47ec06ef1dbc151c21 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 19 Jun 2014 23:26:58 +0200 Subject: [PATCH 283/822] lzo: Handle integer overflow get_len can overflow for specially crafted payload. Reported-By: Don A. Baley CC: libav-stable@libav.org (cherry picked from commit ccda51b14c0fcae2fad73a24872dce75a7964996) Signed-off-by: Luca Barbato --- libavutil/lzo.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 5c5ebc850a..e458165261 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -80,6 +80,10 @@ static inline void copy(LZOContext *c, int cnt) { register const uint8_t *src = c->in; register uint8_t *dst = c->out; + if (cnt < 0) { + c->error |= AV_LZO_ERROR; + return; + } if (cnt > c->in_end - src) { cnt = FFMAX(c->in_end - src, 0); c->error |= AV_LZO_INPUT_DEPLETED; @@ -103,7 +107,7 @@ static inline void copy(LZOContext *c, int cnt) /** * @brief Copies previously decoded bytes to current position. * @param back how many bytes back we start - * @param cnt number of bytes to copy, must be >= 0 + * @param cnt number of bytes to copy, must be > 0 * * cnt > back is valid, this will copy the bytes we just copied, * thus creating a repeating pattern with a period length of back. @@ -111,6 +115,10 @@ static inline void copy(LZOContext *c, int cnt) static inline void copy_backptr(LZOContext *c, int back, int cnt) { register uint8_t *dst = c->out; + if (cnt <= 0) { + c->error |= AV_LZO_ERROR; + return; + } if (dst - c->out_start < back) { c->error |= AV_LZO_INVALID_BACKPTR; return; From fcbcc561e0fdc95a7dd48b92db53846726aec27e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 22 Jun 2014 13:11:32 -0400 Subject: [PATCH 284/822] Check if an mp3 header is using a reserved sample rate. Fixes an invalid read past the end of avpriv_mpa_freq_tab. Fixes divide-by-zero due to sample_rate being set to 0. Bug-Id: 705 CC:libav-stable@libav.org (cherry picked from commit 44127546b0a81dc9dd6190739a62d48f0044c6f3) Signed-off-by: Luca Barbato --- libavcodec/mpegaudiodecheader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c index 69dda452c3..25e73195b8 100644 --- a/libavcodec/mpegaudiodecheader.c +++ b/libavcodec/mpegaudiodecheader.c @@ -24,6 +24,8 @@ * MPEG Audio header decoder. */ +#include "libavutil/common.h" + #include "avcodec.h" #include "mpegaudio.h" #include "mpegaudiodata.h" @@ -45,6 +47,8 @@ int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) s->layer = 4 - ((header >> 17) & 3); /* extract frequency */ sample_rate_index = (header >> 10) & 3; + if (sample_rate_index >= FF_ARRAY_ELEMS(avpriv_mpa_freq_tab)) + sample_rate_index = 0; sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); sample_rate_index += 3 * (s->lsf + mpeg25); s->sample_rate_index = sample_rate_index; From 46c477c2a14b04a63ab11d31003b48fab6146a96 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 22 Jun 2014 13:19:36 -0400 Subject: [PATCH 285/822] Check mp3 header before calling avpriv_mpegaudio_decode_header(). As indicated in the function documentation, the header MUST be checked prior to calling it because no consistency check is done there. CC:libav-stable@libav.org (cherry picked from commit f2f2e7627f0c878d13275af5d166ec5932665e28) Signed-off-by: Luca Barbato --- libavcodec/libmp3lame.c | 8 +++++++- libavformat/mp3enc.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index ee76ff8812..2fc080ff09 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -175,6 +175,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, MPADecodeHeader hdr; int len, ret, ch; int lame_result; + uint32_t h; if (frame) { switch (avctx->sample_fmt) { @@ -230,7 +231,12 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, determine the frame size. */ if (s->buffer_index < 4) return 0; - if (avpriv_mpegaudio_decode_header(&hdr, AV_RB32(s->buffer))) { + h = AV_RB32(s->buffer); + if (ff_mpa_check_header(h) < 0) { + av_log(avctx, AV_LOG_ERROR, "Invalid mp3 header at start of buffer\n"); + return AVERROR_BUG; + } + if (avpriv_mpegaudio_decode_header(&hdr, h)) { av_log(avctx, AV_LOG_ERROR, "free format output not supported\n"); return -1; } diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 932625864f..476d7f71cb 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -252,13 +252,16 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt) if (mp3->xing_offset && pkt->size >= 4) { MPADecodeHeader c; + uint32_t h; - avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data)); - - if (!mp3->initial_bitrate) - mp3->initial_bitrate = c.bit_rate; - if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate)) - mp3->has_variable_bitrate = 1; + h = AV_RB32(pkt->data); + if (ff_mpa_check_header(h) == 0) { + avpriv_mpegaudio_decode_header(&c, h); + if (!mp3->initial_bitrate) + mp3->initial_bitrate = c.bit_rate; + if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate)) + mp3->has_variable_bitrate = 1; + } mp3_xing_add_frame(mp3, pkt); } From 74f6df745a05d3d8b3dcfc28992c69a70ae87957 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Sun, 9 Mar 2014 18:52:40 +0100 Subject: [PATCH 286/822] jpeg2000: fix dereferencing invalid pointers during cleanup CC: libav-stable@libav.org Found-by: Laurent Butti Signed-off-by: Vittorio Giovara --- libavcodec/jpeg2000.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index bf46398361..154409e035 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -228,7 +228,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp, if (!comp->i_data) return AVERROR(ENOMEM); } - comp->reslevel = av_malloc_array(codsty->nreslevels, sizeof(*comp->reslevel)); + comp->reslevel = av_mallocz_array(codsty->nreslevels, sizeof(*comp->reslevel)); if (!comp->reslevel) return AVERROR(ENOMEM); /* LOOP on resolution levels */ @@ -276,7 +276,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp, reslevel->log2_prec_height) - (reslevel->coord[1][0] >> reslevel->log2_prec_height); - reslevel->band = av_malloc_array(reslevel->nbands, sizeof(*reslevel->band)); + reslevel->band = av_mallocz_array(reslevel->nbands, sizeof(*reslevel->band)); if (!reslevel->band) return AVERROR(ENOMEM); @@ -372,9 +372,9 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp, for (j = 0; j < 2; j++) band->coord[1][j] = ff_jpeg2000_ceildiv(band->coord[1][j], dy); - band->prec = av_malloc_array(reslevel->num_precincts_x * - reslevel->num_precincts_y, - sizeof(*band->prec)); + band->prec = av_mallocz_array(reslevel->num_precincts_x * + reslevel->num_precincts_y, + sizeof(*band->prec)); if (!band->prec) return AVERROR(ENOMEM); @@ -487,15 +487,30 @@ void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty) for (reslevelno = 0; comp->reslevel && reslevelno < codsty->nreslevels; reslevelno++) { - Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno; + Jpeg2000ResLevel *reslevel; + if (!comp->reslevel) + continue; + + reslevel = comp->reslevel + reslevelno; for (bandno = 0; bandno < reslevel->nbands; bandno++) { - Jpeg2000Band *band = reslevel->band + bandno; + Jpeg2000Band *band; + + if (!reslevel->band) + continue; + + band = reslevel->band + bandno; for (precno = 0; precno < reslevel->num_precincts_x * reslevel->num_precincts_y; precno++) { - Jpeg2000Prec *prec = band->prec + precno; + Jpeg2000Prec *prec; + + if (!band->prec) + continue; + + prec = band->prec + precno; av_freep(&prec->zerobits); av_freep(&prec->cblkincl); av_freep(&prec->cblk); + } av_freep(&band->prec); From 4ec1acc6e4f4d0bd28617bbb30ebfb779ce7df92 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 18 May 2014 21:16:47 +0200 Subject: [PATCH 287/822] avpacket: fix copying side data in av_packet_copy_props() Side data count is incremented by by calling av_packet_new_side_data() in the following loop, setting it explicitly results in the resulting value being twice what it should be. CC: libav-stable@libav.org (cherry picked from commit cdf58f0599c39852ee3beafe5f64af7d57d4215b) Signed-off-by: Luca Barbato --- libavcodec/avpacket.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index c0a0f8cd7b..052aaf8638 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -325,7 +325,6 @@ int av_packet_copy_props(AVPacket *dst, const AVPacket *src) dst->convergence_duration = src->convergence_duration; dst->flags = src->flags; dst->stream_index = src->stream_index; - dst->side_data_elems = src->side_data_elems; for (i = 0; i < src->side_data_elems; i++) { enum AVPacketSideDataType type = src->side_data[i].type; From 16f7cbef5610a878317596134607d2a89da66ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 6 Jun 2014 13:59:14 +0300 Subject: [PATCH 288/822] oggenc: Set the right AVOption size for the pref_duration option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On big endian machines, the default value set via the faulty AVOption ended up as 2^32 times too big. This fixes the fate-lavf-ogg test which currently is broken on big endian machines, broken since 3831362. Since that commit, a final zero-sized packet is written to the ogg muxer in that test, which caused different flushing behaviour on little and big endian depending on whether the pref_duration option was handled as it should or not. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 103243ca649cc305129ed0352bf4d97e5ddf4d80) Signed-off-by: Luca Barbato --- libavformat/oggenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index fd102c86ad..a03ac153c7 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -80,7 +80,7 @@ static const AVOption options[] = { { "pagesize", "preferred page size in bytes (deprecated)", OFFSET(pref_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_PAGE_SIZE, PARAM }, { "page_duration", "preferred page duration, in microseconds", - OFFSET(pref_duration), AV_OPT_TYPE_INT, { .i64 = 1000000 }, 0, INT64_MAX, PARAM }, + OFFSET(pref_duration), AV_OPT_TYPE_INT64, { .i64 = 1000000 }, 0, INT64_MAX, PARAM }, { NULL }, }; From 771564945aa9aebe2f30192b925fcf4909225eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 5 Jun 2014 11:48:53 +0300 Subject: [PATCH 289/822] adpcm: Avoid reading out of bounds in the IMA QT trellis encoder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was broken in 095be4fb - samples+ch (for the previous non-planar case) equals &samples_p[ch][0]. The confusion probably stemmed from the IMA WAV case where it originally was &samples[avctx->channels + ch], which was correctly changed into &samples_p[ch][1]. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba) Signed-off-by: Luca Barbato --- libavcodec/adpcmenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index fb3ce0d24b..2cf8d6f8a2 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -549,7 +549,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, put_bits(&pb, 7, status->step_index); if (avctx->trellis > 0) { uint8_t buf[64]; - adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status, + adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status, 64, 1); for (i = 0; i < 64; i++) put_bits(&pb, 4, buf[i ^ 1]); From 564c023eba807b162527b17af40424de275fc795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 5 Jun 2014 14:49:14 +0300 Subject: [PATCH 290/822] adpcm: Write the proper predictor in trellis mode in IMA QT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The actual predictor value, set by the trellis code, never was written back into the variable that was written into the block header. This was accidentally removed in b304244b. This significantly improves the audio quality of the trellis case, which was plain broken since b304244b. Encoding IMA QT with trellis still actually gives a slightly worse quality than without trellis, since the trellis encoder doesn't use the exact same way of rounding as in adpcm_ima_qt_compress_sample and adpcm_ima_qt_expand_nibble. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 0776e0ef6ba4160281ef3fabea43e670f3792b4a) Signed-off-by: Luca Barbato --- libavcodec/adpcmenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 2cf8d6f8a2..341dda475a 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -553,6 +553,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, 64, 1); for (i = 0; i < 64; i++) put_bits(&pb, 4, buf[i ^ 1]); + status->prev_sample = status->predictor; } else { for (i = 0; i < 64; i += 2) { int t1, t2; From 52dd1a933ed4717fa577ec516ce9e65075a5a04d Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 26 Jun 2014 21:11:20 -0400 Subject: [PATCH 291/822] Update Changelog for v10.2 --- Changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Changelog b/Changelog index 30e63c9cf2..566de4ba0a 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,19 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.2: +- adpcm: Write the proper predictor in trellis mode in IMA QT +- adpcm: Avoid reading out of bounds in the IMA QT trellis encoder +- oggenc: Set the right AVOption size for the pref_duration option +- avpacket: fix copying side data in av_packet_copy_props() +- jpeg2000: fix dereferencing invalid pointers during cleanup +- Check mp3 header before calling avpriv_mpegaudio_decode_header() (bug/705) +- Check if an mp3 header is using a reserved sample rate +- lzo: Handle integer overflow (bug/704) +- avconv: make -shortest work with streamcopy +- ppc: Fix compilation for ppc64le (ELFv2) (ubuntu/1263802) +- aarch64: Use the correct syntax for relocations (debian/751856, ubuntu/1323144) + version 10.1: - pcm-dvd: Fix 20bit decoding (bug/592) - avi: Improve non-interleaved detection (bug/666) From 40dd29653ab85812d21fa64e9a665ceb316701ad Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 26 Jun 2014 21:14:55 -0400 Subject: [PATCH 292/822] Prepare for 10.2 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index ae425d6981..e2498ea52d 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.1 +10.2 From 95e91aaf335dd9c26a9101c38d4926e5271e7e00 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 5 Jul 2014 22:24:43 -0700 Subject: [PATCH 293/822] af_compand: make sure request_frame always outputs at least one frame This fixes a segmentation fault because request_frame in fifo.c assumes that the call to ff_request_frame will populate fifo->root.next. Before, it was possible for request_frame in af_compand to not do this, resulting in a null pointer access. Now, request_frame in af_compand always will return at least one frame or an error, as per the API specifications in avfilter.h for request_frame. Signed-off-by: Anton Khirnov (cherry picked from commit d3cfd7aff86ee3d449ca68aba21d67b9b2136a9b) Signed-off-by: Anton Khirnov --- libavfilter/af_compand.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index a6692bc37f..f21c861e06 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -71,6 +71,8 @@ typedef struct CompandContext { int64_t pts; int (*compand)(AVFilterContext *ctx, AVFrame *frame); + /* set by filter_frame() to signal an output frame to request_frame() */ + int got_output; } CompandContext; #define OFFSET(x) offsetof(CompandContext, x) @@ -287,7 +289,15 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame) s->delay_index = dindex; av_frame_free(&frame); - return out_frame ? ff_filter_frame(ctx->outputs[0], out_frame) : 0; + + if (out_frame) { + err = ff_filter_frame(ctx->outputs[0], out_frame); + if (err >= 0) + s->got_output = 1; + return err; + } + + return 0; } static int compand_drain(AVFilterLink *outlink) @@ -559,9 +569,11 @@ static int request_frame(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; CompandContext *s = ctx->priv; - int ret; + int ret = 0; - ret = ff_request_frame(ctx->inputs[0]); + s->got_output = 0; + while (ret >= 0 && !s->got_output) + ret = ff_request_frame(ctx->inputs[0]); if (ret == AVERROR_EOF && s->delay_count) ret = compand_drain(outlink); From a770a61e6d6eee8fffe9f0f488679ee98467c1f6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Jun 2014 17:49:03 +0200 Subject: [PATCH 294/822] avfilter/vf_pullup: use ptrdiff_t as stride argument for dsp functions This should avoid issues on x86_64 Signed-off-by: Michael Niedermayer (cherry picked from commit 6dffc8f5aaab6b20385f0a0d9ef95cec7d6cdd4b) Signed-off-by: Michael Niedermayer --- libavfilter/vf_pullup.c | 8 ++++---- libavfilter/vf_pullup.h | 6 +++--- libavfilter/x86/vf_pullup_init.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 5b448dd313..c87b4b3801 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -69,7 +69,7 @@ static int query_formats(AVFilterContext *ctx) #define ABS(a) (((a) ^ ((a) >> 31)) - ((a) >> 31)) -static int diff_c(const uint8_t *a, const uint8_t *b, int s) +static int diff_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, diff = 0; @@ -83,7 +83,7 @@ static int diff_c(const uint8_t *a, const uint8_t *b, int s) return diff; } -static int comb_c(const uint8_t *a, const uint8_t *b, int s) +static int comb_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, comb = 0; @@ -98,7 +98,7 @@ static int comb_c(const uint8_t *a, const uint8_t *b, int s) return comb; } -static int var_c(const uint8_t *a, const uint8_t *b, int s) +static int var_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, var = 0; @@ -531,7 +531,7 @@ static void pullup_release_frame(PullupFrame *f) static void compute_metric(PullupContext *s, int *dest, PullupField *fa, int pa, PullupField *fb, int pb, - int (*func)(const uint8_t *, const uint8_t *, int)) + int (*func)(const uint8_t *, const uint8_t *, ptrdiff_t)) { int mp = s->metric_plane; int xstep = 8; diff --git a/libavfilter/vf_pullup.h b/libavfilter/vf_pullup.h index 3213b4d231..8f59335180 100644 --- a/libavfilter/vf_pullup.h +++ b/libavfilter/vf_pullup.h @@ -61,9 +61,9 @@ typedef struct PullupContext { PullupBuffer buffers[10]; PullupFrame frame; - int (*diff)(const uint8_t *a, const uint8_t *b, int s); - int (*comb)(const uint8_t *a, const uint8_t *b, int s); - int (*var )(const uint8_t *a, const uint8_t *b, int s); + int (*diff)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*comb)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*var )(const uint8_t *a, const uint8_t *b, ptrdiff_t s); } PullupContext; void ff_pullup_init_x86(PullupContext *s); diff --git a/libavfilter/x86/vf_pullup_init.c b/libavfilter/x86/vf_pullup_init.c index 9948abf13e..5b36b68e51 100644 --- a/libavfilter/x86/vf_pullup_init.c +++ b/libavfilter/x86/vf_pullup_init.c @@ -23,9 +23,9 @@ #include "libavutil/x86/cpu.h" #include "libavfilter/vf_pullup.h" -int ff_pullup_filter_diff_mmx(const uint8_t *a, const uint8_t *b, int s); -int ff_pullup_filter_comb_mmx(const uint8_t *a, const uint8_t *b, int s); -int ff_pullup_filter_var_mmx (const uint8_t *a, const uint8_t *b, int s); +int ff_pullup_filter_diff_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s); +int ff_pullup_filter_comb_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s); +int ff_pullup_filter_var_mmx (const uint8_t *a, const uint8_t *b, ptrdiff_t s); av_cold void ff_pullup_init_x86(PullupContext *s) { From f38c42b913abcfeea110fce8ec55233c731edd0d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Jun 2014 18:10:12 +0200 Subject: [PATCH 295/822] avfilter/x86/vf_pullup: fix old typo This makes C and MMX match, no change to fate as the differences where apparently not sufficient to show up in fate Signed-off-by: Michael Niedermayer (cherry picked from commit b8255a4c7096ecddea68e12e067c7a9b2e14ed8d) Signed-off-by: Michael Niedermayer --- libavfilter/x86/vf_pullup.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/x86/vf_pullup.asm b/libavfilter/x86/vf_pullup.asm index 3689b04ef2..4ce8b9b6f9 100644 --- a/libavfilter/x86/vf_pullup.asm +++ b/libavfilter/x86/vf_pullup.asm @@ -68,7 +68,7 @@ cglobal pullup_filter_comb, 3, 5, 8, first, second, size sub secondq, sizeq .loop: - movq m0, [secondq] + movq m0, [firstq] movq m1, [secondq] punpcklbw m0, m7 movq m2, [secondq+sizeq] From b8102ce56d8accc8aaf098b58f5c673f5772c5d8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 1 Jul 2014 03:49:36 +0200 Subject: [PATCH 296/822] cmdutils_opencl: Use av_malloc_array() Signed-off-by: Michael Niedermayer (cherry picked from commit 80da227c660e7bef7400f602a9817a897f07022b) Signed-off-by: Michael Niedermayer --- cmdutils_opencl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index 2a04db9a8a..d7e3287e4b 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -224,7 +224,7 @@ int opt_opencl_bench(void *optctx, const char *opt, const char *arg) av_log(NULL, AV_LOG_ERROR, "No OpenCL device detected!\n"); return AVERROR(EINVAL); } - if (!(devices = av_malloc(sizeof(OpenCLDeviceBenchmark) * nb_devices))) { + if (!(devices = av_malloc_array(nb_devices, sizeof(OpenCLDeviceBenchmark)))) { av_log(NULL, AV_LOG_ERROR, "Could not allocate buffer\n"); return AVERROR(ENOMEM); } From e064cce972fee32a576bc54719cc3d130a94abb6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 1 Jul 2014 03:50:17 +0200 Subject: [PATCH 297/822] avcodec/hevc: Use av_malloc(z)_array() Signed-off-by: Michael Niedermayer (cherry picked from commit 7faa7d3d42af12a60a4db7ecba165369ec5795d7) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 4aa1e55393..eae0757c81 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -102,26 +102,26 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) goto fail; s->skip_flag = av_malloc(pic_size_in_ctb); - s->tab_ct_depth = av_malloc(sps->min_cb_height * sps->min_cb_width); + s->tab_ct_depth = av_malloc_array(sps->min_cb_height, sps->min_cb_width); if (!s->skip_flag || !s->tab_ct_depth) goto fail; - s->cbf_luma = av_malloc(sps->min_tb_width * sps->min_tb_height); + s->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height); s->tab_ipm = av_mallocz(min_pu_size); s->is_pcm = av_malloc(min_pu_size); if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm) goto fail; s->filter_slice_edges = av_malloc(ctb_count); - s->tab_slice_address = av_malloc(pic_size_in_ctb * + s->tab_slice_address = av_malloc_array(pic_size_in_ctb, sizeof(*s->tab_slice_address)); - s->qp_y_tab = av_malloc(pic_size_in_ctb * + s->qp_y_tab = av_malloc_array(pic_size_in_ctb, sizeof(*s->qp_y_tab)); if (!s->qp_y_tab || !s->filter_slice_edges || !s->tab_slice_address) goto fail; - s->horizontal_bs = av_mallocz(2 * s->bs_width * (s->bs_height + 1)); - s->vertical_bs = av_mallocz(2 * s->bs_width * (s->bs_height + 1)); + s->horizontal_bs = av_mallocz_array(2 * s->bs_width, (s->bs_height + 1)); + s->vertical_bs = av_mallocz_array(2 * s->bs_width, (s->bs_height + 1)); if (!s->horizontal_bs || !s->vertical_bs) goto fail; @@ -652,9 +652,9 @@ static int hls_slice_header(HEVCContext *s) av_freep(&sh->entry_point_offset); av_freep(&sh->offset); av_freep(&sh->size); - sh->entry_point_offset = av_malloc(sh->num_entry_point_offsets * sizeof(int)); - sh->offset = av_malloc(sh->num_entry_point_offsets * sizeof(int)); - sh->size = av_malloc(sh->num_entry_point_offsets * sizeof(int)); + sh->entry_point_offset = av_malloc_array(sh->num_entry_point_offsets, sizeof(int)); + sh->offset = av_malloc_array(sh->num_entry_point_offsets, sizeof(int)); + sh->size = av_malloc_array(sh->num_entry_point_offsets, sizeof(int)); if (!sh->entry_point_offset || !sh->offset || !sh->size) { sh->num_entry_point_offsets = 0; av_log(s->avctx, AV_LOG_ERROR, "Failed to allocate memory\n"); @@ -2059,8 +2059,8 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int static int hls_slice_data_wpp(HEVCContext *s, const uint8_t *nal, int length) { HEVCLocalContext *lc = s->HEVClc; - int *ret = av_malloc((s->sh.num_entry_point_offsets + 1) * sizeof(int)); - int *arg = av_malloc((s->sh.num_entry_point_offsets + 1) * sizeof(int)); + int *ret = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); + int *arg = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); int offset; int startheader, cmpt = 0; int i, j, res = 0; From 64e069efac2937891b7e5a6d16677f1122afcc8b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 1 Jul 2014 03:50:53 +0200 Subject: [PATCH 298/822] avfilter/f_ebur128: Use av_malloc_array() Signed-off-by: Michael Niedermayer (cherry picked from commit a97137e9486964918a71f1a760cdcc297bf61b59) Signed-off-by: Michael Niedermayer --- libavfilter/f_ebur128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 2e510dbea3..a02cf28723 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -412,7 +412,7 @@ static int config_audio_output(AVFilterLink *outlink) if (ebur128->peak_mode & PEAK_MODE_TRUE_PEAKS) { int ret; - ebur128->swr_buf = av_malloc(19200 * nb_channels * sizeof(double)); + ebur128->swr_buf = av_malloc_array(nb_channels, 19200 * sizeof(double)); ebur128->true_peaks = av_calloc(nb_channels, sizeof(*ebur128->true_peaks)); ebur128->true_peaks_per_frame = av_calloc(nb_channels, sizeof(*ebur128->true_peaks_per_frame)); ebur128->swr_ctx = swr_alloc(); From 9752ab6b9e5d3b9f2347361b6b951911fecee022 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 13 Jul 2014 01:07:59 +0200 Subject: [PATCH 299/822] avformat/utils: do not wait for packets from discarded streams for genpts Fixes long loop Fixes Ticket3208 Signed-off-by: Michael Niedermayer (cherry picked from commit 8202c49b43621c04e26d4a3aa83a10e1e5cc1836) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 27b37b22e1..4dc1d9c25b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1597,7 +1597,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt) } /* read packet from packet buffer, if there is data */ - if (!(next_pkt->pts == AV_NOPTS_VALUE && + st = s->streams[next_pkt->stream_index]; + if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < AVDISCARD_ALL && next_pkt->dts != AV_NOPTS_VALUE && !eof)) { ret = read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt); From 9f8e3e6d1203e2b440ff3f7dbe90130a064963a1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 14 Jul 2014 21:03:43 +0200 Subject: [PATCH 300/822] avformat: add av_stream_get_parser() to access avformat AVParser The AVStream.parser field is considered private and its location cannot be preserved while preserving also ABI compatibility to libav, as libav added fields before it. Some tools like ffmpeg.c access this field though Signed-off-by: Michael Niedermayer (cherry picked from commit 62227a70f0a4c07d7ead5775d8bad64797f8ef80) Conflicts: RELEASE_NOTES doc/APIchanges libavformat/utils.c libavformat/version.h --- libavformat/avformat.h | 1 + libavformat/utils.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7839c0adc5..1587059024 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1005,6 +1005,7 @@ typedef struct AVStream { AVRational av_stream_get_r_frame_rate(const AVStream *s); void av_stream_set_r_frame_rate(AVStream *s, AVRational r); +struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); #define AV_PROGRAM_RUNNING 1 diff --git a/libavformat/utils.c b/libavformat/utils.c index 4dc1d9c25b..75f6639e6e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -110,6 +110,11 @@ MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) MAKE_ACCESSORS(AVFormatContext, format, void *, opaque) MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb) +struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) +{ + return st->parser; +} + static AVCodec *find_decoder(AVFormatContext *s, AVStream *st, enum AVCodecID codec_id) { if (st->codec->codec) From 160e91de89f6da536a118c7f1f397909bb0c84fa Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 14 Jul 2014 21:06:58 +0200 Subject: [PATCH 301/822] ffmpeg: Use av_stream_get_parser() to avoid ABI issues Signed-off-by: Michael Niedermayer (cherry picked from commit 8bbadc9b6ec71abbd9dab854c47027b949997af0) Conflicts: ffmpeg.c --- ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 4cc675ed63..a906186b1b 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1992,7 +1992,7 @@ static int output_packet(InputStream *ist, const AVPacket *pkt) if (avpkt.duration) { duration = av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q); } else if(ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0) { - int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; + int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict+1 : ist->st->codec->ticks_per_frame; duration = ((int64_t)AV_TIME_BASE * ist->st->codec->time_base.num * ticks) / ist->st->codec->time_base.den; @@ -2049,7 +2049,7 @@ static int output_packet(InputStream *ist, const AVPacket *pkt) } else if (pkt->duration) { ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); } else if(ist->st->codec->time_base.num != 0) { - int ticks= ist->st->parser ? ist->st->parser->repeat_pict + 1 : ist->st->codec->ticks_per_frame; + int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict + 1 : ist->st->codec->ticks_per_frame; ist->next_dts += ((int64_t)AV_TIME_BASE * ist->st->codec->time_base.num * ticks) / ist->st->codec->time_base.den; From 3cf6135729bb8c9a56fdecd107be1b24a0fdd386 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Jul 2014 02:01:06 +0200 Subject: [PATCH 302/822] Update for FFmpeg 2.2.5 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 530cdd91a2..21bb5e156f 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.4 +2.2.5 diff --git a/VERSION b/VERSION index 530cdd91a2..21bb5e156f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.4 +2.2.5 diff --git a/doc/Doxyfile b/doc/Doxyfile index 1e5778ca7d..6f19b103bf 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.4 +PROJECT_NUMBER = 2.2.5 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 0edc79962641dd853cda187ee13b617701346061 Mon Sep 17 00:00:00 2001 From: James Almer Date: Sun, 8 Jun 2014 22:21:30 -0300 Subject: [PATCH 303/822] x86/scale: fix xmm register count for hscale*_sse2 xmm6 was being clobbered in ff_hscale8to{15,19}_8_sse2 on Win64 Signed-off-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit 345f2234d1717d6128b2f90a7839c4906bf203ec) Signed-off-by: Michael Niedermayer --- libswscale/x86/scale.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm index 940f35744e..7af92f7f52 100644 --- a/libswscale/x86/scale.asm +++ b/libswscale/x86/scale.asm @@ -424,7 +424,7 @@ INIT_MMX mmx SCALE_FUNCS2 0, 0, 0 %endif INIT_XMM sse2 -SCALE_FUNCS2 6, 7, 8 +SCALE_FUNCS2 7, 6, 8 INIT_XMM ssse3 SCALE_FUNCS2 6, 6, 8 INIT_XMM sse4 From 68fd80ee1ca22c39b6ef4e6641b5b2e0d4d89a14 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 15 Jul 2014 15:22:11 -0400 Subject: [PATCH 304/822] g2meet: allow size changes within original sizes --- libavcodec/g2meet.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 89fafef7b1..e1e7177c16 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -87,6 +87,7 @@ typedef struct G2MContext { int compression; int width, height, bpp; + int orig_width, orig_height; int tile_width, tile_height; int tiles_x, tiles_y, tile_x, tile_y; @@ -698,8 +699,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, } c->width = bytestream2_get_be32(&bc); c->height = bytestream2_get_be32(&bc); - if (c->width < 16 || c->width > avctx->width || - c->height < 16 || c->height > avctx->height) { + if (c->width < 16 || c->width > c->orig_width || + c->height < 16 || c->height > c->orig_height) { av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions %dx%d\n", c->width, c->height); @@ -860,6 +861,10 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_RGB24; + // store original sizes and check against those if resize happens + c->orig_width = avctx->width; + c->orig_height = avctx->height; + return 0; } From 4ddac7199b247e4ed04296db944f29f5148e9860 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 21 Apr 2014 19:10:52 +0200 Subject: [PATCH 305/822] vc1: Do not return an error when skipping b frames This caused mpv (and possibly others) to fallback to software decoding after seeking a VC1 stream. Bug-Id: 667 Signed-off-by: Luca Barbato (cherry picked from commit cdf6eb5a9710566be217a3f17d3d94ac4e4d2662) Signed-off-by: Michael Niedermayer --- libavcodec/vc1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 593e69f9f9..4e1b8bfe4f 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -6005,7 +6005,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, /* skip B-frames if we don't have reference frames */ if (s->last_picture_ptr == NULL && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) { - goto err; + goto end; } if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || From f9204ec56a4cf73843d1e5b8563d3584c2c05b47 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 20 Jul 2014 12:06:47 +0000 Subject: [PATCH 306/822] eamad: use the bytestream2 API instead of AV_RL This is safer and possibly fixes invalid reads on truncated data. (cherry-picked from commit 541427ab4d5b4b6f5a90a687a06decdb78e7bc3c) CC:libav-stable@libav.org Conflicts: libavcodec/eamad.c --- libavcodec/eamad.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 22070a45f7..99a4e77335 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -29,6 +29,7 @@ */ #include "avcodec.h" +#include "bytestream.h" #include "get_bits.h" #include "aandcttab.h" #include "eaidct.h" @@ -229,30 +230,32 @@ static int decode_frame(AVCodecContext *avctx, { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - const uint8_t *buf_end = buf+buf_size; MadContext *s = avctx->priv_data; AVFrame *frame = data; + GetByteContext gb; int width, height; int chunk_type; int inter, ret; - if (buf_size < 17) { - av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n"); - *got_frame = 0; - return -1; - } + bytestream2_init(&gb, buf, buf_size); - chunk_type = AV_RL32(&buf[0]); + chunk_type = bytestream2_get_le32(&gb); inter = (chunk_type == MADm_TAG || chunk_type == MADe_TAG); - buf += 8; + bytestream2_skip(&gb, 10); av_reduce(&avctx->time_base.num, &avctx->time_base.den, - AV_RL16(&buf[6]), 1000, 1<<30); + bytestream2_get_le16(&gb), 1000, 1<<30); - width = AV_RL16(&buf[8]); - height = AV_RL16(&buf[10]); - calc_quant_matrix(s, buf[13]); - buf += 16; + width = bytestream2_get_le16(&gb); + height = bytestream2_get_le16(&gb); + bytestream2_skip(&gb, 1); + calc_quant_matrix(s, bytestream2_get_byte(&gb)); + bytestream2_skip(&gb, 2); + + if (bytestream2_get_bytes_left(&gb) < 2) { + av_log(avctx, AV_LOG_ERROR, "Input data too small\n"); + return AVERROR_INVALIDDATA; + } if (avctx->width != width || avctx->height != height) { av_frame_unref(s->last_frame); @@ -279,12 +282,12 @@ static int decode_frame(AVCodecContext *avctx, } av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, - buf_end - buf); + bytestream2_get_bytes_left(&gb)); if (!s->bitstream_buf) return AVERROR(ENOMEM); - s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2); - init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf)); - + s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t *)(buf + bytestream2_tell(&gb)), + bytestream2_get_bytes_left(&gb) / 2); + init_get_bits(&s->gb, s->bitstream_buf, 8*(bytestream2_get_bytes_left(&gb))); for (s->mb_y=0; s->mb_y < (avctx->height+15)/16; s->mb_y++) for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++) decode_mb(s, frame, inter); From 12bbd819cbdfdd2b41286c5ccabee7f5e5b6612a Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 27 Jul 2014 10:14:04 -0400 Subject: [PATCH 307/822] Prepare for 10.3 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index e2498ea52d..260e37521a 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.2 +10.3 From 407912d17870a53e8a8cc072f192cadf358bc155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 6 Jul 2014 23:18:27 +0300 Subject: [PATCH 308/822] avplay: Handle pixel aspect ratio properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was broken (left half-implemented) in 354468fc12. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit cf280ed004b5c618560f8f43d14ff264bd1e4c3d) Signed-off-by: Reinhard Tartler --- avplay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avplay.c b/avplay.c index b70ee54c7b..2db892849b 100644 --- a/avplay.c +++ b/avplay.c @@ -1323,6 +1323,8 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t vp = &is->pictq[is->pictq_windex]; + vp->sar = src_frame->sample_aspect_ratio; + /* alloc or resize hardware picture buffer */ if (!vp->bmp || vp->reallocate || #if CONFIG_AVFILTER From b8e57113ecba5494d4bf47c29634392ea5fdb17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 4 Jul 2014 18:21:50 +0300 Subject: [PATCH 309/822] arm: Avoid using the 'setend' instruction on ARMv7 and newer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This instruction is deprecated on ARMv8, and it is serializing on some ARMv7 cores as well [1]. [1] http://article.gmane.org/gmane.linux.ports.arm.kernel/339293 CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 79fce1ec8abd017593c003917fc123f7119a78d6) Signed-off-by: Reinhard Tartler --- libavcodec/arm/h264dsp_init_arm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c index 92658e7fc2..f9712d8102 100644 --- a/libavcodec/arm/h264dsp_init_arm.c +++ b/libavcodec/arm/h264dsp_init_arm.c @@ -104,8 +104,12 @@ av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, { int cpu_flags = av_get_cpu_flags(); - if (have_armv6(cpu_flags)) + if (have_armv6(cpu_flags) && !(have_vfpv3(cpu_flags) || have_neon(cpu_flags))) { + // This function uses the 'setend' instruction which is deprecated + // on ARMv8. This instruction is serializing on some ARMv7 cores as + // well. Therefore, only use the function on ARMv6. c->h264_find_start_code_candidate = ff_h264_find_start_code_candidate_armv6; + } if (have_neon(cpu_flags)) h264dsp_init_neon(c, bit_depth, chroma_format_idc); } From f6b3dce952d66f87883a50d90d6e98416ee397df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 4 Jul 2014 22:13:39 +0300 Subject: [PATCH 310/822] librtmp: Don't free the temp url at the end of rtmp_open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit librtmp can keep pointers to this string internally, and may use them at shutdown as well. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 865461099e062de5a3a109c2a5be98004c11d8bd) Signed-off-by: Reinhard Tartler Conflicts: libavformat/librtmp.c --- libavformat/librtmp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c index 7133bd655b..5682c9cb03 100644 --- a/libavformat/librtmp.c +++ b/libavformat/librtmp.c @@ -38,6 +38,7 @@ typedef struct LibRTMPContext { RTMP rtmp; char *app; char *playpath; + char *temp_filename; } LibRTMPContext; static void rtmp_log(int level, const char *fmt, va_list args) @@ -62,6 +63,7 @@ static int rtmp_close(URLContext *s) RTMP *r = &ctx->rtmp; RTMP_Close(r); + av_freep(&ctx->temp_filename); return 0; } @@ -101,7 +103,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) if (ctx->app) len += strlen(ctx->app) + sizeof(" app="); if (ctx->playpath) len += strlen(ctx->playpath) + sizeof(" playpath="); - if (!(filename = av_malloc(len))) + if (!(ctx->temp_filename = filename = av_malloc(len))) return AVERROR(ENOMEM); av_strlcpy(filename, s->filename, len); @@ -130,10 +132,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) } s->is_streamed = 1; - rc = 0; + return 0; fail: - if (filename != s->filename) - av_freep(&filename); + av_freep(&ctx->temp_filename); return rc; } From 01a550bda29eb05fb230576e5223034974aa3396 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 29 Jul 2014 05:43:04 -0700 Subject: [PATCH 311/822] vf_select: Drop a debug av_log with an unchecked double to enum conversion CC: libav-stable@libav.org (cherry picked from commit a8d803a320fb08b3ad5db4fffc79abd401206905) Signed-off-by: Diego Biurrun --- libavfilter/vf_select.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index fc69c8951d..868e544bf6 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -205,18 +205,6 @@ static int select_frame(AVFilterContext *ctx, AVFrame *frame) select->var_values[VAR_PICT_TYPE] = frame->pict_type; res = av_expr_eval(select->expr, select->var_values, NULL); - av_log(inlink->dst, AV_LOG_DEBUG, - "n:%d pts:%d t:%f interlace_type:%c key:%d pict_type:%c " - "-> select:%f\n", - (int)select->var_values[VAR_N], - (int)select->var_values[VAR_PTS], - select->var_values[VAR_T], - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' : - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' : - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : '?', - (int)select->var_values[VAR_KEY], - av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]), - res); select->var_values[VAR_N] += 1.0; From b20a8ad619ac0e2631391b6311cc000de85d22bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= Date: Sun, 27 Jul 2014 08:38:59 -0700 Subject: [PATCH 312/822] video4linux2: Avoid a floating point exception This avoids a segfault in avconv_opt.c:opt_target when trying to determine the norm. (cherry picked from commit dc71f1958846bb1d96de43a4603983dc8450cfcc) Signed-off-by: Diego Biurrun --- avconv_opt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avconv_opt.c b/avconv_opt.c index d62d11f5e6..73d283ae21 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1726,7 +1726,8 @@ static int opt_target(void *optctx, const char *opt, const char *arg) for (j = 0; j < nb_input_files; j++) { for (i = 0; i < input_files[j]->nb_streams; i++) { AVCodecContext *c = input_files[j]->ctx->streams[i]->codec; - if (c->codec_type != AVMEDIA_TYPE_VIDEO) + if (c->codec_type != AVMEDIA_TYPE_VIDEO || + !c->time_base.num) continue; fr = c->time_base.den * 1000 / c->time_base.num; if (fr == 25000) { From d396987c303bdc4eea7d1a1ff6776475d9bbd9ea Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 25 Jun 2014 17:09:13 -0700 Subject: [PATCH 313/822] fate: Add dependencies for dct/fft/mdct/rdft tests (cherry picked from commit 24f45c16224d4c5d482e928676714766ffdda4fc) Signed-off-by: Diego Biurrun --- libavcodec/fft-test.c | 22 ++++++++++++++++++++++ tests/fate/fft.mak | 32 ++++++++++++++++---------------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c index d0c22d020e..142a61d8d4 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/fft-test.c @@ -113,6 +113,7 @@ static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) } } +#if CONFIG_MDCT static void imdct_ref(FFTSample *out, FFTSample *in, int nbits) { int n = 1<fft_permute(s, tab); @@ -376,6 +388,7 @@ int main(int argc, char **argv) err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0); break; #if FFT_FLOAT +#if CONFIG_RDFT case TRANSFORM_RDFT: fft_size_2 = fft_size >> 1; if (do_inverse) { @@ -407,6 +420,8 @@ int main(int argc, char **argv) err = check_diff((float *)tab_ref, (float *)tab2, fft_size, 1.0); } break; +#endif /* CONFIG_RDFT */ +#if CONFIG_DCT case TRANSFORM_DCT: memcpy(tab, tab1, fft_size * sizeof(FFTComplex)); d->dct_calc(d, tab); @@ -417,6 +432,7 @@ int main(int argc, char **argv) } err = check_diff((float *)tab_ref, (float *)tab, fft_size, 1.0); break; +#endif /* CONFIG_DCT */ #endif } @@ -468,19 +484,25 @@ int main(int argc, char **argv) } switch (transform) { +#if CONFIG_MDCT case TRANSFORM_MDCT: ff_mdct_end(m); break; +#endif /* CONFIG_MDCT */ case TRANSFORM_FFT: ff_fft_end(s); break; #if FFT_FLOAT +#if CONFIG_RDFT case TRANSFORM_RDFT: ff_rdft_end(r); break; +#endif /* CONFIG_RDFT */ +#if CONFIG_DCT case TRANSFORM_DCT: ff_dct_end(d); break; +#endif /* CONFIG_DCT */ #endif } diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak index 20d563828f..d2a390404b 100644 --- a/tests/fate/fft.mak +++ b/tests/fate/fft.mak @@ -1,8 +1,8 @@ define DEF_FFT -FATE_FFT += fate-fft-$(1) fate-ifft-$(1) \ - fate-mdct-$(1) fate-imdct-$(1) \ - fate-rdft-$(1) fate-irdft-$(1) \ - fate-dct1d-$(1) fate-idct1d-$(1) +FATE_FFT-$(CONFIG_DCT) += fate-dct1d-$(1) fate-idct1d-$(1) +FATE_FFT-$(CONFIG_FFT) += fate-fft-$(1) fate-ifft-$(1) +FATE_FFT-$(CONFIG_MDCT) += fate-mdct-$(1) fate-imdct-$(1) +FATE_FFT-$(CONFIG_RDFT) += fate-rdft-$(1) fate-irdft-$(1) fate-fft-$(N): ARGS = -n$(1) fate-ifft-$(N): ARGS = -n$(1) -i @@ -16,14 +16,14 @@ endef $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N)))) -fate-fft-test: $(FATE_FFT) -$(FATE_FFT): libavcodec/fft-test$(EXESUF) -$(FATE_FFT): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) -$(FATE_FFT): REF = /dev/null +fate-fft-float: $(FATE_FFT-yes) +$(FATE_FFT-yes): libavcodec/fft-test$(EXESUF) +$(FATE_FFT-yes): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT-yes): REF = /dev/null define DEF_FFT_FIXED -FATE_FFT_FIXED += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) \ - fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) +FATE_FFT_FIXED-$(CONFIG_FFT) += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) +FATE_FFT_FIXED-$(CONFIG_MDCT) += fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) fate-fft-fixed-$(1): ARGS = -n$(1) fate-ifft-fixed-$(1): ARGS = -n$(1) -i @@ -33,10 +33,10 @@ endef $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N)))) -fate-fft-fixed-test: $(FATE_FFT_FIXED) -$(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) -$(FATE_FFT_FIXED): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) -$(FATE_FFT_FIXED): REF = /dev/null +fate-fft-fixed: $(FATE_FFT_FIXED-yes) +$(FATE_FFT_FIXED-yes): libavcodec/fft-fixed-test$(EXESUF) +$(FATE_FFT_FIXED-yes): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT_FIXED-yes): REF = /dev/null -FATE-$(call ALLYES, AVCODEC FFT) += $(FATE_FFT) $(FATE_FFT_FIXED) -fate-fft: $(FATE_FFT) $(FATE_FFT_FIXED) +FATE-$(CONFIG_AVCODEC) += $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes) +fate-fft: $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes) From a1f7844a11010d8552c75424d1a831b37a0ae5d9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Jul 2014 21:31:19 -0400 Subject: [PATCH 314/822] pgssubdec: Check RLE size before copying Make sure the buffer size does not exceed the expected RLE size. Prevent an out of array bound write. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer Bug-Id: CVE-2013-0852 Signed-off-by: Luca Barbato (cherry picked from commit d98e6c5d5d80c1dfe0c30f2e73d41a3aea0b920d) Signed-off-by: Diego Biurrun --- libavcodec/pgssubdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index 2102a51653..3731a4c16b 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -196,6 +196,13 @@ static int parse_picture_segment(AVCodecContext *avctx, /* Decode rle bitmap length, stored size includes width/height data */ rle_bitmap_len = bytestream_get_be24(&buf) - 2*2; + if (buf_size > rle_bitmap_len) { + av_log(avctx, AV_LOG_ERROR, + "Buffer dimension %d larger than the expected RLE data %d\n", + buf_size, rle_bitmap_len); + return AVERROR_INVALIDDATA; + } + /* Get bitmap dimensions from data */ width = bytestream_get_be16(&buf); height = bytestream_get_be16(&buf); From 2273e5ed992661e0c4b37208e792e2253d5a0b5b Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 30 Jul 2014 19:33:36 +0100 Subject: [PATCH 315/822] h264: prevent theoretical infinite loop in SEI parsing Properly address CVE-2011-3946 and parse bitstream as described in the spec. CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind --- libavcodec/h264_sei.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c index 6fca2c32a9..1e5a13458a 100644 --- a/libavcodec/h264_sei.c +++ b/libavcodec/h264_sei.c @@ -205,14 +205,20 @@ int ff_h264_decode_sei(H264Context *h) int size = 0; int type = 0; int ret = 0; + int last = 0; - do - type += show_bits(&h->gb, 8); - while (get_bits(&h->gb, 8) == 255); + while (get_bits_left(&h->gb) >= 8 && + (last = get_bits(&h->gb, 8)) == 255) { + type += 255; + } + type += last; - do - size += show_bits(&h->gb, 8); - while (get_bits(&h->gb, 8) == 255); + last = 0; + while (get_bits_left(&h->gb) >= 8 && + (last = get_bits(&h->gb, 8)) == 255) { + size += 255; + } + size += last; if (size > get_bits_left(&h->gb) / 8) { av_log(h->avctx, AV_LOG_ERROR, "SEI type %d truncated at %d\n", From 744b406ff3474e77543bcf86125a2f7bc7deaa18 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 3 Aug 2014 12:19:10 -0700 Subject: [PATCH 316/822] huffyuv: Check and propagate function return values Bug-Id: CVE-2013-0868 inspired by a patch from Michael Niedermayer Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Diego Biurrun CC: libav-stable@libav.org (cherry picked from commit d0393d79bc3d61c9f2ff832c0e273b7774ff0269) Signed-off-by: Diego Biurrun Conflicts: libavcodec/huffyuvdec.c --- libavcodec/huffyuvdec.c | 106 +++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 45 deletions(-) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index ed490d4bd7..016b0d6751 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -104,11 +104,13 @@ static int read_len_table(uint8_t *dst, GetBitContext *gb) return 0; } -static void generate_joint_tables(HYuvContext *s) +static int generate_joint_tables(HYuvContext *s) { uint16_t symbols[1 << VLC_BITS]; uint16_t bits[1 << VLC_BITS]; uint8_t len[1 << VLC_BITS]; + int ret; + if (s->bitstream_bpp < 24) { int p, i, y, u; for (p = 0; p < 3; p++) { @@ -129,8 +131,9 @@ static void generate_joint_tables(HYuvContext *s) } } ff_free_vlc(&s->vlc[3 + p]); - ff_init_vlc_sparse(&s->vlc[3 + p], VLC_BITS, i, len, 1, 1, - bits, 2, 2, symbols, 2, 2, 0); + if ((ret = ff_init_vlc_sparse(&s->vlc[3 + p], VLC_BITS, i, len, 1, 1, + bits, 2, 2, symbols, 2, 2, 0)) < 0) + return ret; } } else { uint8_t (*map)[4] = (uint8_t(*)[4])s->pix_bgr_map; @@ -171,29 +174,34 @@ static void generate_joint_tables(HYuvContext *s) } } ff_free_vlc(&s->vlc[3]); - init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, bits, 2, 2, 0); + if ((ret = init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, + bits, 2, 2, 0)) < 0) + return ret; } + return 0; } static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length) { GetBitContext gb; - int i; + int i, ret; - init_get_bits(&gb, src, length * 8); + if ((ret = init_get_bits(&gb, src, length * 8)) < 0) + return ret; for (i = 0; i < 3; i++) { - if (read_len_table(s->len[i], &gb) < 0) - return -1; - if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0) { - return -1; - } + if ((ret = read_len_table(s->len[i], &gb)) < 0) + return ret; + if ((ret = ff_huffyuv_generate_bits_table(s->bits[i], s->len[i])) < 0) + return ret; ff_free_vlc(&s->vlc[i]); - init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, - s->bits[i], 4, 4, 0); + if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, + s->bits[i], 4, 4, 0)) < 0) + return ret; } - generate_joint_tables(s); + if ((ret = generate_joint_tables(s)) < 0) + return ret; return (get_bits_count(&gb) + 7) / 8; } @@ -201,17 +209,19 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length) static int read_old_huffman_tables(HYuvContext *s) { GetBitContext gb; - int i; + int i, ret; - init_get_bits(&gb, classic_shift_luma, - classic_shift_luma_table_size * 8); - if (read_len_table(s->len[0], &gb) < 0) - return -1; + if ((ret = init_get_bits(&gb, classic_shift_luma, + classic_shift_luma_table_size * 8)) < 0) + return ret; + if ((ret = read_len_table(s->len[0], &gb)) < 0) + return ret; - init_get_bits(&gb, classic_shift_chroma, - classic_shift_chroma_table_size * 8); - if (read_len_table(s->len[1], &gb) < 0) - return -1; + if ((ret = init_get_bits(&gb, classic_shift_chroma, + classic_shift_chroma_table_size * 8)) < 0) + return ret; + if ((ret = read_len_table(s->len[1], &gb)) < 0) + return ret; for(i=0; i<256; i++) s->bits[0][i] = classic_add_luma [i]; for(i=0; i<256; i++) s->bits[1][i] = classic_add_chroma[i]; @@ -225,11 +235,13 @@ static int read_old_huffman_tables(HYuvContext *s) for (i = 0; i < 3; i++) { ff_free_vlc(&s->vlc[i]); - init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, - s->bits[i], 4, 4, 0); + if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, + s->bits[i], 4, 4, 0)) < 0) + return ret; } - generate_joint_tables(s); + if ((ret = generate_joint_tables(s)) < 0) + return ret; return 0; } @@ -237,6 +249,7 @@ static int read_old_huffman_tables(HYuvContext *s) static av_cold int decode_init(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; + int ret; ff_huffyuv_common_init(avctx); memset(s->vlc, 0, 3 * sizeof(VLC)); @@ -270,9 +283,9 @@ static av_cold int decode_init(AVCodecContext *avctx) s->interlaced = (interlace == 1) ? 1 : (interlace == 2) ? 0 : s->interlaced; s->context = ((uint8_t*)avctx->extradata)[2] & 0x40 ? 1 : 0; - if ( read_huffman_tables(s, ((uint8_t*)avctx->extradata) + 4, - avctx->extradata_size - 4) < 0) - return -1; + if ((ret = read_huffman_tables(s, ((uint8_t*)avctx->extradata) + 4, + avctx->extradata_size - 4)) < 0) + return ret; }else{ switch (avctx->bits_per_coded_sample & 7) { case 1: @@ -299,8 +312,8 @@ static av_cold int decode_init(AVCodecContext *avctx) s->bitstream_bpp = avctx->bits_per_coded_sample & ~7; s->context = 0; - if (read_old_huffman_tables(s) < 0) - return -1; + if ((ret = read_old_huffman_tables(s)) < 0) + return ret; } switch (s->bitstream_bpp) { @@ -326,7 +339,8 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } - ff_huffyuv_alloc_temp(s); + if ((ret = ff_huffyuv_alloc_temp(s)) < 0) + return ret; return 0; } @@ -334,20 +348,21 @@ static av_cold int decode_init(AVCodecContext *avctx) static av_cold int decode_init_thread_copy(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; - int i; + int i, ret; - ff_huffyuv_alloc_temp(s); + if ((ret = ff_huffyuv_alloc_temp(s)) < 0) + return ret; for (i = 0; i < 6; i++) s->vlc[i].table = NULL; if (s->version == 2) { - if (read_huffman_tables(s, ((uint8_t*)avctx->extradata) + 4, - avctx->extradata_size) < 0) - return -1; + if ((ret = read_huffman_tables(s, ((uint8_t*)avctx->extradata) + 4, + avctx->extradata_size)) < 0) + return ret; } else { - if (read_old_huffman_tables(s) < 0) - return -1; + if ((ret = read_old_huffman_tables(s)) < 0) + return ret; } return 0; @@ -482,7 +497,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, int fake_ystride, fake_ustride, fake_vstride; ThreadFrame frame = { .f = data }; AVFrame * const p = data; - int table_size = 0; + int table_size = 0, ret; av_fast_malloc(&s->bitstream_buffer, &s->bitstream_buffer_size, @@ -494,22 +509,23 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, s->dsp.bswap_buf((uint32_t*)s->bitstream_buffer, (const uint32_t*)buf, buf_size / 4); - if (ff_thread_get_buffer(avctx, &frame, 0) < 0) { + if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; + return ret; } if (s->context) { table_size = read_huffman_tables(s, s->bitstream_buffer, buf_size); if (table_size < 0) - return -1; + return table_size; } if ((unsigned)(buf_size-table_size) >= INT_MAX / 8) return -1; - init_get_bits(&s->gb, s->bitstream_buffer+table_size, - (buf_size-table_size) * 8); + if ((ret = init_get_bits(&s->gb, s->bitstream_buffer + table_size, + (buf_size - table_size) * 8)) < 0) + return ret; fake_ystride = s->interlaced ? p->linesize[0] * 2 : p->linesize[0]; fake_ustride = s->interlaced ? p->linesize[1] * 2 : p->linesize[1]; From 07015d9f913d63bdc4495e75f4603c586553796e Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 3 Aug 2014 21:30:32 -0400 Subject: [PATCH 317/822] Update Changelog for v10.3 --- Changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Changelog b/Changelog index 566de4ba0a..07ea870bbb 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,19 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.3: +- huffyuv: Check and propagate function return values (CVE-2013-0868) +- h264: prevent theoretical infinite loop in SEI parsing (CVE-2011-3946) +- pgssubdec: Check RLE size before copying (CVE-2013-0852) +- video4linux2: Avoid a floating point exception +- vf_select: Drop a debug av_log with an unchecked double to enum conversion +- librtmp: Don't free the temp url at the end of rtmp_open +- arm: Avoid using the 'setend' instruction on ARMv7 and newer +- avplay: Handle pixel aspect ratio properly +- eamad: use the bytestream2 API instead of AV_RL (CVE-2013-0851) +- pg2meet: allow size changes within original sizes +- af_compand: make sure request_frame always outputs at least one frame + version 10.2: - adpcm: Write the proper predictor in trellis mode in IMA QT - adpcm: Avoid reading out of bounds in the IMA QT trellis encoder From c9f1456a41f58f8e4e9f937bba87bce96f7fd7a5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Jul 2014 17:37:09 +0200 Subject: [PATCH 318/822] avfilter/f_select: avoid using doubles for equals checks and casts to enums This might silence some warnings. Issue found from: a8d803a320fb08b3ad5db4fffc79abd401206905 Signed-off-by: Michael Niedermayer (cherry picked from commit 887d8d293fc31c949427f971f37c126b3812b451) Signed-off-by: Michael Niedermayer --- libavfilter/f_select.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 1ffc00652c..c3756c2bd5 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -342,10 +342,9 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) switch (inlink->type) { case AVMEDIA_TYPE_VIDEO: av_log(inlink->dst, AV_LOG_DEBUG, " interlace_type:%c pict_type:%c scene:%f", - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' : - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' : - select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : '?', - av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]), + (!frame->interlaced_frame) ? 'P' : + frame->top_field_first ? 'T' : 'B', + av_get_picture_type_char(frame->pict_type), select->var_values[VAR_SCENE]); break; case AVMEDIA_TYPE_AUDIO: From 21f6b07a977d0838c7697315b463dacfe9111c28 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Jul 2014 17:48:33 +0200 Subject: [PATCH 319/822] avfilter/f_select: Set var_values[VAR_KEY] correctly Signed-off-by: Michael Niedermayer (cherry picked from commit bcbfb95b0e327679337eaca59c247a2580ea4105) Signed-off-by: Michael Niedermayer --- libavfilter/f_select.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index c3756c2bd5..32c7289982 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -308,6 +308,7 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) select->var_values[VAR_PTS] = TS2D(frame->pts); select->var_values[VAR_T ] = TS2D(frame->pts) * av_q2d(inlink->time_base); select->var_values[VAR_POS] = av_frame_get_pkt_pos(frame) == -1 ? NAN : av_frame_get_pkt_pos(frame); + select->var_values[VAR_KEY] = frame->key_frame; switch (inlink->type) { case AVMEDIA_TYPE_AUDIO: From f99b17bd32ca4048eff814655746d992cd580ce9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Jul 2014 17:50:35 +0200 Subject: [PATCH 320/822] avfilter/f_select: avoid double->int in debug output Signed-off-by: Michael Niedermayer (cherry picked from commit 6f622e5fcbe8484af194436b8dd4ff01f092ab99) Signed-off-by: Michael Niedermayer --- libavfilter/f_select.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 32c7289982..40955737b9 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -338,7 +338,7 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) select->var_values[VAR_N], select->var_values[VAR_PTS], select->var_values[VAR_T], - (int)select->var_values[VAR_KEY]); + frame->key_frame); switch (inlink->type) { case AVMEDIA_TYPE_VIDEO: @@ -349,9 +349,9 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) select->var_values[VAR_SCENE]); break; case AVMEDIA_TYPE_AUDIO: - av_log(inlink->dst, AV_LOG_DEBUG, " samples_n:%d consumed_samples_n:%d", - (int)select->var_values[VAR_SAMPLES_N], - (int)select->var_values[VAR_CONSUMED_SAMPLES_N]); + av_log(inlink->dst, AV_LOG_DEBUG, " samples_n:%d consumed_samples_n:%f", + frame->nb_samples, + select->var_values[VAR_CONSUMED_SAMPLES_N]); break; } From f7b147548e768aa36acec9f752fcbd001d9e03c5 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Fri, 18 Jul 2014 10:34:39 +0200 Subject: [PATCH 321/822] ffmpeg_filter: refuse to configure input without a decoder. The decoder is necessary in order to filter frames. This makes the error message clearer in this case: currently, it will usually fail because the pixel or sample format is not defined and is converted into "(null)" (non-portable). Enhance trac ticket #3779. (cherry picked from commit 91244073fd8b983e7cd1f97da83daf956fbbddc6) Signed-off-by: Michael Niedermayer --- ffmpeg_filter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 582c66183d..f25ee8636f 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -828,6 +828,12 @@ static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter, av_freep(&ifilter->name); DESCRIBE_FILTER_LINK(ifilter, in, 1); + if (!ifilter->ist->dec) { + av_log(NULL, AV_LOG_ERROR, + "No decoder for stream #%d:%d, filtering impossible\n", + ifilter->ist->file_index, ifilter->ist->st->index); + return AVERROR_DECODER_NOT_FOUND; + } switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) { case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in); case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in); From a4e1532ee78db692345090c68de08d2d928274a4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 12 Jul 2014 06:36:25 +0200 Subject: [PATCH 322/822] avcodec/hevc_ps: do not loose all reference to pointers still in use Fixes leaving a pointer to unreferenced memory Fixes Ticket 3115 Signed-off-by: Michael Niedermayer (cherry picked from commit ccd6911c189d2f974dcc4095c963dfad14d703d2) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 6 ++++++ libavcodec/hevc.h | 2 ++ libavcodec/hevc_parser.c | 3 +++ libavcodec/hevc_ps.c | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index eae0757c81..fd0309af60 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2818,6 +2818,8 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) for (i = 0; i < FF_ARRAY_ELEMS(s->pps_list); i++) av_buffer_unref(&s->pps_list[i]); + av_buffer_unref(&s->current_sps); + av_freep(&s->sh.entry_point_offset); av_freep(&s->sh.offset); av_freep(&s->sh.size); @@ -2939,6 +2941,10 @@ static int hevc_update_thread_context(AVCodecContext *dst, } } + if (s->current_sps && s->sps == (HEVCSPS*)s->current_sps->data) + s->sps = NULL; + av_buffer_unref(&s->current_sps); + if (s->sps != s0->sps) ret = set_sps(s, s0->sps); diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index a1c76fe49b..3d71871891 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -776,6 +776,8 @@ typedef struct HEVCContext { AVBufferRef *sps_list[MAX_SPS_COUNT]; AVBufferRef *pps_list[MAX_PPS_COUNT]; + AVBufferRef *current_sps; + AVBufferPool *tab_mvf_pool; AVBufferPool *rpl_tab_pool; diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index dc1f6d5a38..72844529e7 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -331,6 +331,9 @@ static void hevc_close(AVCodecParserContext *s) for (i = 0; i < FF_ARRAY_ELEMS(h->pps_list); i++) av_buffer_unref(&h->pps_list[i]); + av_buffer_unref(&h->current_sps); + h->sps = NULL; + for (i = 0; i < h->nals_allocated; i++) av_freep(&h->nals[i].rbsp_buffer); av_freep(&h->nals); diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 647f83eec6..669aba9603 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -956,6 +956,10 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) if (s->pps_list[i] && ((HEVCPPS*)s->pps_list[i]->data)->sps_id == sps_id) av_buffer_unref(&s->pps_list[i]); } + if (s->sps_list[sps_id] && s->sps == (HEVCSPS*)s->sps_list[sps_id]->data) { + av_buffer_unref(&s->current_sps); + s->current_sps = av_buffer_ref(s->sps_list[sps_id]); + } av_buffer_unref(&s->sps_list[sps_id]); s->sps_list[sps_id] = sps_buf; } From 51dd23c4488b345850b4eb5d75c322ace5989c43 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Jul 2014 21:43:04 +0200 Subject: [PATCH 323/822] avcodec/hevc_ps: prevent stale pointer in malloc failure case Signed-off-by: Michael Niedermayer (cherry picked from commit 0fc2045d5f4eab35d943a79c3d965a2f31361f48) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 669aba9603..c8350fb90f 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -959,6 +959,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) if (s->sps_list[sps_id] && s->sps == (HEVCSPS*)s->sps_list[sps_id]->data) { av_buffer_unref(&s->current_sps); s->current_sps = av_buffer_ref(s->sps_list[sps_id]); + if (!s->current_sps) + s->sps = NULL; } av_buffer_unref(&s->sps_list[sps_id]); s->sps_list[sps_id] = sps_buf; From 815d3225e32bc335cecd333773d1839d63b76abf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Jul 2014 21:43:30 +0200 Subject: [PATCH 324/822] avcodec/hevc: treat current_sps like sps_list This simplifies the management of current_sps Fixes Ticket3458 Signed-off-by: Michael Niedermayer (cherry picked from commit 880dbe43ca71982ecdfe1c73446137d6b2fd24d5) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index fd0309af60..5f719c8561 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2941,9 +2941,12 @@ static int hevc_update_thread_context(AVCodecContext *dst, } } - if (s->current_sps && s->sps == (HEVCSPS*)s->current_sps->data) - s->sps = NULL; av_buffer_unref(&s->current_sps); + if (s0->current_sps) { + s->current_sps = av_buffer_ref(s0->current_sps); + if (!s->current_sps) + return AVERROR(ENOMEM); + } if (s->sps != s0->sps) ret = set_sps(s, s0->sps); From 2105f046f57132902ecaee93d143a3d754af7efd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 17 Jul 2014 04:25:21 +0200 Subject: [PATCH 325/822] avformat/dv: implement fallback in dv_extract_pack() Fixes Ticket2340 Fixes Ticket2341 Based-on mail from Dave Rice Tested-by: Dave Rice Signed-off-by: Michael Niedermayer (cherry picked from commit 88f038ac97a875f25c2eceac6d2107a09314984c) Signed-off-by: Michael Niedermayer --- libavformat/dv.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index f972478f69..fd5ff4de15 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -72,30 +72,33 @@ static inline uint16_t dv_audio_12to16(uint16_t sample) return result; } -/* - * This is the dumbest implementation of all -- it simply looks at - * a fixed offset and if pack isn't there -- fails. We might want - * to have a fallback mechanism for complete search of missing packs. - */ static const uint8_t *dv_extract_pack(uint8_t *frame, enum dv_pack_type t) { int offs; + int c; - switch (t) { - case dv_audio_source: - offs = (80 * 6 + 80 * 16 * 3 + 3); - break; - case dv_audio_control: - offs = (80 * 6 + 80 * 16 * 4 + 3); - break; - case dv_video_control: - offs = (80 * 5 + 48 + 5); - break; - case dv_timecode: - offs = (80*1 + 3 + 3); - break; - default: - return NULL; + for (c = 0; c < 10; c++) { + switch (t) { + case dv_audio_source: + if (c&1) offs = (80 * 6 + 80 * 16 * 0 + 3 + c*12000); + else offs = (80 * 6 + 80 * 16 * 3 + 3 + c*12000); + break; + case dv_audio_control: + if (c&1) offs = (80 * 6 + 80 * 16 * 1 + 3 + c*12000); + else offs = (80 * 6 + 80 * 16 * 4 + 3 + c*12000); + break; + case dv_video_control: + if (c&1) offs = (80 * 3 + 8 + c*12000); + else offs = (80 * 5 + 48 + 5 + c*12000); + break; + case dv_timecode: + offs = (80*1 + 3 + 3); + break; + default: + return NULL; + } + if (frame[offs] == t) + break; } return frame[offs] == t ? &frame[offs] : NULL; From 6120ad315bc3289d7f2f67f8944f044e5aa86c91 Mon Sep 17 00:00:00 2001 From: "Chris \\\"Koying\\\" Browet" Date: Sat, 26 Jul 2014 09:15:57 +0200 Subject: [PATCH 326/822] avcodec/h264_mp4toannexb_bsf: fix issue when sps/pps are already in the bistream (cherry picked from commit ad91bf854b559f1afc42fc06f8a7dfbb75def5c8) Signed-off-by: Michael Niedermayer --- libavcodec/h264_mp4toannexb_bsf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 0f142bb2ad..a7b4f4158e 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -28,6 +28,7 @@ typedef struct H264BSFContext { uint8_t length_size; uint8_t first_idr; + uint8_t idr_sps_pps_seen; int extradata_parsed; } H264BSFContext; @@ -155,6 +156,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, return ret; ctx->length_size = ret; ctx->first_idr = 1; + ctx->idr_sps_pps_seen = 0; ctx->extradata_parsed = 1; } @@ -174,8 +176,12 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, if (buf + nal_size > buf_end || nal_size < 0) goto fail; - /* prepend only to the first type 5 NAL unit of an IDR picture */ - if (ctx->first_idr && (unit_type == 5 || unit_type == 7 || unit_type == 8)) { + if (ctx->first_idr && (unit_type == 7 || unit_type == 8)) + ctx->idr_sps_pps_seen = 1; + + + /* prepend only to the first type 5 NAL unit of an IDR picture, if no sps/pps are already present */ + if (ctx->first_idr && unit_type == 5 && !ctx->idr_sps_pps_seen) { if ((ret=alloc_and_copy(poutbuf, poutbuf_size, avctx->extradata, avctx->extradata_size, buf, nal_size)) < 0) @@ -185,8 +191,10 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, if ((ret=alloc_and_copy(poutbuf, poutbuf_size, NULL, 0, buf, nal_size)) < 0) goto fail; - if (!ctx->first_idr && unit_type == 1) + if (!ctx->first_idr && unit_type == 1) { ctx->first_idr = 1; + ctx->idr_sps_pps_seen = 0; + } } buf += nal_size; From cf41ff488978738f2718ab02e940925dd3576134 Mon Sep 17 00:00:00 2001 From: Benoit Fouet Date: Thu, 31 Jul 2014 15:32:14 +0200 Subject: [PATCH 327/822] h264_mp4toannexb_bsf: account for consecutive IDR pictures. If there are consecutive IDR pictures, then SPS/PPS should be prepended to all of them, not only the first one. Signed-off-by: Michael Niedermayer (cherry picked from commit bf428bb3145c4f0eef32f8ef00de0ee222b3e414) Signed-off-by: Michael Niedermayer --- libavcodec/h264_mp4toannexb_bsf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index a7b4f4158e..a003a1df1d 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -179,6 +179,11 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, if (ctx->first_idr && (unit_type == 7 || unit_type == 8)) ctx->idr_sps_pps_seen = 1; + /* if this is a new IDR picture following an IDR picture, reset the idr flag. + * Just check first_mb_in_slice to be 0 as this is the simplest solution. + * This could be checking idr_pic_id instead, but would complexify the parsing. */ + if (!ctx->first_idr && unit_type == 5 && (buf[1] & 0x80)) + ctx->first_idr = 1; /* prepend only to the first type 5 NAL unit of an IDR picture, if no sps/pps are already present */ if (ctx->first_idr && unit_type == 5 && !ctx->idr_sps_pps_seen) { From cdaf9fb2a054519ecc56339d511863bd46c935b3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 31 Jul 2014 16:25:21 +0200 Subject: [PATCH 328/822] libavcodec/h264_parser: Increase parse_history, fix huge resolutions Signed-off-by: Michael Niedermayer (cherry picked from commit 0782fb6bcb32fe3ab956a99af4cc472ff81da0c2) Signed-off-by: Michael Niedermayer --- libavcodec/h264.h | 2 +- libavcodec/h264_parser.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 4a41fffe66..188e749440 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -691,7 +691,7 @@ typedef struct H264Context { int16_t slice_row[MAX_SLICES]; ///< to detect when MAX_SLICES is too low - uint8_t parse_history[4]; + uint8_t parse_history[6]; int parse_history_count; int parse_last_mb; uint8_t *edge_emu_buffer; diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 4432871763..416f464acf 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -91,7 +91,7 @@ static int h264_find_frame_end(H264Context *h, const uint8_t *buf, state = 7; } else { h->parse_history[h->parse_history_count++]= buf[i]; - if (h->parse_history_count>3) { + if (h->parse_history_count>5) { unsigned int mb, last_mb= h->parse_last_mb; GetBitContext gb; @@ -119,7 +119,7 @@ found: pc->frame_start_found = 0; if (h->is_avc) return next_avc; - return i - (state & 5) - 3 * (state > 7); + return i - (state & 5) - 5 * (state > 7); } static int scan_mmco_reset(AVCodecParserContext *s) From 0aee436728dbcdefb7572e81a2f86618a835a5bd Mon Sep 17 00:00:00 2001 From: Anshul Maheswhwari Date: Thu, 31 Jul 2014 20:59:59 +0530 Subject: [PATCH 329/822] v4l2enc: adding AVClass Signed-off-by: Michael Niedermayer (cherry picked from commit fcb11ec291e9b3e3f352fa4d3e9026c0f7f64aa8) Signed-off-by: Michael Niedermayer --- libavdevice/v4l2enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c index 21f0ef6983..db4946581e 100644 --- a/libavdevice/v4l2enc.c +++ b/libavdevice/v4l2enc.c @@ -22,6 +22,7 @@ #include "avdevice.h" typedef struct { + AVClass *class; int fd; } V4L2Context; From 81d8bad786819d8358058fd716f94279c3ccc5eb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 1 Aug 2014 21:10:43 +0200 Subject: [PATCH 330/822] avcodec/mpeg12dec: fix support for interlaced mpeg2 with missing last slice Fixes Ticket3809 Signed-off-by: Michael Niedermayer (cherry picked from commit f95298c913899207344d668a6d5624cb2d2e480c) Signed-off-by: Michael Niedermayer --- libavcodec/mpeg12dec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 1f89830519..a464556aea 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1878,6 +1878,14 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, } else goto eos; } + if (s->mb_y >= ((s->height + 15) >> 4) && + s->progressive_frame && + !s->progressive_sequence && + get_bits_left(&s->gb) <= 8 && + get_bits_left(&s->gb) >= 0 && + s->mb_skip_run == -1 && + show_bits(&s->gb, 8) == 0) + goto eos; ff_init_block_index(s); } From 8eaefbe1beb551480c68f24d9d5c84bfbc27b465 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 00:27:23 +0200 Subject: [PATCH 331/822] avcodec/dvdsub_parser: never return 0 when the input isnt 0 Fixes a infinite loop Fixes Ticket3804 Signed-off-by: Michael Niedermayer (cherry picked from commit cfdb30d2f1241de9354a8efdbf8252d0f1a6f933) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsub_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c index e50c3396e4..9a6457e8b4 100644 --- a/libavcodec/dvdsub_parser.c +++ b/libavcodec/dvdsub_parser.c @@ -46,7 +46,7 @@ static int dvdsub_parse(AVCodecParserContext *s, if (pc->packet_index == 0) { if (buf_size < 2) - return 0; + return buf_size; pc->packet_len = AV_RB16(buf); if (pc->packet_len == 0) /* HD-DVD subpicture packet */ pc->packet_len = AV_RB32(buf+2); From ce248bf7ee4e03d997faef00d1eae60c520f278c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 01:15:37 +0200 Subject: [PATCH 332/822] avcodec/dvdsub_parser: Check buf_size before reading 32bit packet size Signed-off-by: Michael Niedermayer (cherry picked from commit 81c1657a593b1c0f8e46fca00ead1d30ee1cd418) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsub_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c index 9a6457e8b4..07ed4f72fc 100644 --- a/libavcodec/dvdsub_parser.c +++ b/libavcodec/dvdsub_parser.c @@ -45,8 +45,9 @@ static int dvdsub_parse(AVCodecParserContext *s, DVDSubParseContext *pc = s->priv_data; if (pc->packet_index == 0) { - if (buf_size < 2) + if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) { return buf_size; + } pc->packet_len = AV_RB16(buf); if (pc->packet_len == 0) /* HD-DVD subpicture packet */ pc->packet_len = AV_RB32(buf+2); From ad13a5c8fa092601290998fdf4a989e230c9022a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 01:16:14 +0200 Subject: [PATCH 333/822] avcodec/dvdsub_parser: print message if packet is smaller than the packet size field Signed-off-by: Michael Niedermayer (cherry picked from commit bcc898dd2643c883522ffa565be4b226ce798c78) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsub_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c index 07ed4f72fc..32a945ed65 100644 --- a/libavcodec/dvdsub_parser.c +++ b/libavcodec/dvdsub_parser.c @@ -46,6 +46,8 @@ static int dvdsub_parse(AVCodecParserContext *s, if (pc->packet_index == 0) { if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) { + if (buf_size) + av_log(avctx, AV_LOG_DEBUG, "Parser input %d too small\n", buf_size); return buf_size; } pc->packet_len = AV_RB16(buf); From 01c4fe7ee7b3a12cb536768edf45baf7a25d6fd2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 22:30:03 +0200 Subject: [PATCH 334/822] avformat/tee: flip assigment direction Found-by: CSA Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer (cherry picked from commit 2e6fdcb7f3c86491408a3699f0aa9dc52b7c5686) Signed-off-by: Michael Niedermayer --- libavformat/tee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 12ea0ea27d..90c9759af5 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -468,7 +468,7 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt) if ((ret = av_copy_packet(&pkt2, pkt)) < 0 || (ret = av_dup_packet(&pkt2))< 0) if (!ret_all) { - ret = ret_all; + ret_all = ret; continue; } tb = avf ->streams[s ]->time_base; From c13e38bac7e78cbf016749e3d320cd622f6f1f45 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 18:15:12 +0200 Subject: [PATCH 335/822] avcodec/wavpackenc: Fix log2sample() result value Found-by: CSA Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit e706fe764049b3f1ccf10ba9f686426a4c007906) Signed-off-by: Michael Niedermayer --- libavcodec/wavpackenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c index d7a1c61e91..bf9f918cd9 100644 --- a/libavcodec/wavpackenc.c +++ b/libavcodec/wavpackenc.c @@ -638,7 +638,7 @@ static uint32_t log2sample(uint32_t v, int limit, uint32_t *result) if ((v += v >> 9) < (1 << 8)) { dbits = nbits_table[v]; - result += (dbits << 8) + wp_log2_table[(v << (9 - dbits)) & 0xff]; + *result += (dbits << 8) + wp_log2_table[(v << (9 - dbits)) & 0xff]; } else { if (v < (1L << 16)) dbits = nbits_table[v >> 8] + 8; @@ -647,7 +647,7 @@ static uint32_t log2sample(uint32_t v, int limit, uint32_t *result) else dbits = nbits_table[v >> 24] + 24; - result += dbits = (dbits << 8) + wp_log2_table[(v >> (dbits - 9)) & 0xff]; + *result += dbits = (dbits << 8) + wp_log2_table[(v >> (dbits - 9)) & 0xff]; if (limit && dbits >= limit) return 1; From 119131fcbfdca9eda0b18d2de8401ad07e616324 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 14:03:30 +0200 Subject: [PATCH 336/822] ffserver: initialize pbuffer in prepare_sdp_description() also check pbuffer before use Found-by: CSA Reviewed-by: Stefano Sabatini Signed-off-by: Michael Niedermayer (cherry picked from commit 1d8d21b90ab91aa471f369e0f9d1ea20fb40733b) Signed-off-by: Michael Niedermayer --- ffserver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index c2d2180e8c..d0038e6d43 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2989,6 +2989,8 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, AVDictionaryEntry *entry = av_dict_get(stream->metadata, "title", NULL, 0); int i; + *pbuffer = NULL; + avc = avformat_alloc_context(); if (avc == NULL || !rtp_format) { return -1; @@ -3025,7 +3027,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, av_free(avc); av_free(avs); - return strlen(*pbuffer); + return *pbuffer ? strlen(*pbuffer) : AVERROR(ENOMEM); } static void rtsp_cmd_options(HTTPContext *c, const char *url) From 6be5a3c0451e8f199ef1da09961aa76c08c87afd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 7 Feb 2014 15:07:23 +0100 Subject: [PATCH 337/822] wmalosslessdec: fix mclms_coeffs* array size Fixes corruption of context Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org Bug-Id: CVE-2014-2098 Signed-off-by: Anton Khirnov (cherry picked from commit 849b9d34c7ef70b370c53e7af3940f51cbc07d0f) Signed-off-by: Anton Khirnov --- libavcodec/wmalosslessdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 2f341c01c4..b12eabb89a 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -127,8 +127,8 @@ typedef struct WmallDecodeCtx { int8_t mclms_order; int8_t mclms_scaling; - int16_t mclms_coeffs[128]; - int16_t mclms_coeffs_cur[4]; + int16_t mclms_coeffs[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS * 32]; + int16_t mclms_coeffs_cur[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS]; int16_t mclms_prevvalues[WMALL_MAX_CHANNELS * 2 * 32]; int16_t mclms_updates[WMALL_MAX_CHANNELS * 2 * 32]; int mclms_recent; From bea14966e2a37019cb4e38420868c5bb0542d487 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 3 Aug 2014 19:24:18 +0100 Subject: [PATCH 338/822] mmvideo: check horizontal coordinate too Fixes out of array accesses. Bug-Id: CVE-2013-3672 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov (cherry picked from commit 70cd3b8e659c3522eea5c16a65d14b8658894a94) Signed-off-by: Anton Khirnov --- libavcodec/mmvideo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index abec2e8150..d80c832a31 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -154,6 +154,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) int replace_array = bytestream2_get_byte(&s->gb); for(j=0; j<8; j++) { int replace = (replace_array >> (7-j)) & 1; + if (x + half_horiz >= s->avctx->width) + return AVERROR_INVALIDDATA; if (replace) { int color = bytestream2_get_byte(&data_ptr); s->frame->data[0][y*s->frame->linesize[0] + x] = color; From aa943bd31fada23db5cb9611215656ab9ebe5b94 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 3 Aug 2014 00:54:33 +0100 Subject: [PATCH 339/822] huffyuvdec: check width size for yuv422p Avoid out of array accesses. CC: libav-stable@libav.org Bug-Id: CVE-2013-0848 Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov (cherry picked from commit a7153444df9040bf6ae103e0bbf6104b66f974cb) Signed-off-by: Anton Khirnov --- libavcodec/huffyuvdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index 016b0d6751..1308bba7fe 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -339,6 +339,13 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } + if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && + avctx->width % 4) { + av_log(avctx, AV_LOG_ERROR, "width must be multiple of 4 " + "for this combination of colorspace and predictor type.\n"); + return AVERROR_INVALIDDATA; + } + if ((ret = ff_huffyuv_alloc_temp(s)) < 0) return ret; From 2cbdbc36708974a6e179521233f9eaa7bdaa4cb2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 5 Aug 2014 12:31:18 +0200 Subject: [PATCH 340/822] update for 2.2.6 Changelog by: Timothy Gu Signed-off-by: Michael Niedermayer --- Changelog | 10 ++++++++++ RELEASE | 2 +- VERSION | 2 +- doc/Doxyfile | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 85a971acba..b14ae5ef26 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,16 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.2.6 +- fix infinite loop in dvbsub parser +- fix some interlaced MPEG-2 videos +- fix decoding issues in dv (Ticket2340, 2341) +- fix v4l2 and v4l2enc crashes +- fix theoretical librtmp crash +- fix theorectical eamad crash +- support dimension change in g2meet + + version 2.2: - HNM version 4 demuxer and video decoder - Live HDS muxer diff --git a/RELEASE b/RELEASE index 21bb5e156f..bda8fbec15 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.5 +2.2.6 diff --git a/VERSION b/VERSION index 21bb5e156f..bda8fbec15 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.5 +2.2.6 diff --git a/doc/Doxyfile b/doc/Doxyfile index 6f19b103bf..e90c2b33fd 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.5 +PROJECT_NUMBER = 2.2.6 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From f543d32455a30c7e11206241184dfb16b8a8081c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 28 Jul 2014 02:22:11 +0200 Subject: [PATCH 341/822] remove VERSION file it overrides what version.sh prints and thus makes its output from release branches rather useless Signed-off-by: Michael Niedermayer (cherry picked from commit 2f71aeb30161edb5cb0fea5d3080094a22cc3038) Conflicts: VERSION --- VERSION | 1 - 1 file changed, 1 deletion(-) delete mode 100644 VERSION diff --git a/VERSION b/VERSION deleted file mode 100644 index bda8fbec15..0000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.2.6 From 1f4d779e87050111f831f24645580f04e0b1917b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 28 Jul 2014 02:40:35 +0200 Subject: [PATCH 342/822] version.sh: Print versions based on the last git tag for release branches release branches are detected by checking if "git" is not in RELEASE This changes "N-64706-g2f71aeb" to "n2.3-8-g2f71aeb" for git master theres no change This should improve the readability of lists of versions which come from more than 1 release branch or master + release. fate.ffmpeg.org is one possible example Reviewed-by: Timothy Gu Signed-off-by: Michael Niedermayer (cherry picked from commit ee606fd0317df202b59946cf9b738c0a01056316) Signed-off-by: Michael Niedermayer --- version.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/version.sh b/version.sh index 92edcb9474..f9754eb3cf 100755 --- a/version.sh +++ b/version.sh @@ -4,7 +4,11 @@ # check for git short hash if ! test "$revision"; then - revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) + if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then + revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) + else + revision=$(cd "$1" && git describe --tags --always 2> /dev/null) + fi fi # Shallow Git clones (--depth) do not have the N tag: From 1b99667005156cadc8d3ae0099ef5d244e598ac5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 5 Aug 2014 22:26:28 +0200 Subject: [PATCH 343/822] Changelog: fix typo Found-by: Timothy Gu Signed-off-by: Michael Niedermayer --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index b14ae5ef26..8a87653e5d 100644 --- a/Changelog +++ b/Changelog @@ -7,7 +7,7 @@ version 2.2.6 - fix decoding issues in dv (Ticket2340, 2341) - fix v4l2 and v4l2enc crashes - fix theoretical librtmp crash -- fix theorectical eamad crash +- fix theoretical eamad crash - support dimension change in g2meet From a5992a274ff5f6c4bec3445cb410da0adce8ef70 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 21 Apr 2014 02:33:35 +0200 Subject: [PATCH 344/822] stereo3d: add missing include guards --- libavutil/stereo3d.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h index 695d6f1bae..b1910b1f87 100644 --- a/libavutil/stereo3d.h +++ b/libavutil/stereo3d.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVUTIL_STEREO3D_H +#define AVUTIL_STEREO3D_H + #include #include "frame.h" @@ -145,3 +148,5 @@ AVStereo3D *av_stereo3d_alloc(void); * @return The AVStereo3D structure to be filled by caller. */ AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_STEREO3D_H */ From 6598aaea1ad2cf82d40abb191ac26a5e4e5147ba Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 6 Aug 2014 11:07:08 +0100 Subject: [PATCH 345/822] jpeg2000: enable 4 component pixel formats Bug-Id: 721 CC: libav-stable@libav.org Sample-Id: 31230.mov --- libavcodec/jpeg2000dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index cc154c3522..3b4efc3f6f 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -178,7 +178,7 @@ static int get_siz(Jpeg2000DecoderContext *s) return AVERROR_INVALIDDATA; } - if (ncomponents > 3) { + if (ncomponents > 4) { avpriv_request_sample(s->avctx, "Support for %d components", s->ncomponents); return AVERROR_PATCHWELCOME; From 5bf5a35fb5d452ea4b30cd7b853d92df6705d250 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 6 Aug 2014 10:46:50 +0000 Subject: [PATCH 346/822] cdgraphics: switch to bytestream2 Fixes possible invalid memory accesses on corrupted data. CC:libav-stable@libav.org Bug-ID: CVE-2013-3674 (cherry picked from commit a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812) Signed-off-by: Anton Khirnov --- libavcodec/cdgraphics.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index b8a6fb845b..752003f434 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -261,7 +261,7 @@ static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data, static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; + GetByteContext gb; int buf_size = avpkt->size; int ret; uint8_t command, inst; @@ -269,10 +269,8 @@ static int cdg_decode_frame(AVCodecContext *avctx, AVFrame *frame = data; CDGraphicsContext *cc = avctx->priv_data; - if (buf_size < CDG_MINIMUM_PKT_SIZE) { - av_log(avctx, AV_LOG_ERROR, "buffer too small for decoder\n"); - return AVERROR(EINVAL); - } + bytestream2_init(&gb, avpkt->data, avpkt->size); + ret = ff_reget_buffer(avctx, cc->frame); if (ret) { @@ -282,11 +280,11 @@ static int cdg_decode_frame(AVCodecContext *avctx, if (!avctx->frame_number) memset(cc->frame->data[0], 0, cc->frame->linesize[0] * avctx->height); - command = bytestream_get_byte(&buf); - inst = bytestream_get_byte(&buf); + command = bytestream2_get_byte(&gb); + inst = bytestream2_get_byte(&gb); inst &= CDG_MASK; - buf += 2; /// skipping 2 unneeded bytes - bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE); + bytestream2_skip(&gb, 2); + bytestream2_get_buffer(&gb, cdg_data, sizeof(cdg_data)); if ((command & CDG_MASK) == CDG_COMMAND) { switch (inst) { From 18f48e05a22a73a389fb3ab4b3eaf78903bab5ef Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 6 Aug 2014 10:56:34 +0000 Subject: [PATCH 347/822] cdgraphics: do not return 0 from the decode function 0 means no data consumed, so it can trigger an infinite loop in the caller. CC:libav-stable@libav.org (cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36) Signed-off-by: Anton Khirnov --- libavcodec/cdgraphics.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 752003f434..c3e42e750a 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -349,10 +349,9 @@ static int cdg_decode_frame(AVCodecContext *avctx, *got_frame = 1; } else { *got_frame = 0; - buf_size = 0; } - return buf_size; + return avpkt->size; } static av_cold int cdg_decode_end(AVCodecContext *avctx) From d513c6a0ee582d22b6e793286774abbde01f6680 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 3 Aug 2014 10:14:48 +0200 Subject: [PATCH 348/822] svq1: do not modify the input packet The input data must remain constant, make a copy instead. This is in theory a performance hit, but since I failed to find any samples using this feature, this should not matter in practice. Also, check the size of the header, avoiding invalid reads on truncated data. CC:libav-stable@libav.org (cherry picked from commit 7b588bb691644e1b3c168b99accf74248a24e3cf) Signed-off-by: Anton Khirnov --- libavcodec/svq1dec.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 000487b197..14ff41cc18 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -60,6 +60,10 @@ typedef struct SVQ1Context { HpelDSPContext hdsp; GetBitContext gb; AVFrame *prev; + + uint8_t *pkt_swapped; + int pkt_swapped_allocated; + int width; int height; int frame_code; @@ -626,7 +630,24 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, /* swap some header bytes (why?) */ if (s->frame_code != 0x20) { - uint32_t *src = (uint32_t *)(buf + 4); + uint32_t *src; + + if (buf_size < 9 * 4) { + av_log(avctx, AV_LOG_ERROR, "Input packet too small\n"); + return AVERROR_INVALIDDATA; + } + + av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated, + buf_size); + if (!s->pkt_swapped) + return AVERROR(ENOMEM); + + memcpy(s->pkt_swapped, buf, buf_size); + buf = s->pkt_swapped; + init_get_bits(&s->gb, buf, buf_size * 8); + skip_bits(&s->gb, 22); + + src = (uint32_t *)(s->pkt_swapped + 4); for (i = 0; i < 4; i++) src[i] = ((src[i] << 16) | (src[i] >> 16)) ^ src[7 - i]; @@ -796,6 +817,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) SVQ1Context *s = avctx->priv_data; av_frame_free(&s->prev); + av_freep(&s->pkt_swapped); return 0; } From 67134ad31f1f3bc1515eae129e4368401f7c3342 Mon Sep 17 00:00:00 2001 From: Felix Abecassis Date: Thu, 7 Aug 2014 11:42:36 +0200 Subject: [PATCH 349/822] h264: fix interpretation of interleaved stereo modes Column and row frame packing arrangements were inverted. Signed-off-by: Vittorio Giovara --- libavcodec/h264.c | 4 ++-- libavcodec/libx264.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 29b96c4d70..aee8db009c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2045,10 +2045,10 @@ static void decode_postinit(H264Context *h, int setup_finished) stereo->type = AV_STEREO3D_CHECKERBOARD; break; case 1: - stereo->type = AV_STEREO3D_LINES; + stereo->type = AV_STEREO3D_COLUMNS; break; case 2: - stereo->type = AV_STEREO3D_COLUMNS; + stereo->type = AV_STEREO3D_LINES; break; case 3: if (h->quincunx_subsampling) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index abf0a3e887..78808f3ce4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -175,10 +175,10 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, case AV_STEREO3D_CHECKERBOARD: fpa_type = 0; break; - case AV_STEREO3D_LINES: + case AV_STEREO3D_COLUMNS: fpa_type = 1; break; - case AV_STEREO3D_COLUMNS: + case AV_STEREO3D_LINES: fpa_type = 2; break; case AV_STEREO3D_SIDEBYSIDE: From 723512ac71716d1f27ed33f4742913cba3e47ae5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 7 Aug 2014 02:27:07 +0200 Subject: [PATCH 350/822] avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet" Add padding, clear size, use the correct pointer. Signed-off-by: Michael Niedermayer (cherry picked from commit 4213fc5b9eebec53c7d22b770c3f1ceecca1c113) Signed-off-by: Michael Niedermayer --- libavcodec/svq1dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index cab9bac901..eb643446d1 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -635,7 +635,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } - av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated, + av_fast_padded_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated, buf_size); if (!s->pkt_swapped) return AVERROR(ENOMEM); @@ -818,6 +818,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) av_frame_free(&s->prev); av_freep(&s->pkt_swapped); + s->pkt_swapped_allocated = 0; return 0; } From 588e7226edb823392e6c43b0af81c52ceebc1128 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Aug 2014 03:29:42 +0200 Subject: [PATCH 351/822] ffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec Fixes part of ticket2236 Signed-off-by: Michael Niedermayer (cherry picked from commit 956f4087c6eb717e31f3b92fe03fd56a3747eccf) Signed-off-by: Michael Niedermayer --- ffmpeg_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 3d50d7708b..c09675ce68 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1783,7 +1783,7 @@ static int open_output_file(OptionsContext *o, const char *filename) /* pick the "best" stream of each type */ /* video: highest resolution */ - if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) { + if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) { int area = 0, idx = -1; int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0); for (i = 0; i < nb_input_streams; i++) { @@ -1805,7 +1805,7 @@ static int open_output_file(OptionsContext *o, const char *filename) } /* audio: most channels */ - if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) { + if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) { int channels = 0, idx = -1; for (i = 0; i < nb_input_streams; i++) { ist = input_streams[i]; From ffc66ac0d641f3527d2f910dc3d37ea558513407 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 6 Aug 2014 13:59:18 +0200 Subject: [PATCH 352/822] avutil/cpu: add aarch64 entries to 2nd table Signed-off-by: Michael Niedermayer (cherry picked from commit efc4fe9d74a5040e465dbff80b29468dbc227c19) Signed-off-by: Michael Niedermayer --- libavutil/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index d6d93a35d6..f4d3d14e6c 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -224,6 +224,9 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" }, { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, +#elif ARCH_AARCH64 + { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, + { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, #endif { NULL }, }; From 0397d434054ab9a80fbf8e2357538ca29d4fe427 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 Aug 2014 21:59:33 +0200 Subject: [PATCH 353/822] avcodec/iff: check pixfmt for rgb8 / rgbn Fixes out of array access Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 3539d6c63a16e1b2874bb037a86f317449c58770) Signed-off-by: Michael Niedermayer --- libavcodec/iff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/iff.c b/libavcodec/iff.c index f08a0f70ce..d93015c0c3 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -847,9 +847,9 @@ static int decode_frame(AVCodecContext *avctx, break; case 4: bytestream2_init(&gb, buf, buf_size); - if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8')) + if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8') && avctx->pix_fmt == AV_PIX_FMT_RGB32) decode_rgb8(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]); - else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N')) + else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N') && avctx->pix_fmt == AV_PIX_FMT_RGB444) decode_rgbn(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]); else return unsupported(avctx); From bb7f236c7fefa3a8918f1578bc4c82f38395ef94 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 11 Aug 2014 15:36:22 +0200 Subject: [PATCH 354/822] avcodec/snow: fix null pointer dereference in cleanup after allocation failure Fixes: snowf.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c) Signed-off-by: Michael Niedermayer --- libavcodec/snow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index c645b120fb..5184acd6eb 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -689,7 +689,7 @@ av_cold void ff_snow_common_end(SnowContext *s) for(i=0; iref_mvs[i]); av_freep(&s->ref_scores[i]); - if(s->last_picture[i]->data[0]) { + if(s->last_picture[i] && s->last_picture[i]->data[0]) { av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]); } av_frame_free(&s->last_picture[i]); From c0ad5f9333f4bfb25ebfd95dcfd321d3175e076b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 11 Aug 2014 20:16:12 +0200 Subject: [PATCH 355/822] Update for 2.2.7 Signed-off-by: Michael Niedermayer --- Changelog | 6 ++++++ RELEASE | 2 +- doc/Doxyfile | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 8a87653e5d..1339a7b33f 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,12 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.2.7 +- snow: fix null pointer dereference +- iff: fix out of array access +- svq1dec: fix input data corruption + + version 2.2.6 - fix infinite loop in dvbsub parser - fix some interlaced MPEG-2 videos diff --git a/RELEASE b/RELEASE index bda8fbec15..5bc1cc43d4 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.6 +2.2.7 diff --git a/doc/Doxyfile b/doc/Doxyfile index e90c2b33fd..6e757718f6 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.6 +PROJECT_NUMBER = 2.2.7 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 7740b111dd9af46ea52b3af60e59fdbd40250b31 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 11 Aug 2014 22:06:07 +0000 Subject: [PATCH 356/822] proresenc_kostya: remove unneeded parameters Signed-off-by: Michael Niedermayer (cherry picked from commit bf10f09bccdcfdb41b9f5bbae01d55961bfd0693) Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index ea1fd8ae7f..e60f2274e4 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -472,7 +472,6 @@ static void put_alpha_run(PutBitContext *pb, int run) // todo alpha quantisation for high quants static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb, - const uint16_t *src, int linesize, int mbs_per_slice, uint16_t *blocks, int quant) { @@ -567,7 +566,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, get_alpha_data(ctx, src, linesize, xp, yp, pwidth, avctx->height / ctx->pictures_per_frame, ctx->blocks[0], mbs_per_slice, ctx->alpha_bits); - sizes[i] = encode_alpha_plane(ctx, pb, src, linesize, + sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant); } From 1ad1723c24cd2683df6d00a83b6f28d3ff45fb96 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 11 Aug 2014 22:06:08 +0000 Subject: [PATCH 357/822] proresenc_kostya: report buffer overflow If the allocated size, despite best efforts, is too small, exit with the appropriate error. Signed-off-by: Michael Niedermayer (cherry picked from commit 52b81ff4635c077b2bc8b8d3637d933b6629d803) Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index e60f2274e4..aac4b074ae 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -571,6 +571,11 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, quant); } total_size += sizes[i]; + if (put_bits_left(pb) < 0) { + av_log(avctx, AV_LOG_ERROR, "Serious underevaluation of" + "required buffer size"); + return AVERROR_BUFFER_TOO_SMALL; + } } return total_size; } @@ -941,9 +946,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; - pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE; + pkt_size = ctx->frame_size_upper_bound; - if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0) return ret; orig_buf = pkt->data; @@ -1020,7 +1025,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, slice_hdr = buf; buf += slice_hdr_size - 1; init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); - encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); + ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); + if (ret < 0) + return ret; bytestream_put_byte(&slice_hdr, q); slice_size = slice_hdr_size + sizes[ctx->num_planes - 1]; From 49fa398858df1a1e425740672de5fb4819b4d947 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 Aug 2014 05:18:21 +0200 Subject: [PATCH 358/822] Changelog: add entry for proresenc --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 1339a7b33f..94c3a1501d 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ version 2.2.7 - snow: fix null pointer dereference - iff: fix out of array access - svq1dec: fix input data corruption +- proresenc_ks: check buffer size version 2.2.6 From 8231764784a405f546e9c427a6de22d3f4de5c35 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 30 Aug 2013 04:51:09 +0200 Subject: [PATCH 359/822] ffv1dec: check that global parameters do not change in version 0/1 Such changes are neither allowed nor supported Found-by: ami_stuff Bug-Id: CVE-2013-7020 CC: libav-stable@libav.org Signed-off-by: Anton Khirnov (cherry picked from commit da7d839a0d3ec40423a665dc85e0cfaed3f92eb8) Signed-off-by: Anton Khirnov --- libavcodec/ffv1dec.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 8f7b2bf32e..e6c46e7253 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -542,6 +542,7 @@ static int read_header(FFV1Context *f) memset(state, 128, sizeof(state)); if (f->version < 2) { + int chroma_planes, chroma_h_shift, chroma_v_shift, transparency, colorspace, bits_per_raw_sample; unsigned v = get_symbol(c, state, 0); if (v > 1) { av_log(f->avctx, AV_LOG_ERROR, @@ -558,15 +559,32 @@ static int read_header(FFV1Context *f) get_symbol(c, state, 1) + c->one_state[i]; } - f->colorspace = get_symbol(c, state, 0); //YUV cs type + colorspace = get_symbol(c, state, 0); //YUV cs type + bits_per_raw_sample = f->version > 0 ? get_symbol(c, state, 0) : f->avctx->bits_per_raw_sample; + chroma_planes = get_rac(c, state); + chroma_h_shift = get_symbol(c, state, 0); + chroma_v_shift = get_symbol(c, state, 0); + transparency = get_rac(c, state); - if (f->version > 0) - f->avctx->bits_per_raw_sample = get_symbol(c, state, 0); + if (f->plane_count) { + if (colorspace != f->colorspace || + bits_per_raw_sample != f->avctx->bits_per_raw_sample || + chroma_planes != f->chroma_planes || + chroma_h_shift != f->chroma_h_shift || + chroma_v_shift != f->chroma_v_shift || + transparency != f->transparency) { + av_log(f->avctx, AV_LOG_ERROR, "Invalid change of global parameters\n"); + return AVERROR_INVALIDDATA; + } + } + + f->colorspace = colorspace; + f->avctx->bits_per_raw_sample = bits_per_raw_sample; + f->chroma_planes = chroma_planes; + f->chroma_h_shift = chroma_h_shift; + f->chroma_v_shift = chroma_v_shift; + f->transparency = transparency; - f->chroma_planes = get_rac(c, state); - f->chroma_h_shift = get_symbol(c, state, 0); - f->chroma_v_shift = get_symbol(c, state, 0); - f->transparency = get_rac(c, state); f->plane_count = 2 + f->transparency; } From 23376ae2f0247ff659724b6a5313639db0c991ad Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sun, 3 Aug 2014 19:27:07 +0200 Subject: [PATCH 360/822] mpegts: Define the section length with a constant The specification says the value is expressed in 10 bits including the 4-byte CRC. (cherry picked from commit 89616408e38ac7257e36976723df0e23d6ee1157) Signed-off-by: Diego Biurrun Conflicts: libavformat/mpegtsenc.c --- libavformat/mpegtsenc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 8efd93ef31..102620074f 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -88,6 +88,10 @@ typedef struct MpegTSWrite { #define DEFAULT_PES_HEADER_FREQ 16 #define DEFAULT_PES_PAYLOAD_SIZE ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170) +/* The section length is 12 bits. The first 2 are set to 0, the remaining + * 10 bits should not exceed 1021. */ +#define SECTION_LENGTH 1020 + static const AVOption options[] = { { "mpegts_transport_stream_id", "Set transport_stream_id field.", offsetof(MpegTSWrite, transport_stream_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, @@ -234,7 +238,7 @@ static void mpegts_write_pat(AVFormatContext *s) { MpegTSWrite *ts = s->priv_data; MpegTSService *service; - uint8_t data[1012], *q; + uint8_t data[SECTION_LENGTH], *q; int i; q = data; @@ -250,7 +254,7 @@ static void mpegts_write_pat(AVFormatContext *s) static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) { MpegTSWrite *ts = s->priv_data; - uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr; + uint8_t data[SECTION_LENGTH], *q, *desc_length_ptr, *program_info_length_ptr; int val, stream_type, i; q = data; @@ -405,7 +409,7 @@ static void mpegts_write_sdt(AVFormatContext *s) { MpegTSWrite *ts = s->priv_data; MpegTSService *service; - uint8_t data[1012], *q, *desc_list_len_ptr, *desc_len_ptr; + uint8_t data[SECTION_LENGTH], *q, *desc_list_len_ptr, *desc_len_ptr; int i, running_status, free_ca_mode, val; q = data; From 7788297a59656ececd84f602292bfeb79f7eedd7 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 12 Aug 2014 20:21:12 +0200 Subject: [PATCH 361/822] mpegts: Do not try to write a PMT larger than SECTION_SIZE Prevent out of array writes. Similar to what Michael Niedermayer did to address the same issue. Bug-Id: CVE-2014-2263 CC: libav-stable@libav.org Signed-off-by: Diego Biurrun (cherry picked from commit e8049af1325dd59a51546c15b2e71a0f578e9d27) Conflicts: libavformat/mpegtsenc.c --- libavformat/mpegtsenc.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 102620074f..4dc52bfecf 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -255,7 +255,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) { MpegTSWrite *ts = s->priv_data; uint8_t data[SECTION_LENGTH], *q, *desc_length_ptr, *program_info_length_ptr; - int val, stream_type, i; + int val, stream_type, i, err = 0; q = data; put16(&q, 0xe000 | service->pcr_pid); @@ -273,6 +273,11 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) AVStream *st = s->streams[i]; MpegTSWriteStream *ts_st = st->priv_data; AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0); + + if (q - data > SECTION_LENGTH - 3 - 2 - 6) { + err = 1; + break; + } switch(st->codec->codec_id) { case AV_CODEC_ID_MPEG1VIDEO: case AV_CODEC_ID_MPEG2VIDEO: @@ -325,6 +330,10 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) *len_ptr = 0; for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next + 1) { + if (q - data > SECTION_LENGTH - 4) { + err = 1; + break; + } next = strchr(p, ','); if (strlen(p) != 3 && (!next || next != p + 3)) continue; /* not a 3-letter code */ @@ -359,6 +368,12 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) *q++ = language[1]; *q++ = language[2]; *q++ = 0x10; /* normal subtitles (0x20 = if hearing pb) */ + + if (q - data > SECTION_LENGTH - 4) { + err = 1; + break; + } + if(st->codec->extradata_size == 4) { memcpy(q, st->codec->extradata, 4); q += 4; @@ -384,6 +399,13 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) desc_length_ptr[0] = val >> 8; desc_length_ptr[1] = val; } + + if (err) + av_log(s, AV_LOG_ERROR, + "The PMT section cannot fit stream %d and all following streams.\n" + "Try reducing the number of languages in the audio streams " + "or the total number of streams.\n", i); + mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0, data, q - data); } From 1578986a0da41ab417ddddf5964fa192d27b759f Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 11 Aug 2014 19:43:27 +0200 Subject: [PATCH 362/822] proresenc_kostya: properly account for alpha The packet buffer allocation considered as dct-coded, while it is actually run-coded and thus requires a larger buffer. Signed-off-by: Michael Niedermayer (cherry picked from commit 117bc8e6ffc744fedcf77edf2fdb33c964b83370) Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index aac4b074ae..463056c962 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1209,8 +1209,6 @@ static av_cold int encode_init(AVCodecContext *avctx) ctx->bits_per_mb = ls * 8; if (ctx->chroma_factor == CFACTOR_Y444) ctx->bits_per_mb += ls * 4; - if (ctx->num_planes == 4) - ctx->bits_per_mb += ls * 4; } ctx->frame_size_upper_bound = ctx->pictures_per_frame * @@ -1219,6 +1217,14 @@ static av_cold int encode_init(AVCodecContext *avctx) (mps * ctx->bits_per_mb) / 8) + 200; + if (ctx->alpha_bits) { + // alpha plane is run-coded and might run over bit budget + ctx->frame_size_upper_bound += ctx->pictures_per_frame * + ctx->slices_per_picture * + /* num pixels per slice */ (ctx->mbs_per_slice * 256 * + /* bits per pixel */ (1 + ctx->alpha_bits + 1) + 7 >> 3); + } + avctx->codec_tag = ctx->profile_info->tag; av_log(avctx, AV_LOG_DEBUG, From 493a92313fa6c7529ddab0045e1b4eee9ec7a85e Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 17 Aug 2014 10:19:48 -0400 Subject: [PATCH 363/822] Prepare for 10.4 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index 260e37521a..1be519cd2e 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.3 +10.4 From ee9e966296d74ca3836be5b5adc839cfc73d8c98 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 17 Aug 2014 10:23:20 -0400 Subject: [PATCH 364/822] Update Changelog for v10.4 --- Changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Changelog b/Changelog index 07ea870bbb..ed1292b9cc 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,20 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.4: +- mpegts: Do not try to write a PMT larger than SECTION_SIZE (CVE-2014-2263) +- mpegts: Define the section length with a constant +- ffv1dec: check that global parameters do not change in version 0/1 (CVE-2013-7020) +- h264: fix interpretation of interleaved stereo modes +- svq1: do not modify the input packet +- cdgraphics: do not return 0 from the decode function +- cdgraphics: switch to bytestream2 (CVE-2013-3674) +- jpeg2000: enable 4 component pixel formats +- stereo3d: add missing include guards +- huffyuvdec: check width size for yuv422p (CVE-2013-0848) +- mmvideo: check horizontal coordinate too (CVE-2013-3672) +- wmalosslessdec: fix mclms_coeffs* array size (CVE-2014-2098) + version 10.3: - huffyuv: Check and propagate function return values (CVE-2013-0868) - h264: prevent theoretical infinite loop in SEI parsing (CVE-2011-3946) From b3f48a5044fd04539337e91d28022207c9d3b9e8 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 18 Aug 2014 14:15:21 +0000 Subject: [PATCH 365/822] proresenc: Remove unneeded parameters from encode_alpha_plane() Signed-off-by: Diego Biurrun Signed-off-by: Luca Barbato (cherry picked from commit b16699f2da9c1d41eff852ec3a0c81f74fd44421) Signed-off-by: Luca Barbato --- libavcodec/proresenc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 7e9ce541b6..c03b3b5dc9 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -467,7 +467,6 @@ static void put_alpha_run(PutBitContext *pb, int run) // todo alpha quantisation for high quants static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb, - const uint16_t *src, int linesize, int mbs_per_slice, uint16_t *blocks, int quant) { @@ -562,9 +561,8 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, get_alpha_data(ctx, src, linesize, xp, yp, pwidth, avctx->height / ctx->pictures_per_frame, ctx->blocks[0], mbs_per_slice, ctx->alpha_bits); - sizes[i] = encode_alpha_plane(ctx, pb, src, linesize, - mbs_per_slice, ctx->blocks[0], - quant); + sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice, + ctx->blocks[0], quant); } total_size += sizes[i]; } From e912b0777b24133df27836b6c529faa89af588dc Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 18 Aug 2014 14:15:22 +0000 Subject: [PATCH 366/822] proresenc: Report buffer overflow If the allocated size, despite best efforts, is too small, exit with the appropriate error. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun Signed-off-by: Luca Barbato (cherry picked from commit 58b68e4fdea22e22178e237bda950b09cc6f363a) Signed-off-by: Luca Barbato --- libavcodec/proresenc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index c03b3b5dc9..90f7406601 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -565,6 +565,11 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, ctx->blocks[0], quant); } total_size += sizes[i]; + if (put_bits_left(pb) < 0) { + av_log(avctx, AV_LOG_ERROR, + "Underestimated required buffer size.\n"); + return AVERROR_BUG; + } } return total_size; } @@ -935,9 +940,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; - pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE; + pkt_size = ctx->frame_size_upper_bound; - if ((ret = ff_alloc_packet(pkt, pkt_size)) < 0) { + if ((ret = ff_alloc_packet(pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0) { av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); return ret; } @@ -1016,7 +1021,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, slice_hdr = buf; buf += slice_hdr_size - 1; init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); - encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); + ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, + mbs_per_slice); + if (ret < 0) + return ret; bytestream_put_byte(&slice_hdr, q); slice_size = slice_hdr_size + sizes[ctx->num_planes - 1]; From a437298de55c6a6a4f06b12335b3891bf4459082 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 18 Aug 2014 14:15:23 +0000 Subject: [PATCH 367/822] proresenc: Realloc if buffer is too small The buffer allocation may be incorrect (e.g. with an alpha plane), and currently causes the buffer to be set to NULL by init_put_bits, causing a crash later on. So, detect that situation, and if detected, reallocate the buffer and ask for a sample that shows the problem. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun Signed-off-by: Luca Barbato (cherry picked from commit 45ce880a9b3e50cfa088f111dffaf8685bd7bc6b) Signed-off-by: Luca Barbato --- libavcodec/proresenc.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 90f7406601..570a73caa8 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -205,6 +205,7 @@ typedef struct ProresContext { int bits_per_mb; int force_quant; int alpha_bits; + int warn; char *vendor; int quant_sel; @@ -933,7 +934,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int sizes[4] = { 0 }; int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1); int frame_size, picture_size, slice_size; - int pkt_size, ret; + int pkt_size, ret, max_slice_size = 0; uint8_t frame_flags; *avctx->coded_frame = *pic; @@ -1020,6 +1021,39 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte(&buf, slice_hdr_size << 3); slice_hdr = buf; buf += slice_hdr_size - 1; + if (pkt_size <= buf - orig_buf + 2 * max_slice_size) { + uint8_t *start = pkt->data; + // Recompute new size according to max_slice_size + // and deduce delta + int delta = 200 + ctx->pictures_per_frame * + ctx->slices_per_picture * max_slice_size - + pkt_size; + + delta = FFMAX(delta, 2 * max_slice_size); + ctx->frame_size_upper_bound += delta; + + if (!ctx->warn) { + avpriv_request_sample(avctx, + "Packet too small: is %i," + " needs %i (slice: %i). " + "Correct allocation", + pkt_size, delta, max_slice_size); + ctx->warn = 1; + } + + ret = av_grow_packet(pkt, delta); + if (ret < 0) + return ret; + + pkt_size += delta; + // restore pointers + orig_buf = pkt->data + (orig_buf - start); + buf = pkt->data + (buf - start); + picture_size_pos = pkt->data + (picture_size_pos - start); + slice_sizes = pkt->data + (slice_sizes - start); + slice_hdr = pkt->data + (slice_hdr - start); + tmp = pkt->data + (tmp - start); + } init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); @@ -1034,6 +1068,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, } bytestream_put_be16(&slice_sizes, slice_size); buf += slice_size - slice_hdr_size; + if (max_slice_size < slice_size) + max_slice_size = slice_size; } } From f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Mon, 18 Aug 2014 14:15:24 +0000 Subject: [PATCH 368/822] proresenc: Properly account for alpha plane The packet buffer allocation considers the alpha channel as DCT-coded, while it is actually run-coded and thus requires a larger buffer. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun Signed-off-by: Luca Barbato (cherry picked from commit 41e1354c101004ccd46dc08d3dd6e956e83a6b51) Signed-off-by: Luca Barbato --- libavcodec/proresenc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 570a73caa8..a43612cf0e 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -1231,8 +1231,6 @@ static av_cold int encode_init(AVCodecContext *avctx) ctx->bits_per_mb = ls * 8; if (ctx->chroma_factor == CFACTOR_Y444) ctx->bits_per_mb += ls * 4; - if (ctx->num_planes == 4) - ctx->bits_per_mb += ls * 4; } ctx->frame_size_upper_bound = ctx->pictures_per_frame * @@ -1241,6 +1239,14 @@ static av_cold int encode_init(AVCodecContext *avctx) (mps * ctx->bits_per_mb) / 8) + 200; + if (ctx->alpha_bits) { + // The alpha plane is run-coded and might exceed the bit budget. + ctx->frame_size_upper_bound += ctx->pictures_per_frame * + ctx->slices_per_picture * + /* num pixels per slice */ (ctx->mbs_per_slice * 256 * + /* bits per pixel */ (1 + ctx->alpha_bits + 1) + 7 >> 3); + } + avctx->codec_tag = ctx->profile_info->tag; av_log(avctx, AV_LOG_DEBUG, From 37e2d574ddcedc25e32bd963737b033354543789 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 20 Aug 2014 09:54:50 -0700 Subject: [PATCH 369/822] setpts: Add missing inttypes.h #include for PRId64 Also convert a debug av_log() to av_dlog(). (cherry picked from commit a89dd9a72c6e9c3111d6f34d9b08cd624fe76358) Signed-off-by: Diego Biurrun --- libavfilter/setpts.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index be190c0ef7..926fbf7d3d 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -24,6 +24,8 @@ * video presentation timestamp (PTS) modification filter */ +#include + #include "libavutil/eval.h" #include "libavutil/internal.h" #include "libavutil/mathematics.h" @@ -141,15 +143,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) d = av_expr_eval(setpts->expr, setpts->var_values, NULL); frame->pts = D2TS(d); -#ifdef DEBUG - av_log(inlink->dst, AV_LOG_DEBUG, - "n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n", - (int64_t)setpts->var_values[VAR_N], - (int)setpts->var_values[VAR_INTERLACED], - in_pts, in_pts * av_q2d(inlink->time_base), - frame->pts, frame->pts * av_q2d(inlink->time_base)); -#endif - + av_dlog(inlink->dst, + "n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n", + (int64_t)setpts->var_values[VAR_N], + (int)setpts->var_values[VAR_INTERLACED], + in_pts, in_pts * av_q2d(inlink->time_base), + frame->pts, frame->pts * av_q2d(inlink->time_base)); if (inlink->type == AVMEDIA_TYPE_VIDEO) { setpts->var_values[VAR_N] += 1.0; From 051ac5c0f51c119b33a57f3e137d7344eb1c2b26 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 18 Apr 2014 23:11:31 +0200 Subject: [PATCH 370/822] mpegvideo: Use the current_picture pts The picture slot can be recycled by select_input_picture and only current_picture is populated with the valid pts. Unbreak timestamps when in cbr mode. Signed-off-by: Luca Barbato (cherry picked from commit 1c7b71a5bdb88ebb69734100405bbb5441b871e8) Signed-off-by: Anton Khirnov Conflicts: libavcodec/mpegvideo_enc.c --- libavcodec/mpegvideo_enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 091bee39d7..dcc399f8dd 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1663,12 +1663,12 @@ vbv_retry: avctx->frame_bits = s->frame_bits; pkt->pts = s->current_picture.f.pts; - if (!s->low_delay) { + if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) { if (!s->current_picture.f.coded_picture_number) pkt->dts = pkt->pts - s->dts_delta; else pkt->dts = s->reordered_pts; - s->reordered_pts = s->input_picture[0]->f.pts; + s->reordered_pts = pkt->pts; } else pkt->dts = pkt->pts; if (s->current_picture.f.key_frame) From 3ac0638d573fc483ba6be3444858b26711c5d67d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Aug 2014 21:21:57 +0000 Subject: [PATCH 371/822] mpegenc: limit the maximum muxrate It is written to the file as a 22-bit value. CC: libav-stable@libav.org (cherry picked from commit 75bbaf2493a71ee66eaabe3c21fadd84d07888de) Signed-off-by: Anton Khirnov Conflicts: libavformat/mpegenc.c --- libavformat/mpegenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 13d5b0375c..fe0ad6778f 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1135,7 +1135,7 @@ static int mpeg_mux_end(AVFormatContext *ctx) #define OFFSET(x) offsetof(MpegMuxContext, x) #define E AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { - { "muxrate", NULL, OFFSET(mux_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, + { "muxrate", NULL, OFFSET(mux_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, (1 << 22) - 1, E }, { "preload", "Initial demux-decode delay in microseconds.", OFFSET(preload), AV_OPT_TYPE_INT, {.i64 = 500000}, 0, INT_MAX, E}, { NULL }, }; From 7bc37641e3e6c24d472ae06fcbecaba4c863829b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Aug 2014 21:24:35 +0000 Subject: [PATCH 372/822] avconv: fix the muxrate values for -target The mpegenc private option values are in 50-byte units. CC: libav-stable@libav.org (cherry picked from commit 1688eef25385089026aba55da1885f70a57815ab) Signed-off-by: Anton Khirnov --- avconv_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avconv_opt.c b/avconv_opt.c index 73d283ae21..17abc3c1a3 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1772,7 +1772,7 @@ static int opt_target(void *optctx, const char *opt, const char *arg) parse_option(o, "ac", "2", options); opt_default(NULL, "packetsize", "2324"); - opt_default(NULL, "muxrate", "1411200"); // 2352 * 75 * 8; + opt_default(NULL, "muxrate", "3528"); // 2352 * 75 / 50; /* We have to offset the PTS, so that it is consistent with the SCR. SCR starts at 36000, but the first two packs contain only padding @@ -1818,7 +1818,7 @@ static int opt_target(void *optctx, const char *opt, const char *arg) opt_default(NULL, "bufsize", "1835008"); // 224*1024*8; opt_default(NULL, "packetsize", "2048"); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack. - opt_default(NULL, "muxrate", "10080000"); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8 + opt_default(NULL, "muxrate", "25200"); // from mplex project: data_rate = 1260000. mux_rate = data_rate / 50 opt_default(NULL, "b:a", "448000"); parse_option(o, "ar", "48000", options); From f7395926f204051af9ad459a6d876b96ee6179ee Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 26 Aug 2014 06:26:35 +0000 Subject: [PATCH 373/822] avconv: fix parsing the AVOptions for -target CC: libav-stable@libav.org (cherry picked from commit f5245a9c6206878b892adf3ccbccc9311c202af5) Signed-off-by: Anton Khirnov --- avconv_opt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/avconv_opt.c b/avconv_opt.c index 17abc3c1a3..8ffdde94f5 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1839,6 +1839,10 @@ static int opt_target(void *optctx, const char *opt, const char *arg) av_log(NULL, AV_LOG_ERROR, "Unknown target: %s\n", arg); return AVERROR(EINVAL); } + + av_dict_copy(&o->g->codec_opts, codec_opts, 0); + av_dict_copy(&o->g->format_opts, format_opts, 0); + return 0; } From 9fcc632249be3080836a3afce25b3092939743ac Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 23 Aug 2014 19:03:21 +0200 Subject: [PATCH 374/822] pulse: Add a wallclock option to be compatible with other other captures alsa and x11grab use av_gettime() to report timestamps. Have it on by default. Bug-Id: 647 (cherry picked from commit 424b929b5cb9ca4094099f25179829260d4b0fa3) (cherry picked from commit 404731bd20e1df5880e6fe381e975ba48afc75b2) Signed-off-by: Luca Barbato --- libavdevice/pulse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c index a8e710d279..2136ee3fa4 100644 --- a/libavdevice/pulse.c +++ b/libavdevice/pulse.c @@ -31,6 +31,7 @@ #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavutil/time.h" #include "libavutil/opt.h" #define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) @@ -47,6 +48,7 @@ typedef struct PulseData { pa_simple *s; int64_t pts; int64_t frame_duration; + int wallclock; } PulseData; static pa_sample_format_t codec_id_to_pulse_format(int codec_id) { @@ -141,6 +143,8 @@ static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt) if (pd->pts == AV_NOPTS_VALUE) { pd->pts = -latency; + if (pd->wallclock) + pd->pts += av_gettime(); } pkt->pts = pd->pts; @@ -168,6 +172,7 @@ static const AVOption options[] = { { "channels", "number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX, D }, { "frame_size", "number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, D }, { "fragment_size", "buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D }, + { "wallclock", "set the initial pts using the current time", OFFSET(wallclock), AV_OPT_TYPE_INT, {.i64 = 1}, -1, 1, D }, { NULL }, }; From 1a7d1793d6d2de4201c2d9fc7056e7c9e202c5fe Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 27 Aug 2014 13:14:20 +0200 Subject: [PATCH 375/822] license: Mention that vf_interlace is GPL, not LGPL (cherry picked from commit 9e8bbe7d4d1dcd5fec491dbfbb98ed2038a7bed5) Signed-off-by: Diego Biurrun --- LICENSE | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE b/LICENSE index 20d82c392e..05521a4be2 100644 --- a/LICENSE +++ b/LICENSE @@ -21,6 +21,7 @@ Specifically, the GPL parts of Libav are - vf_cropdetect.c - vf_delogo.c - vf_hqdn3d.c + - vf_interlace.c Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then the configure parameter --enable-version3 will activate this licensing option From 40c7613ecf2f3f7565309f9780183228605c3684 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 10 Sep 2014 18:38:15 +0200 Subject: [PATCH 376/822] doc: Fix syntax and logical errors in avconv stream combination example Bug-Id: 661 CC: libav-stable@libav.org (cherry picked from commit 775a0b04f0cf8102fe322b2ee03fe1a0633dea04) Signed-off-by: Diego Biurrun --- doc/avconv.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/avconv.texi b/doc/avconv.texi index 7ef415fc7d..cb0f33168c 100644 --- a/doc/avconv.texi +++ b/doc/avconv.texi @@ -1097,11 +1097,11 @@ only formats accepting a normal integer are suitable. You can put many streams of the same type in the output: @example -avconv -i test1.avi -i test2.avi -map 0.3 -map 0.2 -map 0.1 -map 0.0 -c copy test12.nut +avconv -i test1.avi -i test2.avi -map 1:1 -map 1:0 -map 0:1 -map 0:0 -c copy -y test12.nut @end example -The resulting output file @file{test12.avi} will contain first four streams from -the input file in reverse order. +The resulting output file @file{test12.nut} will contain the first four streams +from the input files in reverse order. @item To force CBR video output: From f2abf8df7a08c45483522c8f2011c29ab472c64d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 10 Sep 2014 13:01:07 -0700 Subject: [PATCH 377/822] Prepare for 10.5 release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index 1be519cd2e..9a62de225f 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.4 +10.5 From d0af7d5745f3e228293633faa9e57994f3308c31 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 10 Sep 2014 13:01:30 -0700 Subject: [PATCH 378/822] Update Changelog for v10.5 --- Changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Changelog b/Changelog index ed1292b9cc..7ab39646eb 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,20 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.5: +- proresenc: Remove unneeded parameters from encode_alpha_plane() +- proresenc: Report buffer overflow +- proresenc: Realloc if buffer is too small +- proresenc: Properly account for alpha plane +- setpts: Add missing inttypes.h #include for PRId64 +- mpegvideo: Use the current_picture pts +- mpegenc: limit the maximum muxrate +- avconv: fix the muxrate values for -target +- avconv: fix parsing the AVOptions for -target +- pulse: Add a wallclock option to be compatible with other other captures +- license: Mention that vf_interlace is GPL, not LGPL +- doc: Fix syntax and logical errors in avconv stream combination example + version 10.4: - mpegts: Do not try to write a PMT larger than SECTION_SIZE (CVE-2014-2263) - mpegts: Define the section length with a constant From d14696c99ccac12a052ce10e70859ffc0293ed6a Mon Sep 17 00:00:00 2001 From: Katerina Barone-Adesi Date: Tue, 16 Sep 2014 01:40:24 +0200 Subject: [PATCH 379/822] apetag: Fix APE tag size check The size variable is (correctly) unsigned, but is passed to several functions which take signed parameters, such as avio_read, sometimes after having numbers added to it. So ensure that size remains within the bounds that these functions can handle. (cherry picked from commit b45ab61b24a8f2aeafdd4451491b1b30b7875ee5) Signed-off-by: Diego Biurrun --- libavformat/apetag.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/apetag.c b/libavformat/apetag.c index d4be91c837..9616c2c85e 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -55,8 +55,10 @@ static int ape_tag_read_field(AVFormatContext *s) av_log(s, AV_LOG_WARNING, "Invalid APE tag key '%s'.\n", key); return -1; } - if (size >= UINT_MAX) - return -1; + if (size > INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) { + av_log(s, AV_LOG_ERROR, "APE tag size too large.\n"); + return AVERROR_INVALIDDATA; + } if (flags & APE_TAG_FLAG_IS_BINARY) { uint8_t filename[1024]; enum AVCodecID id; From f13f5a7d4b6c57a11c63ba5e4f972f0bff5f306a Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 16 Sep 2014 03:40:37 -0700 Subject: [PATCH 380/822] Add some bug references to the changelog --- Changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 7ab39646eb..670db5c000 100644 --- a/Changelog +++ b/Changelog @@ -11,9 +11,9 @@ version 10.5: - mpegenc: limit the maximum muxrate - avconv: fix the muxrate values for -target - avconv: fix parsing the AVOptions for -target -- pulse: Add a wallclock option to be compatible with other other captures +- pulse: Add a wallclock option to be compatible with other captures (libav/647) - license: Mention that vf_interlace is GPL, not LGPL -- doc: Fix syntax and logical errors in avconv stream combination example +- doc: Fix syntax and logical errors in avconv stream combination example (libav/661) version 10.4: - mpegts: Do not try to write a PMT larger than SECTION_SIZE (CVE-2014-2263) From 481118615c153160fc0d5ec383a7b5ded276e226 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 27 Aug 2014 13:13:51 +0200 Subject: [PATCH 381/822] ffmpeg_opt: reduce diff to libav in opt_target() by 16 lines Signed-off-by: Michael Niedermayer (cherry picked from commit 7a67ab5cba8ed5509be5d058fe9e5612ef39d3b0) Signed-off-by: Michael Niedermayer --- ffmpeg_opt.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index f1fff795d8..0e75dea24c 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2153,19 +2153,19 @@ static int opt_target(void *optctx, const char *opt, const char *arg) parse_option(o, "s", norm == PAL ? "352x288" : "352x240", options); parse_option(o, "r", frame_rates[norm], options); - av_dict_set(&o->g->codec_opts, "g", norm == PAL ? "15" : "18", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "g", norm == PAL ? "15" : "18"); - av_dict_set(&o->g->codec_opts, "b:v", "1150000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "maxrate", "1150000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "minrate", "1150000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "bufsize", "327680", AV_DICT_DONT_OVERWRITE); // 40*1024*8; + opt_default(NULL, "b:v", "1150000"); + opt_default(NULL, "maxrate", "1150000"); + opt_default(NULL, "minrate", "1150000"); + opt_default(NULL, "bufsize", "327680"); // 40*1024*8; - av_dict_set(&o->g->codec_opts, "b:a", "224000", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "b:a", "224000"); parse_option(o, "ar", "44100", options); parse_option(o, "ac", "2", options); - av_dict_set(&o->g->format_opts, "packetsize", "2324", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->format_opts, "muxrate", "1411200", AV_DICT_DONT_OVERWRITE); // 2352 * 75 * 8; + opt_default(NULL, "packetsize", "2324"); + opt_default(NULL, "muxrate", "1411200"); // 2352 * 75 * 8; /* We have to offset the PTS, so that it is consistent with the SCR. SCR starts at 36000, but the first two packs contain only padding @@ -2182,18 +2182,18 @@ static int opt_target(void *optctx, const char *opt, const char *arg) parse_option(o, "s", norm == PAL ? "480x576" : "480x480", options); parse_option(o, "r", frame_rates[norm], options); parse_option(o, "pix_fmt", "yuv420p", options); - av_dict_set(&o->g->codec_opts, "g", norm == PAL ? "15" : "18", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "g", norm == PAL ? "15" : "18"); - av_dict_set(&o->g->codec_opts, "b:v", "2040000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "maxrate", "2516000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "minrate", "0", AV_DICT_DONT_OVERWRITE); // 1145000; - av_dict_set(&o->g->codec_opts, "bufsize", "1835008", AV_DICT_DONT_OVERWRITE); // 224*1024*8; - av_dict_set(&o->g->codec_opts, "scan_offset", "1", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "b:v", "2040000"); + opt_default(NULL, "maxrate", "2516000"); + opt_default(NULL, "minrate", "0"); // 1145000; + opt_default(NULL, "bufsize", "1835008"); // 224*1024*8; + opt_default(NULL, "scan_offset", "1"); - av_dict_set(&o->g->codec_opts, "b:a", "224000", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "b:a", "224000"); parse_option(o, "ar", "44100", options); - av_dict_set(&o->g->format_opts, "packetsize", "2324", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "packetsize", "2324"); } else if (!strcmp(arg, "dvd")) { @@ -2204,17 +2204,17 @@ static int opt_target(void *optctx, const char *opt, const char *arg) parse_option(o, "s", norm == PAL ? "720x576" : "720x480", options); parse_option(o, "r", frame_rates[norm], options); parse_option(o, "pix_fmt", "yuv420p", options); - av_dict_set(&o->g->codec_opts, "g", norm == PAL ? "15" : "18", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "g", norm == PAL ? "15" : "18"); - av_dict_set(&o->g->codec_opts, "b:v", "6000000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "maxrate", "9000000", AV_DICT_DONT_OVERWRITE); - av_dict_set(&o->g->codec_opts, "minrate", "0", AV_DICT_DONT_OVERWRITE); // 1500000; - av_dict_set(&o->g->codec_opts, "bufsize", "1835008", AV_DICT_DONT_OVERWRITE); // 224*1024*8; + opt_default(NULL, "b:v", "6000000"); + opt_default(NULL, "maxrate", "9000000"); + opt_default(NULL, "minrate", "0"); // 1500000; + opt_default(NULL, "bufsize", "1835008"); // 224*1024*8; - av_dict_set(&o->g->format_opts, "packetsize", "2048", AV_DICT_DONT_OVERWRITE); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack. - av_dict_set(&o->g->format_opts, "muxrate", "10080000", AV_DICT_DONT_OVERWRITE); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8 + opt_default(NULL, "packetsize", "2048"); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack. + opt_default(NULL, "muxrate", "10080000"); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8 - av_dict_set(&o->g->codec_opts, "b:a", "448000", AV_DICT_DONT_OVERWRITE); + opt_default(NULL, "b:a", "448000"); parse_option(o, "ar", "48000", options); } else if (!strncmp(arg, "dv", 2)) { @@ -2234,8 +2234,8 @@ static int opt_target(void *optctx, const char *opt, const char *arg) return AVERROR(EINVAL); } - av_dict_copy(&o->g->codec_opts, codec_opts, 0); - av_dict_copy(&o->g->format_opts, format_opts, 0); + av_dict_copy(&o->g->codec_opts, codec_opts, AV_DICT_DONT_OVERWRITE); + av_dict_copy(&o->g->format_opts, format_opts, AV_DICT_DONT_OVERWRITE); return 0; } From 1f8e0f7e06aff959d3567be910db0def919ae538 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 18 Aug 2014 20:42:27 +0200 Subject: [PATCH 382/822] avcodec/proresenc_kostya: set initial max_slice_size based on frame_size_upper_bound If the initial max_slice_size is 0 then reallocation is disabled for the first slice. Reviewed-by: Christophe Gisquet Signed-off-by: Michael Niedermayer (cherry picked from commit 76a8cb9d7bcc12a8f1cedcb4c23bbb6391a4c56c) Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index ab56820911..1905f6067a 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -939,7 +939,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int sizes[4] = { 0 }; int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1); int frame_size, picture_size, slice_size; - int pkt_size, ret, max_slice_size = 0; + int pkt_size, ret; + int max_slice_size = (ctx->frame_size_upper_bound - 200) / ctx->pictures_per_frame / ctx->slices_per_picture; uint8_t frame_flags; *avctx->coded_frame = *pic; From 1a6218954a35a7a30e1d7910af30e0bf3f1c55dd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 18 Aug 2014 21:29:32 +0200 Subject: [PATCH 383/822] avcodec/proresenc_kostya: allocate 1 slice more to avoid triggering the reallocation warning when the used space is actually less than the allocated Reviewed-by: Christophe Gisquet Signed-off-by: Michael Niedermayer (cherry picked from commit f0e51be8d0273679d379a95de14727b982b9549f) Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 1905f6067a..e263bb9f31 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -940,7 +940,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1); int frame_size, picture_size, slice_size; int pkt_size, ret; - int max_slice_size = (ctx->frame_size_upper_bound - 200) / ctx->pictures_per_frame / ctx->slices_per_picture; + int max_slice_size = (ctx->frame_size_upper_bound - 200) / (ctx->pictures_per_frame * ctx->slices_per_picture + 1); uint8_t frame_flags; *avctx->coded_frame = *pic; @@ -1029,9 +1029,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, uint8_t *start = pkt->data; // Recompute new size according to max_slice_size // and deduce delta - int delta = 200 + ctx->pictures_per_frame * - ctx->slices_per_picture * max_slice_size - - pkt_size; + int delta = 200 + (ctx->pictures_per_frame * + ctx->slices_per_picture + 1) * + max_slice_size - pkt_size; delta = FFMAX(delta, 2 * max_slice_size); ctx->frame_size_upper_bound += delta; @@ -1248,16 +1248,16 @@ static av_cold int encode_init(AVCodecContext *avctx) ctx->bits_per_mb += ls * 4; } - ctx->frame_size_upper_bound = ctx->pictures_per_frame * - ctx->slices_per_picture * + ctx->frame_size_upper_bound = (ctx->pictures_per_frame * + ctx->slices_per_picture + 1) * (2 + 2 * ctx->num_planes + (mps * ctx->bits_per_mb) / 8) + 200; if (ctx->alpha_bits) { // The alpha plane is run-coded and might exceed the bit budget. - ctx->frame_size_upper_bound += ctx->pictures_per_frame * - ctx->slices_per_picture * + ctx->frame_size_upper_bound += (ctx->pictures_per_frame * + ctx->slices_per_picture + 1) * /* num pixels per slice */ (ctx->mbs_per_slice * 256 * /* bits per pixel */ (1 + ctx->alpha_bits + 1) + 7 >> 3); } From f93f739ecac035cea7cede78dabbdb3a35628c77 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 24 Aug 2014 23:33:40 +0200 Subject: [PATCH 384/822] avcodec/utils: add GBRP16 to avcodec_align_dimensions2() Fixes Ticket3869 Signed-off-by: Michael Niedermayer (cherry picked from commit 3fe9e7be4c70c8fccdcd56fd19276e668cfb7de8) Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7ffe6c6524..ff89324248 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -357,6 +357,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, case AV_PIX_FMT_GBRP12BE: case AV_PIX_FMT_GBRP14LE: case AV_PIX_FMT_GBRP14BE: + case AV_PIX_FMT_GBRP16LE: + case AV_PIX_FMT_GBRP16BE: w_align = 16; //FIXME assume 16 pixel per macroblock h_align = 16 * 2; // interlaced needs 2 macroblocks height break; From 8d10d6e1273817315878bcbb37e37de442585b27 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 30 Aug 2014 02:12:10 +0200 Subject: [PATCH 385/822] avcodec/snow: check coeffs for validity Fixes deadlock Fixes integer overflow Fixes Ticket 3892 Signed-off-by: Michael Niedermayer (cherry picked from commit 596636a474ab201badaae269f3a2cef4824b8c1f) Signed-off-by: Michael Niedermayer --- libavcodec/snow.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index 60b00623a0..9910f3f6c1 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -655,7 +655,10 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i if(v){ v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1); v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + ff_quant3bA[l&0xFF] + 3*ff_quant3bA[t&0xFF]]); - + if ((uint16_t)v != v) { + av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n"); + v = 1; + } xc->x=x; (xc++)->coeff= v; } @@ -665,6 +668,10 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i else run= INT_MAX; v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1); v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]); + if ((uint16_t)v != v) { + av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n"); + v = 1; + } xc->x=x; (xc++)->coeff= v; From f1685bd31a1921bb239e77ce852c7a0aa513017b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 30 Aug 2014 15:39:15 +0200 Subject: [PATCH 386/822] oggdec: fix invalid free on error The read_packet callback passes a pointer to a stack-allocated AVPacket. Attempting to free it with av_free() makes no sense. Signed-off-by: Michael Niedermayer (cherry picked from commit b173f5c15572cc82f68128599722e689df4ff137) Conflicts: libavformat/oggdec.c --- libavformat/oggdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index fd18e99869..cf5d50d45e 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -795,7 +795,6 @@ retry: 10); if(side_data == NULL) { av_free_packet(pkt); - av_free(pkt); return AVERROR(ENOMEM); } AV_WL32(side_data + 4, os->end_trimming); From 85b829bff9c31178b2d70e39279a397795ce25cf Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Mon, 1 Sep 2014 12:32:33 -0700 Subject: [PATCH 387/822] doc/filters.texi: fix filter name in examples Signed-off-by: Michael Niedermayer (cherry picked from commit 1b3a98f137900b6c3eb9a4c177d0b25684d6d144) Signed-off-by: Michael Niedermayer --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8bf29ec04f..b7a1b34d57 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -491,7 +491,7 @@ aeval=val(ch)/2:c=same @item Invert phase of the second channel: @example -eval=val(0)|-val(1) +aeval=val(0)|-val(1) @end example @end itemize @@ -8850,7 +8850,7 @@ Default value is "all", which will cycle through the list of all tests. For example the following: @example -testsrc=t=dc_luma +mptestsrc=t=dc_luma @end example will generate a "dc_luma" test pattern. From 0484d7ad7ef7f4ce51525a95cc5b74d7e6c213a0 Mon Sep 17 00:00:00 2001 From: Mika Raento Date: Mon, 1 Sep 2014 20:10:03 +0300 Subject: [PATCH 388/822] segment: don't access outside seg->frames array Fixes wrong number of segments output and undefined memory access. Signed-off-by: Michael Niedermayer (cherry picked from commit 58e0402e02ae5e466c33b9465c1465fdee68d342) Signed-off-by: Michael Niedermayer --- libavformat/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index ad313a316f..9b4b44f514 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -666,7 +666,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) end_pts = seg->segment_count < seg->nb_times ? seg->times[seg->segment_count] : INT64_MAX; } else if (seg->frames) { - start_frame = seg->segment_count <= seg->nb_frames ? + start_frame = seg->segment_count < seg->nb_frames ? seg->frames[seg->segment_count] : INT_MAX; } else { end_pts = seg->time * (seg->segment_count+1); From b3f30cb6d63d75ba132a45ed22d118a33701b3a0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 2 Sep 2014 05:22:26 +0200 Subject: [PATCH 389/822] avformat/swfdec: Use side data to communicate w/h changes to the decoder Fixes reading from freed data Fixes part of Ticket3539 Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 1c55d0ff3202a04ebc67a72d72391104e9bdb633) Signed-off-by: Michael Niedermayer (cherry picked from commit a9734e7d3017ffc9539eaac2a8acce3ad427f746) Signed-off-by: Michael Niedermayer --- libavformat/swfdec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index c95b18ec6c..babaaa182f 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -353,11 +353,15 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) avpriv_set_pts_info(vst, 64, 256, swf->frame_rate); st = vst; } - st->codec->width = width; - st->codec->height = height; if ((res = av_new_packet(pkt, out_len - colormapsize * colormapbpp)) < 0) goto bitmap_end; + if (!st->codec->width && !st->codec->height) { + st->codec->width = width; + st->codec->height = height; + } else { + ff_add_param_change(pkt, 0, 0, 0, width, height); + } pkt->pos = pos; pkt->stream_index = st->index; From b4d2888ce8d15818b7d839e3bc0ec8e9cca17615 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 2 Sep 2014 16:42:33 +0200 Subject: [PATCH 390/822] avformat/swfdec: Do not change the pixel format This is currently not supported Fixes part of Ticket 3539 Signed-off-by: Michael Niedermayer (cherry picked from commit c2430304dfb3cc0e3a59ce6d1b59ebdcc934a0c2) Signed-off-by: Michael Niedermayer --- libavformat/swfdec.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index babaaa182f..91db06d55c 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -289,6 +289,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) const int bmp_fmt = avio_r8(pb); const int width = avio_rl16(pb); const int height = avio_rl16(pb); + int pix_fmt; len -= 2+1+2+2; @@ -367,7 +368,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) switch (bmp_fmt) { case 3: - st->codec->pix_fmt = AV_PIX_FMT_PAL8; + pix_fmt = AV_PIX_FMT_PAL8; for (i = 0; i < colormapsize; i++) if (alpha_bmp) colormap[i] = buf[3]<<24 | AV_RB24(buf + 4*i); else colormap[i] = 0xffU <<24 | AV_RB24(buf + 3*i); @@ -379,14 +380,20 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) memcpy(pal, colormap, AVPALETTE_SIZE); break; case 4: - st->codec->pix_fmt = AV_PIX_FMT_RGB555; + pix_fmt = AV_PIX_FMT_RGB555; break; case 5: - st->codec->pix_fmt = alpha_bmp ? AV_PIX_FMT_ARGB : AV_PIX_FMT_0RGB; + pix_fmt = alpha_bmp ? AV_PIX_FMT_ARGB : AV_PIX_FMT_0RGB; break; default: av_assert0(0); } + if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) { + av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n"); + res = AVERROR_PATCHWELCOME; + goto bitmap_end; + } + st->codec->pix_fmt = pix_fmt; if (linesize * height > pkt->size) { res = AVERROR_INVALIDDATA; From 9e1ce9a8eee17f741e3cff5c8018c42eddf8c99b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 01:42:28 +0200 Subject: [PATCH 391/822] avcodec/h264: Allow partial escaping Fixes Ticket3923 Signed-off-by: Michael Niedermayer (cherry picked from commit 033a5334badd8af48f13c6fd1e6827f8e3f2c2f3) Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 5db5c76daa..82272841f4 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -634,7 +634,7 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, #define STARTCODE_TEST \ if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \ - if (src[i + 2] != 3) { \ + if (src[i + 2] != 3 && src[i + 2] != 0) { \ /* startcode, so we must be past the end */ \ length = i; \ } \ @@ -707,7 +707,7 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, if (src[si + 2] > 3) { dst[di++] = src[si++]; dst[di++] = src[si++]; - } else if (src[si] == 0 && src[si + 1] == 0) { + } else if (src[si] == 0 && src[si + 1] == 0 && src[si + 2] != 0) { if (src[si + 2] == 3) { // escape dst[di++] = 0; dst[di++] = 0; From 9406d3c910bfb8476c7bb9b942ef15785d0a309c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 12:52:24 +0200 Subject: [PATCH 392/822] avcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_change() Signed-off-by: Michael Niedermayer (cherry picked from commit 2762323c37511fbbc98b164c07620b9ebc59ec68) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 4dc41e83da..6668ffb2b2 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1398,7 +1398,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s) if ((s->width || s->height) && av_image_check_size(s->width, s->height, 0, s->avctx)) - return AVERROR_INVALIDDATA; + goto fail; if ((err = init_context_frame(s))) goto fail; From fd6230e8f0d2111249240bb0eeab084a9550bd8e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 13:00:47 +0200 Subject: [PATCH 393/822] avcodec/mpegvideo: check that the context is initialized in ff_mpv_common_frame_size_change() The function otherwise would initialize the context without setting context_initialized alternatively we could set context_initialized Fixes valgrind anomalies related to ticket 3928 Signed-off-by: Michael Niedermayer (cherry picked from commit 0d0f7f0ba43f64312ae4a05d97afecf1b7b1330c) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6668ffb2b2..88af957162 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1368,6 +1368,9 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s) { int i, err = 0; + if (!s->context_initialized) + return AVERROR(EINVAL); + if (s->slice_context_count > 1) { for (i = 0; i < s->slice_context_count; i++) { free_duplicate_context(s->thread_context[i]); From d19b55649c557911094369720df0e175b1594df2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 14:14:52 +0200 Subject: [PATCH 394/822] avcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change() Found-by: ubitux Signed-off-by: Michael Niedermayer (cherry picked from commit cfce6f7efd28130bf0dd409b2367ca0f8c9b2417) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 88af957162..e283b98793 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1400,7 +1400,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s) s->mb_height = (s->height + 15) / 16; if ((s->width || s->height) && - av_image_check_size(s->width, s->height, 0, s->avctx)) + (err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0) goto fail; if ((err = init_context_frame(s))) @@ -1417,7 +1417,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s) } for (i = 0; i < nb_slices; i++) { - if (init_duplicate_context(s->thread_context[i]) < 0) + if ((err = init_duplicate_context(s->thread_context[i])) < 0) goto fail; s->thread_context[i]->start_mb_y = (s->mb_height * (i) + nb_slices / 2) / nb_slices; From 56fb830c302b0cbae0d24be8993832cb548b8ee5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 16:39:39 +0200 Subject: [PATCH 395/822] avformat/m4vdec: Check for non startcode 00 00 00 sequences in probe Fixes miss detection of PCM as m4v Fixes Ticket 3928 Signed-off-by: Michael Niedermayer (cherry picked from commit 7c1835c52a4be2e4e996f83c91a8d5a147b01100) Signed-off-by: Michael Niedermayer --- libavformat/m4vdec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/m4vdec.c b/libavformat/m4vdec.c index c2fd4d7ab6..7a8f79fe7e 100644 --- a/libavformat/m4vdec.c +++ b/libavformat/m4vdec.c @@ -33,13 +33,15 @@ static int mpeg4video_probe(AVProbeData *probe_packet) for(i=0; ibuf_size; i++){ temp_buffer = (temp_buffer<<8) + probe_packet->buf[i]; - if ((temp_buffer & 0xffffff00) != 0x100) + if (temp_buffer & 0xfffffe00) + continue; + if (temp_buffer < 2) continue; if (temp_buffer == VOP_START_CODE) VOP++; else if (temp_buffer == VISUAL_OBJECT_START_CODE) VISO++; - else if (temp_buffer < 0x120) VO++; - else if (temp_buffer < 0x130) VOL++; + else if (temp_buffer >= 0x100 && temp_buffer < 0x120) VO++; + else if (temp_buffer >= 0x120 && temp_buffer < 0x130) VOL++; else if ( !(0x1AF < temp_buffer && temp_buffer < 0x1B7) && !(0x1B9 < temp_buffer && temp_buffer < 0x1C4)) res++; } From 252356cf06a4effbe7df5ed150cf0ade65e081fa Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Sep 2014 18:04:51 +0200 Subject: [PATCH 396/822] tools/crypto_bench: fix build when AV_READ_TIME is unavailable Found-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 4a99134f1a71994a0dc4542a0d6bee8e36146b60) Signed-off-by: Michael Niedermayer --- tools/crypto_bench.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/crypto_bench.c b/tools/crypto_bench.c index 1a699ce684..5300380ebe 100644 --- a/tools/crypto_bench.c +++ b/tools/crypto_bench.c @@ -33,6 +33,10 @@ #include "libavutil/intreadwrite.h" #include "libavutil/timer.h" +#ifndef AV_READ_TIME +#define AV_READ_TIME(x) 0 +#endif + #if HAVE_UNISTD_H #include /* for getopt */ #endif From 6c66ea5e73f25f9af8f48e2b44b003f0d2b15dcf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Sep 2014 23:36:53 +0200 Subject: [PATCH 397/822] avcodec/x86/vp9lpf: Always include x86util.asm Fixes executable stack Signed-off-by: Michael Niedermayer (cherry picked from commit 41d82b85ab0ee8bb2931c1f783e30c38c2fb5206) Signed-off-by: Michael Niedermayer --- libavcodec/x86/vp9lpf.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/x86/vp9lpf.asm b/libavcodec/x86/vp9lpf.asm index e41dd2cd47..419297c73c 100644 --- a/libavcodec/x86/vp9lpf.asm +++ b/libavcodec/x86/vp9lpf.asm @@ -20,10 +20,10 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** -%if ARCH_X86_64 - %include "libavutil/x86/x86util.asm" +%if ARCH_X86_64 + SECTION_RODATA cextern pb_3 From 99af97ea112d94e21946df219216b3c052e57702 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Tue, 16 Sep 2014 17:01:07 +0200 Subject: [PATCH 398/822] libavcodec/webp: treat out-of-bound palette index as translucent black See https://code.google.com/p/webp/issues/detail?id=206 for a description of the problem/fix. Signed-off-by: Michael Niedermayer This patch makes the decoder follow the recommendation of the spec. There is some disagreement (see "[FFmpeg-devel] [PATCH]: libavcodec/webp") about what would be best to be written in the spec, so in case the spec is changed again, this potentially would need to be amended or reverted (cherry picked from commit 4fd21d58a72c38ab63c3a4483b420db260fa7b8d) Signed-off-by: Michael Niedermayer --- libavcodec/webp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 89c8f13176..ab25d7a0d4 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1024,7 +1024,7 @@ static int apply_color_indexing_transform(WebPContext *s) ImageContext *img; ImageContext *pal; int i, x, y; - uint8_t *p, *pi; + uint8_t *p; img = &s->image[IMAGE_ROLE_ARGB]; pal = &s->image[IMAGE_ROLE_COLOR_INDEXING]; @@ -1062,11 +1062,11 @@ static int apply_color_indexing_transform(WebPContext *s) p = GET_PIXEL(img->frame, x, y); i = p[2]; if (i >= pal->frame->width) { - av_log(s->avctx, AV_LOG_ERROR, "invalid palette index %d\n", i); - return AVERROR_INVALIDDATA; + AV_WB32(p, 0xFF000000); + } else { + const uint8_t *pi = GET_PIXEL(pal->frame, i, 0); + AV_COPY32(p, pi); } - pi = GET_PIXEL(pal->frame, i, 0); - AV_COPY32(p, pi); } } From 16b5df17ea9d7b9b0b10b1effa776177ac69d88c Mon Sep 17 00:00:00 2001 From: James Almer Date: Wed, 5 Mar 2014 19:44:36 -0300 Subject: [PATCH 399/822] x86/dsputil: add emms to ff_scalarproduct_int16_mmxext() Also undo the changes to ra144enc.c from previous commits. Should fix ticket #3429 Signed-off-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit 9e0e1f9067430de1655a7b28536b5afed48bded5) Conflicts: libavcodec/ra144enc.c Signed-off-by: Michael Niedermayer --- libavcodec/ra144enc.c | 1 - libavcodec/x86/dsputil.asm | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index 0db6032615..3f4be674c9 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -34,7 +34,6 @@ #include "celp_filters.h" #include "ra144.h" - static av_cold int ra144_encode_close(AVCodecContext *avctx) { RA144Context *ractx = avctx->priv_data; diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm index 7162034c67..d802368e1a 100644 --- a/libavcodec/x86/dsputil.asm +++ b/libavcodec/x86/dsputil.asm @@ -61,6 +61,9 @@ cglobal scalarproduct_int16, 3,3,3, v1, v2, order %endif paddd m2, m0 movd eax, m2 +%if mmsize == 8 + emms +%endif RET ; int scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul) From dd9b24a48808b9cd31b93e517ff228f497b51b83 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Tue, 19 Aug 2014 12:26:47 +0000 Subject: [PATCH 400/822] wavpack: report if there is no bits left Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 11a39bdf534a4ead634b4a593c66ebf756910b9b) Signed-off-by: Michael Niedermayer --- libavcodec/wavpack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 6f60514a28..0428b05128 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -253,6 +253,10 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, return sign ? ~ret : ret; error: + ret = get_bits_left(gb); + if (ret <= 0) { + av_log(ctx->avctx, AV_LOG_ERROR, "Too few bits (%d) left\n", ret); + } *last = 1; return 0; } From da1a8191c524a122a6656e7dcd05f4c0e2a37088 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Tue, 19 Aug 2014 12:26:49 +0000 Subject: [PATCH 401/822] wavpackenc: proper buffer allocation The allocation didn't account for headers, that can be easily 79 bytes. As a result, buffers allocated for a few samples (e.g. 5 in the original bug) could be undersized. Fixed ticket #2881. Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 2ba58bec20b0039ccc40cfba59af6d56de16e8b1) Signed-off-by: Michael Niedermayer --- libavcodec/wavpackenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c index bf9f918cd9..80cc088154 100644 --- a/libavcodec/wavpackenc.c +++ b/libavcodec/wavpackenc.c @@ -2876,10 +2876,11 @@ static int wavpack_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return AVERROR(ENOMEM); } - if ((ret = ff_alloc_packet2(avctx, avpkt, s->block_samples * avctx->channels * 8)) < 0) + buf_size = s->block_samples * avctx->channels * 8 + + 200 /* for headers */; + if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size)) < 0) return ret; buf = avpkt->data; - buf_size = avpkt->size; for (s->ch_offset = 0; s->ch_offset < avctx->channels;) { set_samplerate(s); From 014dee89d00fdf474740fbb5cbcdf07cca8aaa9c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 22 Aug 2014 01:15:57 +0200 Subject: [PATCH 402/822] avcodec: fix aac/ac3 parser bitstream buffer size Buffers containing copies of the AAC and AC3 header bits were not padded before parsing, violating init_get_bits() buffer padding requirement, leading to potential buffer read overflows. This change adds FF_INPUT_BUFFER_PADDING_SIZE bytes to the bit buffer for parsing the header in each of aac_parser.c and ac3_parser.c. Based on patch by: Matt Wolenetz Signed-off-by: Michael Niedermayer (cherry picked from commit fccd85b9f30525f88692f53134eba41f1f2d90db) Signed-off-by: Michael Niedermayer --- libavcodec/aac_parser.c | 2 +- libavcodec/ac3_parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c index ab6ca4e268..cb93ba9482 100644 --- a/libavcodec/aac_parser.c +++ b/libavcodec/aac_parser.c @@ -34,7 +34,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, int size; union { uint64_t u64; - uint8_t u8[8]; + uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE]; } tmp; tmp.u64 = av_be2ne64(state); diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index dd6d77c9ab..131e180360 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -166,7 +166,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, int err; union { uint64_t u64; - uint8_t u8[8]; + uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE]; } tmp = { av_be2ne64(state) }; AC3HeaderInfo hdr, *phdr = &hdr; GetBitContext gbc; From 5df02760dd2f050b996f931fa7cdf8871bfa5d96 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 21 Sep 2014 01:18:16 +0200 Subject: [PATCH 403/822] update for 2.2.8 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 5bc1cc43d4..23a63f524e 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.7 +2.2.8 diff --git a/doc/Doxyfile b/doc/Doxyfile index 6e757718f6..b5c75fd85b 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.7 +PROJECT_NUMBER = 2.2.8 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From c7caed88a03567e8777a606f4bd42f093c6b302c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 25 Sep 2014 11:59:57 +0300 Subject: [PATCH 404/822] h264: Always invoke the get_format() callback Signed-off-by: Luca Barbato --- libavcodec/h264.c | 51 ++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index aee8db009c..7e62881740 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3083,45 +3083,54 @@ static int h264_set_parameter_from_sps(H264Context *h) static enum AVPixelFormat get_pixel_format(H264Context *h) { + enum AVPixelFormat pix_fmts[2]; + const enum AVPixelFormat *choices = pix_fmts; + + pix_fmts[1] = AV_PIX_FMT_NONE; + switch (h->sps.bit_depth_luma) { case 9: if (CHROMA444(h)) { if (h->avctx->colorspace == AVCOL_SPC_RGB) { - return AV_PIX_FMT_GBRP9; + pix_fmts[0] = AV_PIX_FMT_GBRP9; } else - return AV_PIX_FMT_YUV444P9; + pix_fmts[0] = AV_PIX_FMT_YUV444P9; } else if (CHROMA422(h)) - return AV_PIX_FMT_YUV422P9; + pix_fmts[0] = AV_PIX_FMT_YUV422P9; else - return AV_PIX_FMT_YUV420P9; + pix_fmts[0] = AV_PIX_FMT_YUV420P9; break; case 10: if (CHROMA444(h)) { if (h->avctx->colorspace == AVCOL_SPC_RGB) { - return AV_PIX_FMT_GBRP10; + pix_fmts[0] = AV_PIX_FMT_GBRP10; } else - return AV_PIX_FMT_YUV444P10; + pix_fmts[0] = AV_PIX_FMT_YUV444P10; } else if (CHROMA422(h)) - return AV_PIX_FMT_YUV422P10; + pix_fmts[0] = AV_PIX_FMT_YUV422P10; else - return AV_PIX_FMT_YUV420P10; + pix_fmts[0] = AV_PIX_FMT_YUV420P10; break; case 8: if (CHROMA444(h)) { - if (h->avctx->colorspace == AVCOL_SPC_RGB) { - return AV_PIX_FMT_GBRP; - } else - return h->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ444P - : AV_PIX_FMT_YUV444P; + if (h->avctx->colorspace == AVCOL_SPC_RGB) + pix_fmts[0] = AV_PIX_FMT_GBRP; + else if (h->avctx->color_range == AVCOL_RANGE_JPEG) + pix_fmts[0] = AV_PIX_FMT_YUVJ444P; + else + pix_fmts[0] = AV_PIX_FMT_YUV444P; } else if (CHROMA422(h)) { - return h->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ422P - : AV_PIX_FMT_YUV422P; + if (h->avctx->color_range == AVCOL_RANGE_JPEG) + pix_fmts[0] = AV_PIX_FMT_YUVJ422P; + else + pix_fmts[0] = AV_PIX_FMT_YUV422P; } else { - return h->avctx->get_format(h->avctx, h->avctx->codec->pix_fmts ? - h->avctx->codec->pix_fmts : - h->avctx->color_range == AVCOL_RANGE_JPEG ? - h264_hwaccel_pixfmt_list_jpeg_420 : - h264_hwaccel_pixfmt_list_420); + if (h->avctx->codec->pix_fmts) + choices = h->avctx->codec->pix_fmts; + else if (h->avctx->color_range == AVCOL_RANGE_JPEG) + choices = h264_hwaccel_pixfmt_list_jpeg_420; + else + choices = h264_hwaccel_pixfmt_list_420; } break; default: @@ -3129,6 +3138,8 @@ static enum AVPixelFormat get_pixel_format(H264Context *h) "Unsupported bit depth %d\n", h->sps.bit_depth_luma); return AVERROR_INVALIDDATA; } + + return h->avctx->get_format(h->avctx, choices); } /* export coded and cropped frame dimensions to AVCodecContext */ From 0989a120f1dec400c54fcb54670cb84bba36d99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 25 Sep 2014 11:59:58 +0300 Subject: [PATCH 405/822] mpeg12: Always invoke the get_format() callback Signed-off-by: Luca Barbato --- libavcodec/mpeg12dec.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index cb713fdf50..0a5654a485 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1177,10 +1177,21 @@ static const enum AVPixelFormat mpeg12_hwaccel_pixfmt_list_420[] = { AV_PIX_FMT_NONE }; +static const enum AVPixelFormat mpeg12_pixfmt_list_422[] = { + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_NONE +}; + +static const enum AVPixelFormat mpeg12_pixfmt_list_444[] = { + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_NONE +}; + static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; + const enum AVPixelFormat *pix_fmts; #if FF_API_XVMC FF_DISABLE_DEPRECATION_WARNINGS @@ -1190,11 +1201,13 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif /* FF_API_XVMC */ if (s->chroma_format < 2) - return avctx->get_format(avctx, mpeg12_hwaccel_pixfmt_list_420); + pix_fmts = mpeg12_hwaccel_pixfmt_list_420; else if (s->chroma_format == 2) - return AV_PIX_FMT_YUV422P; + pix_fmts = mpeg12_pixfmt_list_422; else - return AV_PIX_FMT_YUV444P; + pix_fmts = mpeg12_pixfmt_list_444; + + return avctx->get_format(avctx, pix_fmts); } /* Call this function when we know all parameters. From b0937dd61d767d2d476a10f329e9ba456c875a51 Mon Sep 17 00:00:00 2001 From: Gianluigi Tiesi Date: Fri, 19 Sep 2014 04:49:36 +0200 Subject: [PATCH 406/822] avcodec/libilbc: support for latest git of libilbc in the latest git commits of libilbc developers removed WebRtc_xxx typedefs This commit uses int types instead, it's safe to apply also for previous versions since WebRtc_Word16 was always a typedef of int16_t and WebRtc_UWord16 a typedef of uint16_t Reviewed-by: Timothy Gu Signed-off-by: Michael Niedermayer (cherry picked from commit 59af5383c18c8cf3fe2a4b5cc1ebf2f3300bdfe5) Signed-off-by: Michael Niedermayer --- libavcodec/libilbc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c index 898fe83b1c..9fdd3c83f5 100644 --- a/libavcodec/libilbc.c +++ b/libavcodec/libilbc.c @@ -96,8 +96,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - WebRtcIlbcfix_DecodeImpl((WebRtc_Word16*) frame->data[0], - (const WebRtc_UWord16*) buf, &s->decoder, 1); + WebRtcIlbcfix_DecodeImpl((int16_t *) frame->data[0], (const uint16_t *) buf, &s->decoder, 1); *got_frame_ptr = 1; @@ -170,7 +169,7 @@ static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((ret = ff_alloc_packet2(avctx, avpkt, 50)) < 0) return ret; - WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->data, (const WebRtc_Word16*) frame->data[0], &s->encoder); + WebRtcIlbcfix_EncodeImpl((uint16_t *) avpkt->data, (const int16_t *) frame->data[0], &s->encoder); avpkt->size = s->encoder.no_of_bytes; *got_packet_ptr = 1; From a1605af9b559ab15e3b13e0eed9d3d35cda46636 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Mon, 22 Sep 2014 14:48:57 -0700 Subject: [PATCH 407/822] avcodec/webp: fix default palette color 0xff000000 -> 0x00000000 Signed-off-by: Michael Niedermayer (cherry picked from commit e5b3112996c3da45aa03b39c5ade375d40d4407d) Signed-off-by: Michael Niedermayer --- libavcodec/webp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index ab25d7a0d4..f14213ffa8 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1062,7 +1062,7 @@ static int apply_color_indexing_transform(WebPContext *s) p = GET_PIXEL(img->frame, x, y); i = p[2]; if (i >= pal->frame->width) { - AV_WB32(p, 0xFF000000); + AV_WB32(p, 0x00000000); } else { const uint8_t *pi = GET_PIXEL(pal->frame, i, 0); AV_COPY32(p, pi); From fe12b3a7a68c175b02a16b55d10c0b79080a1a9f Mon Sep 17 00:00:00 2001 From: Benoit Fouet Date: Tue, 23 Sep 2014 10:07:10 +0200 Subject: [PATCH 408/822] avformat/riffenc: Filter out "BottomUp" in ff_put_bmp_header() Fixes Ticket1304 Commit message and extradata size bugfix by commiter Signed-off-by: Michael Niedermayer (cherry picked from commit 6843b9dc78bc966bb30121828ef4f6b6755cf877) Signed-off-by: Michael Niedermayer --- libavformat/riffenc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 2af2b7f9ab..6b42fcf2f6 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -208,11 +208,15 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf, int ignore_extradata) { + int keep_height = enc->extradata_size >= 9 && + !memcmp(enc->extradata + enc->extradata_size - 9, "BottomUp", 9); + int extradata_size = enc->extradata_size - 9*keep_height; + /* size */ - avio_wl32(pb, 40 + (ignore_extradata ? 0 : enc->extradata_size)); + avio_wl32(pb, 40 + (ignore_extradata ? 0 :extradata_size)); avio_wl32(pb, enc->width); //We always store RGB TopDown - avio_wl32(pb, enc->codec_tag ? enc->height : -enc->height); + avio_wl32(pb, enc->codec_tag || keep_height ? enc->height : -enc->height); /* planes */ avio_wl16(pb, 1); /* depth */ @@ -226,9 +230,9 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, avio_wl32(pb, 0); if (!ignore_extradata) { - avio_write(pb, enc->extradata, enc->extradata_size); + avio_write(pb, enc->extradata, extradata_size); - if (!for_asf && enc->extradata_size & 1) + if (!for_asf && extradata_size & 1) avio_w8(pb, 0); } } From fe0fd3de226ad94782ec9dd601770e753f9046d8 Mon Sep 17 00:00:00 2001 From: Philip DeCamp Date: Wed, 24 Sep 2014 16:15:18 -0400 Subject: [PATCH 409/822] libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address Signed-off-by: Philip DeCamp Signed-off-by: Michael Niedermayer (cherry picked from commit 857fc0a71f1b52fbba3281ba64b5a35195458622) Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 64901f2736..f644f9b34b 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -631,7 +631,7 @@ int av_opt_set_channel_layout(void *obj, const char *name, int64_t cl, int searc "The value set by option '%s' is not a channel layout.\n", o->name); return AVERROR(EINVAL); } - *(int *)(((int64_t *)target_obj) + o->offset) = cl; + *(int64_t *)(((uint8_t *)target_obj) + o->offset) = cl; return 0; } From be894938c44f8b038177c1178ba7e587a8123371 Mon Sep 17 00:00:00 2001 From: lvqcl Date: Sat, 27 Sep 2014 13:21:31 +0200 Subject: [PATCH 410/822] avutil/x86/cpu: fix cpuid sub-leaf selection Signed-off-by: Michael Niedermayer (cherry picked from commit e58fc44649d07d523fcd17aa10d9eb0d3a5ef3f4) Signed-off-by: Michael Niedermayer --- libavutil/x86/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 8ad478400c..2b62e92479 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -45,7 +45,7 @@ "cpuid \n\t" \ "xchg %%"REG_b", %%"REG_S \ : "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx) \ - : "0" (index)) + : "0" (index), "2"(0)) #define xgetbv(index, eax, edx) \ __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index)) From f1dd34300709140637a9f9d681d3f1e0d62979b9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 27 Sep 2014 20:34:44 +0200 Subject: [PATCH 411/822] avcodec/ac3enc_template: fix out of array read Found-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit d85ebea3f3b68ebccfe308fa839fc30fa634e4de) Signed-off-by: Michael Niedermayer --- libavcodec/ac3enc_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c index 4689f7020b..fcdec0e337 100644 --- a/libavcodec/ac3enc_template.c +++ b/libavcodec/ac3enc_template.c @@ -256,7 +256,7 @@ static void apply_channel_coupling(AC3EncodeContext *s) energy_cpl = energy[blk][CPL_CH][bnd]; energy_ch = energy[blk][ch][bnd]; blk1 = blk+1; - while (!s->blocks[blk1].new_cpl_coords[ch] && blk1 < s->num_blocks) { + while (blk1 < s->num_blocks && !s->blocks[blk1].new_cpl_coords[ch]) { if (s->blocks[blk1].cpl_in_use) { energy_cpl += energy[blk1][CPL_CH][bnd]; energy_ch += energy[blk1][ch][bnd]; From 9726c1a5f89efc7dd839543b83965431c146c3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 21 Sep 2014 09:58:10 +0100 Subject: [PATCH 412/822] configure: add noexecstack to linker options if supported. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Reimar Döffinger (cherry picked from commit b7082d953fda93f7841ffffe7d15a6c3cd15bdee) Signed-off-by: Michael Niedermayer --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index f9dce4ed92..e6122e7105 100755 --- a/configure +++ b/configure @@ -4287,6 +4287,7 @@ EOF fi check_ldflags -Wl,--as-needed +check_ldflags -Wl,-z,noexecstack if check_func dlopen; then ldl= From 53330b30fd2ca282e2742e890dd58a7a86598bb5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 2 Oct 2014 23:17:21 +0200 Subject: [PATCH 413/822] avcodec/jpeglsdec: Check run value more completely in ls_decode_line() previously it could have been by 1 too large Fixes out of array access Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8c1e3.jls Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8nde0.jls Fixes: asan_heap-oob_12240fa_1_asan_heap-oob_12240fa_448_t16e3.jls Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 06e7d58410a17dc72c30ee7f3145fcacc425f4f2) Signed-off-by: Michael Niedermayer --- libavcodec/jpeglsdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 190b9b6d26..5740aaafe5 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -217,6 +217,11 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, x += stride; } + if (x >= w) { + av_log(NULL, AV_LOG_ERROR, "run overflow\n"); + return; + } + /* decode run termination value */ Rb = R(last, x); RItype = (FFABS(Ra - Rb) <= state->near) ? 1 : 0; From 6287107eae40750f47ec3888c52fd94a9c697b38 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 01:50:27 +0200 Subject: [PATCH 414/822] avcodec/mjpegdec: check bits per pixel for changes similar to dimensions Fixes out of array accesses Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 5c378d6a6df8243f06c87962b873bd563e58cd39) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index b498d0fad3..7feeade662 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -239,7 +239,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) int ff_mjpeg_decode_sof(MJpegDecodeContext *s) { - int len, nb_components, i, width, height, pix_fmt_id, ret; + int len, nb_components, i, width, height, bits, pix_fmt_id, ret; int h_count[MAX_COMPONENTS]; int v_count[MAX_COMPONENTS]; @@ -249,11 +249,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); s->avctx->bits_per_raw_sample = - s->bits = get_bits(&s->gb, 8); + bits = get_bits(&s->gb, 8); if (s->pegasus_rct) - s->bits = 9; - if (s->bits == 9 && !s->pegasus_rct) + bits = 9; + if (bits == 9 && !s->pegasus_rct) s->rct = 1; // FIXME ugly if(s->lossless && s->avctx->lowres){ @@ -283,7 +283,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) return AVERROR_INVALIDDATA; } } - if (s->ls && !(s->bits <= 8 || nb_components == 1)) { + if (s->ls && !(bits <= 8 || nb_components == 1)) { avpriv_report_missing_feature(s->avctx, "JPEG-LS that is not <= 8 " "bits/component or 16-bit gray"); @@ -329,11 +329,13 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) /* if different size, realloc/alloc picture */ if ( width != s->width || height != s->height + || bits != s->bits || memcmp(s->h_count, h_count, sizeof(h_count)) || memcmp(s->v_count, v_count, sizeof(v_count))) { s->width = width; s->height = height; + s->bits = bits; memcpy(s->h_count, h_count, sizeof(h_count)); memcpy(s->v_count, v_count, sizeof(v_count)); s->interlaced = 0; From e5ccd894d1c1c07c39876b650b2993de16547fb0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 04:30:58 +0200 Subject: [PATCH 415/822] 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 --- libavcodec/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ff89324248..8b6f942fc4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -388,6 +388,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) || From 8acfae6901111a9ba93f51fff727fb84bf93fc3c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 12:32:21 +0200 Subject: [PATCH 416/822] 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) Conflicts: libavcodec/h263dec.c Signed-off-by: Michael Niedermayer --- libavcodec/h263dec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 6324e9be87..3e8bc84f37 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -319,6 +319,14 @@ static int decode_slice(MpegEncContext *s) } } + 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) == 0xCDCDCDCDFC7F0000) { + + 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; From f2c6e2c3b4ee0b0b8e202ef2d8a6f3780d20595f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 14:45:04 +0200 Subject: [PATCH 417/822] 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 --- libavcodec/mmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index ab59b58781..baedccd7f1 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; From f8bd98ae4d691fa7405856d83ca3d304429cc6f0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 16:08:32 +0200 Subject: [PATCH 418/822] 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 --- libavcodec/tiff.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index cbc526acc5..32472ee09b 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -604,13 +604,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 { @@ -628,6 +628,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) { From 64be1a45eb2604deca259319780ce02bd921859b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 17:35:58 +0200 Subject: [PATCH 419/822] 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 --- libavcodec/pngdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 516dd41f0c..d3b1df21a8 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -633,7 +633,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) { From d1e71ecbb01717a636ebcaf927109f75b7e895ec Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 17:54:21 +0200 Subject: [PATCH 420/822] avcodec/pngdec: Calculate MPNG bytewidth more defensively Signed-off-by: Michael Niedermayer (cherry picked from commit e830902934a29df05c7af65aef2a480b15f572c4) Conflicts: libavcodec/pngdec.c --- libavcodec/pngdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index d3b1df21a8..d4f633ac70 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -841,10 +841,11 @@ static int decode_frame(AVCodecContext *avctx, 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; From 42bdcebf3360fca957e8224ff0a6573b05dbc249 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 19:33:01 +0200 Subject: [PATCH 421/822] 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 --- libavcodec/cinepak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 082d0b232a..d0d07bc9ef 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; From 43881c773277c90ccb0dbfd2d5c3afd8f8603597 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 20:15:52 +0200 Subject: [PATCH 422/822] 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 --- libavcodec/gifdec.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 78c8900628..6d9b926b05 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; } From d8fda618d01dcafb82b695648e9ae6082f8d69ec Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 21:08:52 +0200 Subject: [PATCH 423/822] 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 --- libavcodec/qpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 94cb5bd0b6..d61bceafd7 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); From b0964918d882dd3ae589f76df01551ca0234d910 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 22:50:45 +0200 Subject: [PATCH 424/822] 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 --- libavcodec/smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 31e6c885bf..791612ebd4 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; \ From 653329dfcb43f8190355be7b8cfdca45eb8c599c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Oct 2014 03:12:34 +0200 Subject: [PATCH 425/822] 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 --- libavcodec/vorbisdec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index dfffc6f046..1221326561 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) { From 23fdcd3b0a7578f7d803d9f163ad7ca091b141ea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Oct 2014 04:29:40 +0200 Subject: [PATCH 426/822] 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 --- libavformat/mpegts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 286b30b4f2..5e9dbbddcd 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1882,7 +1882,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", From 26da47a09be8a329430b1125b44f7c0c2f2a0868 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Oct 2014 14:51:46 +0200 Subject: [PATCH 427/822] 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 --- libavcodec/h264.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 82272841f4..9980f1ac8a 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -601,18 +601,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; From a28c276b8dccb36acd1f3d5a956a581862254c1f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Oct 2014 01:08:20 +0200 Subject: [PATCH 428/822] 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 --- libswresample/swresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 54e06e1d00..6818f2b90e 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -761,6 +761,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; } From f253fa95529a52760f717e74b4ea0c81a7bbda04 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 4 Mar 2014 05:47:38 -0300 Subject: [PATCH 429/822] x86/synth_filter: add missing HAVE_YASM guard Should fix compilation failures with --disable-yasm on some compilers Signed-off-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit 206167a295a5c28cec3c38f7308835b0b7e0618f) Conflicts: libavcodec/x86/dcadsp_init.c --- libavcodec/x86/dcadsp_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c index 9ededac825..c661cabe18 100644 --- a/libavcodec/x86/dcadsp_init.c +++ b/libavcodec/x86/dcadsp_init.c @@ -60,6 +60,7 @@ void ff_synth_filter_inner_sse2(float *synth_buf_ptr, float synth_buf2[32], const float window[512], float out[32], intptr_t offset, float scale); +#if HAVE_YASM static void synth_filter_sse2(FFTContext *imdct, float *synth_buf_ptr, int *synth_buf_offset, float synth_buf2[32], const float window[512], @@ -74,12 +75,15 @@ static void synth_filter_sse2(FFTContext *imdct, *synth_buf_offset = (*synth_buf_offset - 32) & 511; } +#endif av_cold void ff_synth_filter_init_x86(SynthFilterContext *s) { +#if HAVE_YASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE2(cpu_flags)) { s->synth_filter_float = synth_filter_sse2; } +#endif } From b05d3550407418aea53f2672463a8ebc8f75654e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Oct 2014 03:47:59 +0200 Subject: [PATCH 430/822] Update for 2.2.9 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 23a63f524e..a6333e4006 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.8 +2.2.9 diff --git a/doc/Doxyfile b/doc/Doxyfile index b5c75fd85b..afafc8d6de 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.8 +PROJECT_NUMBER = 2.2.9 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 787a6156a2d887bb1d65c1233a94a61741e7af7c Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 13 Oct 2014 15:42:28 +0100 Subject: [PATCH 431/822] imc: fix order of operations in coefficients read Reported-by: Ruoyu --- libavcodec/imc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/imc.c b/libavcodec/imc.c index c1fbd76fec..359a36ba0c 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -873,14 +873,14 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch) flag = get_bits1(&q->gb); if (stream_format_code & 0x1) - imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf, - chctx->flcoeffs1, chctx->flcoeffs2); - else if (stream_format_code & 0x1) imc_read_level_coeffs_raw(q, stream_format_code, chctx->levlCoeffBuf); else imc_read_level_coeffs(q, stream_format_code, chctx->levlCoeffBuf); - if (stream_format_code & 0x4) + if (stream_format_code & 0x1) + imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf, + chctx->flcoeffs1, chctx->flcoeffs2); + else if (stream_format_code & 0x4) imc_decode_level_coefficients(q, chctx->levlCoeffBuf, chctx->flcoeffs1, chctx->flcoeffs2); else From 72ed4166a64714952777fb028b546a52e5b4e2c2 Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" Date: Mon, 13 Oct 2014 17:46:00 -0700 Subject: [PATCH 432/822] resample: Avoid off-by-1 errors in PTS calcs. The rounding used in the PTS calculations in filter_frame() does not actually match the number of samples output by the resampler. This leads to off-by-1 errors in the timestamps indicating gaps and underruns, even when the input timestamps are all contiguous. Bug-Id: 753 Signed-off-by: Anton Khirnov (cherry picked from commit 6cbbf0592f4f3940aac7f687850d1b726a2ea836) Signed-off-by: Anton Khirnov (cherry picked from commit ca8c62d187fdca13979379fb2ab172ed662aa2f8) Signed-off-by: Anton Khirnov --- libavfilter/af_resample.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index a89ab35e5c..83c27b5a4b 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -42,6 +42,7 @@ typedef struct ResampleContext { AVDictionary *options; int64_t next_pts; + int64_t next_in_pts; /* set by filter_frame() to signal an output frame to request_frame() */ int got_output; @@ -154,6 +155,7 @@ static int config_output(AVFilterLink *outlink) outlink->time_base = (AVRational){ 1, outlink->sample_rate }; s->next_pts = AV_NOPTS_VALUE; + s->next_in_pts = AV_NOPTS_VALUE; av_get_channel_layout_string(buf1, sizeof(buf1), -1, inlink ->channel_layout); @@ -260,7 +262,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } out->sample_rate = outlink->sample_rate; - if (in->pts != AV_NOPTS_VALUE) { + /* Only convert in->pts if there is a discontinuous jump. + This ensures that out->pts tracks the number of samples actually + output by the resampler in the absence of such a jump. + Otherwise, the rounding in av_rescale_q() and av_rescale() + causes off-by-1 errors. */ + if (in->pts != AV_NOPTS_VALUE && in->pts != s->next_in_pts) { out->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base) - av_rescale(delay, outlink->sample_rate, @@ -269,6 +276,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) out->pts = s->next_pts; s->next_pts = out->pts + out->nb_samples; + s->next_in_pts = in->pts + in->nb_samples; ret = ff_filter_frame(outlink, out); s->got_output = 1; From aa40f11b815a9a26aaa46198342749866fa18b27 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Thu, 9 Oct 2014 23:27:38 +0200 Subject: [PATCH 433/822] 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 --- libavcodec/utvideoenc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 0db85a871f..1163cadcb7 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -387,7 +387,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; @@ -397,6 +397,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; @@ -406,7 +407,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); @@ -415,7 +416,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); } @@ -423,7 +424,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); } @@ -487,7 +488,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, @@ -569,7 +570,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) { @@ -581,7 +582,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); @@ -592,7 +593,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) { From 13b7962aae30e7eb3b6bababab5cc40fe95a4ccc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 12 Oct 2014 20:26:27 +0200 Subject: [PATCH 434/822] postproc/postprocess: fix quant store for fq mode Signed-off-by: Michael Niedermayer (cherry picked from commit 941aaa39e8cd78ba4d16dfcec767290aec9a0136) Conflicts: tests/ref/fate/filter-pp3 --- 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 da586ffd31..54163c8d36 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 ccf2eebc62..1af87610c8 100644 --- a/tests/ref/fate/filter-pp3 +++ b/tests/ref/fate/filter-pp3 @@ -1 +1 @@ -pp3 39af1a30d0ea0e906df264773adfcaa6 +pp3 c8277ef31ab01bad51356841c9634522 From 17f0581e0dd587c1f7709eb5a6d52311923ed9ca Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 13 Oct 2014 16:02:42 +0200 Subject: [PATCH 435/822] postproc: fix qp count Found-by: ubitux Signed-off-by: Michael Niedermayer (cherry picked from commit 0b7e5d0d75e7d8762dd04d35f8c0821736164372) Signed-off-by: Michael Niedermayer --- libpostproc/postprocess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 54163c8d36..37206c5a48 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; } From 6505eb45bcf450473e606d0d233d7480d5071da6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 28 Oct 2014 01:23:40 +0100 Subject: [PATCH 436/822] 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 --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 06d8b79b12..c4e9751c03 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -610,10 +610,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; } From 81e1b5f5fe5b1200bd6baf48769999f6631af590 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 28 Oct 2014 01:23:40 +0100 Subject: [PATCH 437/822] 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 --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index c4e9751c03..5579dfb2a4 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1002,8 +1002,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") From 45361d8aa30093ba37abfea061327747710f9c9d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 28 Oct 2014 02:14:41 +0100 Subject: [PATCH 438/822] 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 --- libavcodec/dirac_arith.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h index 089c71a698..a1fa96b5bc 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 >= 0x40000000) { + 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]; From 557e8bd58968606a280c228e3d9b267fe1875e8c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 28 Oct 2014 15:26:42 +0100 Subject: [PATCH 439/822] 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) Signed-off-by: Michael Niedermayer --- libavcodec/dxa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 0f64b5e619..c8e3f71399 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -329,6 +329,11 @@ static av_cold int decode_init(AVCodecContext *avctx) { DxaDecContext * const c = avctx->priv_data; + if (avctx->width%4 || avctx->height%4) { + avpriv_request_sample(avctx, "dimensions are not a multiple of 4"); + return AVERROR_INVALIDDATA; + } + c->prev = av_frame_alloc(); if (!c->prev) return AVERROR(ENOMEM); From 6352153811161f859433299a811d34cdb51afbd7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 29 Oct 2014 00:57:07 +0100 Subject: [PATCH 440/822] 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) Signed-off-by: Michael Niedermayer --- libavcodec/dnxhddec.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 0f9fd16b5b..f00d866e16 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -36,6 +36,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 @@ -133,7 +134,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->is_444 = 0; if (buf[0x4] == 0x2) { - ctx->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; + ctx->pix_fmt = AV_PIX_FMT_YUV444P10; ctx->avctx->bits_per_raw_sample = 10; if (ctx->bit_depth != 10) { ff_dsputil_init(&ctx->dsp, ctx->avctx); @@ -142,7 +143,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } ctx->is_444 = 1; } else 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); @@ -150,7 +151,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, 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); @@ -432,7 +433,13 @@ 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; + } + avctx->pix_fmt = ctx->pix_fmt; ret = ff_set_dimensions(avctx, ctx->width, ctx->height); if (ret < 0) return ret; From 16a4aef34574549316ba1a96a26edd1c9a4fb1e3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 29 Oct 2014 14:15:29 +0100 Subject: [PATCH 441/822] 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 --- libavcodec/utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8b6f942fc4..8d24f0bed9 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -281,6 +281,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: @@ -407,8 +413,6 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } break; default: - w_align = 1; - h_align = 1; break; } From f6499563c3069ba4665906ed19fe80454ed00e1c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 30 Oct 2014 01:19:17 +0100 Subject: [PATCH 442/822] avcodec/g2meet: check tile dimensions to avoid integer overflow Fixes out of array access Fixes: asan_heap-oob_12a55d3_30_029.wmv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 32e666c354e4a3160d8cf1d303cb51990b095c87) Signed-off-by: Michael Niedermayer --- libavcodec/g2meet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index aaf1abb6dc..70419d8a2d 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -724,8 +724,10 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, } c->tile_width = bytestream2_get_be32(&bc); c->tile_height = bytestream2_get_be32(&bc); - if (!c->tile_width || !c->tile_height || - ((c->tile_width | c->tile_height) & 0xF)) { + if (c->tile_width <= 0 || c->tile_height <= 0 || + ((c->tile_width | c->tile_height) & 0xF) || + c->tile_width * 4LL * c->tile_height >= INT_MAX + ) { av_log(avctx, AV_LOG_ERROR, "Invalid tile dimensions %dx%d\n", c->tile_width, c->tile_height); From f00ec3307b5f61a5efbfa2a1d71817bb53fa397e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 30 Oct 2014 16:53:09 +0100 Subject: [PATCH 443/822] avcodec/cook: check that the subpacket sizes fit in block_align Fixes out of array read Fixes: asan_heap-oob_fb5c50_19_018.rmvb Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 10e32618acce9c3fc64c061eb7907e8a8d2749ae) Signed-off-by: Michael Niedermayer --- libavcodec/cook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 402093c425..48b79dfe27 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1214,8 +1214,8 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) q->num_subpackets++; s++; - if (s > MAX_SUBPACKETS) { - avpriv_request_sample(avctx, "subpackets > %d", MAX_SUBPACKETS); + if (s > FFMIN(MAX_SUBPACKETS, avctx->block_align)) { + avpriv_request_sample(avctx, "subpackets > %d", FFMIN(MAX_SUBPACKETS, avctx->block_align)); return AVERROR_PATCHWELCOME; } } From 9b8b35910ffb312c4a9efcead6314ab003bacd83 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 30 Oct 2014 18:16:25 +0100 Subject: [PATCH 444/822] 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) Signed-off-by: Michael Niedermayer --- libavcodec/svq1dec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index eb643446d1..864177419a 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -499,7 +499,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp, 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; @@ -511,6 +511,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) @@ -553,12 +554,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:\n%s\n", (char *)msg); + "embedded message:\n%s\n", ((char *)msg) + 1); } skip_bits(bitbuf, 2); From e812a089f549797f60dcc0e3846089538d7e8cf7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Oct 2014 00:13:26 +0200 Subject: [PATCH 445/822] 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 --- libavcodec/svq3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index d3c5672d42..3fb5173ae2 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1168,7 +1168,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(Picture, tf)); ret = av_frame_ref(&h->cur_pic.f, &s->cur_pic->f); if (ret < 0) return ret; From 41ee9a44955b65c3cfd188ebabe757da74bf0fc3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Nov 2014 16:00:25 +0100 Subject: [PATCH 446/822] update for 2.2.10 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index a6333e4006..0d3ad67afa 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.9 +2.2.10 diff --git a/doc/Doxyfile b/doc/Doxyfile index afafc8d6de..751aa5963f 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.9 +PROJECT_NUMBER = 2.2.10 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From c9659dfd294211e3b95d6a5115466fde4acdd51a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 19:18:21 +0200 Subject: [PATCH 447/822] avformat/mpeg: increase score for short mpeg-ps by 1 Fixes Ticket 3855 Signed-off-by: Michael Niedermayer (cherry picked from commit 5109ce2017c15202275b33bce58ec9d88044eeb5) Conflicts: libavformat/mpeg.c --- libavformat/mpeg.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 1777283939..a9016b9a7b 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -91,16 +91,20 @@ static int mpegps_probe(AVProbeData *p) if(vid+audio > invalid+1) /* invalid VDR files nd short PES streams */ score = AVPROBE_SCORE_EXTENSION / 2; - if(sys>invalid && sys*9 <= pspack*10) - return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_EXTENSION + 2 : AVPROBE_SCORE_EXTENSION / 2; // 1 more than .mpg - if(pspack > invalid && (priv1+vid+audio)*10 >= pspack*9) - return pspack > 2 ? AVPROBE_SCORE_EXTENSION + 2 : AVPROBE_SCORE_EXTENSION / 2; // 1 more than .mpg - if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048 && vid + audio > invalid) /* PES stream */ - return (audio > 12 || vid > 3 + 2*invalid) ? AVPROBE_SCORE_EXTENSION + 2 : AVPROBE_SCORE_EXTENSION / 2; + if (sys > invalid && sys * 9 <= pspack * 10) + return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_EXTENSION + 2 + : AVPROBE_SCORE_EXTENSION / 2 + 1; // 1 more than .mpg + if (pspack > invalid && (priv1 + vid + audio) * 10 >= pspack * 9) + return pspack > 2 ? AVPROBE_SCORE_EXTENSION + 2 + : AVPROBE_SCORE_EXTENSION / 2; // 1 more than .mpg + if ((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && + !pspack && p->buf_size > 2048 && vid + audio > invalid) /* PES stream */ + return (audio > 12 || vid > 3 + 2 * invalid) ? AVPROBE_SCORE_EXTENSION + 2 + : AVPROBE_SCORE_EXTENSION / 2; - //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 - //mp3_misidentified_2.mp3 has sys:0 priv1:0 pspack:0 vid:0 audio:6 - //Have\ Yourself\ a\ Merry\ Little\ Christmas.mp3 0 0 0 5 0 1 len:21618 + // 02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 + // mp3_misidentified_2.mp3 has sys:0 priv1:0 pspack:0 vid:0 audio:6 + // Have\ Yourself\ a\ Merry\ Little\ Christmas.mp3 0 0 0 5 0 1 len:21618 return score; } From 114e4b970e0a0fa4a5ac4873e49eac227a4665ee Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Sep 2014 21:44:19 +0200 Subject: [PATCH 448/822] avformat/mp3dec: Improve seeking frame sync code Fixes Ticket3884 Signed-off-by: Michael Niedermayer (cherry picked from commit 1b5ccae0f2045ac86bc9e1257cec1b3fba81315f) --- libavformat/mp3dec.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index ba77bce238..432d70ee5a 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -295,6 +295,8 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int64_t ret = av_index_search_timestamp(st, timestamp, flags); int i, j; int dir = (flags&AVSEEK_FLAG_BACKWARD) ? -1 : 1; + int64_t best_pos; + int best_score; if (mp3->is_cbr && st->duration > 0 && mp3->header_filesize > s->data_offset) { int64_t filesize = avio_size(s->pb); @@ -318,28 +320,37 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, return -1; } - if (dir < 0) - avio_seek(s->pb, FFMAX(ie->pos - 4096, 0), SEEK_SET); + avio_seek(s->pb, FFMAX(ie->pos - 4096, 0), SEEK_SET); ret = avio_seek(s->pb, ie->pos, SEEK_SET); if (ret < 0) return ret; #define MIN_VALID 3 + best_pos = ie->pos; + best_score = 999; for(i=0; i<4096; i++) { - int64_t pos = ie->pos + i*dir; + int64_t pos = ie->pos + (dir > 0 ? i - 1024 : -i); + int64_t candidate = -1; + int score = 999; for(j=0; jpos - pos)*dir <= 0 && abs(MIN_VALID/2-j) < score) { + candidate = pos; + score = abs(MIN_VALID/2-j); + } pos += ret; } - if(j==MIN_VALID) - break; + if (best_score > score && j == MIN_VALID) { + best_pos = candidate; + best_score = score; + if(score == 0) + break; + } } - if(j!=MIN_VALID) - i=0; - ret = avio_seek(s->pb, ie->pos + i*dir, SEEK_SET); + ret = avio_seek(s->pb, best_pos, SEEK_SET); if (ret < 0) return ret; ff_update_cur_dts(s, st, ie->timestamp); From 64624c56784dbcec72d02c6e5c474d73cfa92a04 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 8 Oct 2014 20:23:40 +0200 Subject: [PATCH 449/822] avformat/matroskadec: do not trust the default duration to be the real 1/timebase if its less than 5fps Fixes Ticket3980 Signed-off-by: Michael Niedermayer (cherry picked from commit be695ee389724d713e1b8a61ef899fe1795193ce) --- libavformat/matroskadec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4726e94d8e..37e0d1940b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1903,7 +1903,8 @@ static int matroska_read_header(AVFormatContext *s) av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, 1000000000, track->default_duration, 30000); #if FF_API_R_FRAME_RATE - if (st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L) + if ( st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L + && st->avg_frame_rate.num > st->avg_frame_rate.den * 5L) st->r_frame_rate = st->avg_frame_rate; #endif } From 667fe8c75b0b1f666f3215c797e00acb1024b3e5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Oct 2014 04:22:42 +0100 Subject: [PATCH 450/822] Move get_avc_nalsize() and find_start_code() to h264.h This allows sharing them with the h264 parser Signed-off-by: Michael Niedermayer (cherry picked from commit 4898440f6bd19152373969159fff057b532c6374) Conflicts: libavcodec/h264.c libavcodec/h264.h --- libavcodec/h264.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 188e749440..ed0050a4df 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -1028,6 +1028,42 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h) 0x0001000100010001ULL)); } +static inline int find_start_code(const uint8_t *buf, int buf_size, + int buf_index, int next_avc) +{ + // start code prefix search + for (; buf_index + 3 < next_avc; buf_index++) + // This should always succeed in the first iteration. + if (buf[buf_index] == 0 && + buf[buf_index + 1] == 0 && + buf[buf_index + 2] == 1) + break; + + buf_index += 3; + + if (buf_index >= buf_size) + return buf_size; + + return buf_index; +} + +static inline int get_avc_nalsize(H264Context *h, const uint8_t *buf, + int buf_size, int *buf_index) +{ + int i, nalsize = 0; + + if (*buf_index >= buf_size - h->nal_length_size) + return -1; + + for (i = 0; i < h->nal_length_size; i++) + nalsize = ((unsigned)nalsize << 8) | buf[(*buf_index)++]; + if (nalsize <= 0 || nalsize > buf_size - *buf_index) { + av_log(h->avctx, AV_LOG_ERROR, + "AVC: nal size %d\n", nalsize); + return -1; + } + return nalsize; +} void ff_h264_draw_horiz_band(H264Context *h, int y, int height); int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc); int ff_pred_weight_table(H264Context *h); From 76587eea6486bd7aaa65bcf8d923c88df9650843 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Oct 2014 04:24:20 +0100 Subject: [PATCH 451/822] avcodec/h264: simplify find_start_code() this also uses avpriv_find_start_code(), though no speed change is expected as the area searched is generally small Signed-off-by: Michael Niedermayer (cherry picked from commit 3b678da5e386c138316954e867d595f946666051) Conflicts: libavcodec/h264.h --- libavcodec/h264.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index ed0050a4df..e30e228bfb 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -37,6 +37,7 @@ #include "h264dsp.h" #include "h264pred.h" #include "h264qpel.h" +#include "internal.h" // for avpriv_find_start_code() #include "rectangle.h" #define MAX_SPS_COUNT 32 @@ -1031,20 +1032,11 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h) static inline int find_start_code(const uint8_t *buf, int buf_size, int buf_index, int next_avc) { - // start code prefix search - for (; buf_index + 3 < next_avc; buf_index++) - // This should always succeed in the first iteration. - if (buf[buf_index] == 0 && - buf[buf_index + 1] == 0 && - buf[buf_index + 2] == 1) - break; + uint32_t state = -1; - buf_index += 3; + buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; - if (buf_index >= buf_size) - return buf_size; - - return buf_index; + return FFMIN(buf_index, buf_size); } static inline int get_avc_nalsize(H264Context *h, const uint8_t *buf, From 969aee07e68c5930782bc46f2ac2391db55b8d1b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Oct 2014 04:30:11 +0100 Subject: [PATCH 452/822] avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c Fixes Ticket4011 Signed-off-by: Michael Niedermayer (cherry picked from commit 69a9a90d2ef795162074be24e3ad2182a8676af2) Conflicts: libavcodec/h264_parser.c --- libavcodec/h264_parser.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 416f464acf..4d21f3b56c 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -202,10 +202,10 @@ static int scan_mmco_reset(AVCodecParserContext *s) */ static inline int parse_nal_units(AVCodecParserContext *s, AVCodecContext *avctx, - const uint8_t *buf, int buf_size) + const uint8_t * const buf, int buf_size) { H264Context *h = s->priv_data; - const uint8_t *buf_end = buf + buf_size; + int buf_index, next_avc; unsigned int pps_id; unsigned int slice_type; int state = -1, got_reset = 0; @@ -225,26 +225,26 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (!buf_size) return 0; + buf_index = 0; + next_avc = h->is_avc ? 0 : buf_size; for (;;) { int src_length, dst_length, consumed, nalsize = 0; - if (h->is_avc) { - int i; - if (h->nal_length_size >= buf_end - buf) break; - nalsize = 0; - for (i = 0; i < h->nal_length_size; i++) - nalsize = (nalsize << 8) | *buf++; - if (nalsize <= 0 || nalsize > buf_end - buf) { - av_log(h->avctx, AV_LOG_ERROR, "AVC: nal size %d\n", nalsize); + + if (buf_index >= next_avc) { + nalsize = get_avc_nalsize(h, buf, buf_size, &buf_index); + if (nalsize < 0) break; - } - src_length = nalsize; + next_avc = buf_index + nalsize; } else { - buf = avpriv_find_start_code(buf, buf_end, &state); - if (buf >= buf_end) - break; - --buf; - src_length = buf_end - buf; + buf_index = find_start_code(buf, buf_size, buf_index, next_avc); + if (buf_index >= buf_size) + break; + if (buf_index >= next_avc) + continue; } + src_length = next_avc - buf_index; + + state = buf[buf_index]; switch (state & 0x1f) { case NAL_SLICE: case NAL_IDR_SLICE: @@ -261,10 +261,13 @@ static inline int parse_nal_units(AVCodecParserContext *s, } break; } - ptr = ff_h264_decode_nal(h, buf, &dst_length, &consumed, src_length); + ptr = ff_h264_decode_nal(h, buf + buf_index, &dst_length, + &consumed, src_length); if (ptr == NULL || dst_length < 0) break; + buf_index += consumed; + init_get_bits(&h->gb, ptr, 8 * dst_length); switch (h->nal_unit_type) { case NAL_SPS: @@ -439,7 +442,6 @@ static inline int parse_nal_units(AVCodecParserContext *s, return 0; /* no need to evaluate the rest */ } - buf += h->is_avc ? nalsize : consumed; } if (q264) return 0; From e25e0903ab60eac72ea17c7611735bcdb80c6b48 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 6 Nov 2014 00:04:51 +0100 Subject: [PATCH 453/822] avcodec/mpegaudio_parser: fix off by 1 error in bitrate calculation Fixes Ticket3918 Signed-off-by: Michael Niedermayer (cherry picked from commit 817663897e59f45f60016fa9d3d16e325b803967) --- libavcodec/mpegaudio_parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 3d9e94688a..79dbf635b4 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -73,20 +73,21 @@ static int mpegaudio_parse(AVCodecParserContext *s1, if (i > 4) s->header_count = -2; } else { + int header_threshold = avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec_id; if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header) s->header_count= -3; s->header= state; s->header_count++; s->frame_size = ret-4; - if (s->header_count > 0 + (avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec_id)) { + if (s->header_count > header_threshold) { avctx->sample_rate= sr; avctx->channels = channels; s1->duration = frame_size; avctx->codec_id = codec_id; if (s->no_bitrate || !avctx->bit_rate) { s->no_bitrate = 1; - avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count; + avctx->bit_rate += (bit_rate - avctx->bit_rate) / (s->header_count - header_threshold); } } break; From 418e9a6113a75cfa84cda7c05f41fb0108a8f83d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 8 Nov 2014 12:43:50 +0100 Subject: [PATCH 454/822] Revert "v4l2: setting device parameters early" This reverts commit b1ad9312331759679a9c956233716a67ae681d89. Fixes Ticket #3517 Requested-by: Giorgio Vazzana Merged-by: Michael Niedermayer (cherry picked from commit 6f21fb793238ab6a790b94b86084148d99373ddf) Conflicts: libavdevice/v4l2.c --- libavdevice/v4l2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 96a272c192..f2c5ffbaad 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -871,9 +871,6 @@ static int v4l2_read_header(AVFormatContext *s1) avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ - if ((res = v4l2_set_parameters(s1)) < 0) - return res; - if (s->pixel_format) { AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format); @@ -925,6 +922,9 @@ static int v4l2_read_header(AVFormatContext *s1) s->frame_format = desired_format; + if ((res = v4l2_set_parameters(s1)) < 0) + return res; + st->codec->pix_fmt = avpriv_fmt_v4l2ff(desired_format, codec_id); s->frame_size = avpicture_get_size(st->codec->pix_fmt, s->width, s->height); From 871d99ef77336069e5a8ece947c8160d9bc4d5ea Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 14 Nov 2014 20:20:50 +0100 Subject: [PATCH 455/822] mp3enc: fix a triggerable assert We have to check against the number of bytes actually needed, not the theoretical maximum size. (cherry picked from commit 12700b0219521a5f20c8ba47b3ad7857ea9e0554) Signed-off-by: Anton Khirnov --- libavformat/mp3enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 476d7f71cb..1eaa585eeb 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -196,7 +196,7 @@ static void mp3_write_xing(AVFormatContext *s) avpriv_mpegaudio_decode_header(&mpah, header); - av_assert0(mpah.frame_size >= XING_MAX_SIZE); + av_assert0(mpah.frame_size >= bytes_needed); ffio_fill(s->pb, 0, xing_offset); mp3->xing_offset = avio_tell(s->pb); From bf219a564c421b9c9ce8f0c6c0e6ad549cbbdcd3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Nov 2014 03:08:20 +0100 Subject: [PATCH 456/822] avformat/avidec: fix handling dv in avi Fixes Ticket4086 Signed-off-by: Michael Niedermayer (cherry picked from commit f0ae0354d3f04c369257c2a28557524d28c5df15) --- libavformat/avidec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index a7e1c5b8d1..7512622d15 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1046,7 +1046,7 @@ start_sync: goto start_sync; } - n = avi->dv_demux ? 0 : get_stream_idx(d); + n = get_stream_idx(d); if (!((i - avi->last_pkt_pos) & 1) && get_stream_idx(d + 1) < s->nb_streams) @@ -1058,6 +1058,9 @@ start_sync: goto start_sync; } + if (avi->dv_demux && n != 0) + continue; + // parse ##dc/##wb if (n < s->nb_streams) { AVStream *st; From 7fe5d0a78df537542732aa7bd45962f7505255d0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 23 Nov 2014 21:25:05 +0100 Subject: [PATCH 457/822] lavu: add wrappers for the pthreads mutex API Also add no-op fallbacks when threading is disabled. This helps keeping the code clean if Libav is compiled for targets without threading. Since we assume that no threads of any kind are used in such configurations, doing nothing is ok by definition. Based on a patch by wm4 . (cherry picked from commit 2443e522f0059176ff8717c9c753eb6fe7e7bbf1) Signed-off-by: Anton Khirnov (cherry picked from commit 46a17d886b8559723c40b9f5cdf0e0c6b1c95180) Signed-off-by: Anton Khirnov --- libavutil/thread.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 libavutil/thread.h diff --git a/libavutil/thread.h b/libavutil/thread.h new file mode 100644 index 0000000000..07e3d4ac45 --- /dev/null +++ b/libavutil/thread.h @@ -0,0 +1,53 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// This header should only be used to simplify code where +// threading is optional, not as a generic threading abstraction. + +#ifndef AVUTIL_THREAD_H +#define AVUTIL_THREAD_H + +#include "config.h" + +#if HAVE_PTHREADS || HAVE_W32THREADS + +#if HAVE_PTHREADS +#include +#else +#include +#endif + +#define AVMutex pthread_mutex_t + +#define ff_mutex_init pthread_mutex_init +#define ff_mutex_lock pthread_mutex_lock +#define ff_mutex_unlock pthread_mutex_unlock +#define ff_mutex_destroy pthread_mutex_destroy + +#else + +#define AVMutex char + +#define ff_mutex_init(mutex, attr) (0) +#define ff_mutex_lock(mutex) (0) +#define ff_mutex_unlock(mutex) (0) +#define ff_mutex_destroy(mutex) (0) + +#endif + +#endif /* AVUTIL_THREAD_H */ From c790e31ae46d4304af893d04806ec9e3bff5ae28 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Nov 2014 13:34:50 +0100 Subject: [PATCH 458/822] lavu: fix memory leaks by using a mutex instead of atomics The buffer pool has to atomically add and remove entries from the linked list of available buffers. This was done by removing the entire list with a CAS operation, working on it, and then setting it back again (using a retry-loop in case another thread was doing the same thing). This could effectively cause memory leaks: while a thread was working on the buffer list, other threads would allocate new buffers, increasing the pool's total size. There was no real leak, but since these extra buffers were not needed, but not free'd either (except when the buffer pool was destroyed), this had the same effects as a real leak. For some reason, growth was exponential, and could easily kill the process due to OOM in real-world uses. Fix this by using a mutex to protect the list operations. The fancy way atomics remove the whole list to work on it is not needed anymore, which also avoids the situation which was causing the leak. Signed-off-by: Anton Khirnov (cherry picked from commit fbd6c97f9ca858140df16dd07200ea0d4bdc1a83) Signed-off-by: Anton Khirnov (cherry picked from commit 517ce1d09b5e6b72afc2ef9490b5f8ca42fa6a65) Signed-off-by: Anton Khirnov --- libavutil/buffer.c | 79 ++++++++++++------------------------- libavutil/buffer_internal.h | 6 ++- 2 files changed, 29 insertions(+), 56 deletions(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 2b38081e1d..1bc4a93f38 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -23,6 +23,7 @@ #include "buffer_internal.h" #include "common.h" #include "mem.h" +#include "thread.h" AVBufferRef *av_buffer_create(uint8_t *data, int size, void (*free)(void *opaque, uint8_t *data), @@ -199,6 +200,8 @@ AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size)) if (!pool) return NULL; + ff_mutex_init(&pool->mutex, NULL); + pool->size = size; pool->alloc = alloc ? alloc : av_buffer_alloc; @@ -220,6 +223,7 @@ static void buffer_pool_free(AVBufferPool *pool) buf->free(buf->opaque, buf->data); av_freep(&buf); } + ff_mutex_destroy(&pool->mutex); av_freep(&pool); } @@ -236,47 +240,16 @@ void av_buffer_pool_uninit(AVBufferPool **ppool) buffer_pool_free(pool); } -/* remove the whole buffer list from the pool and return it */ -static BufferPoolEntry *get_pool(AVBufferPool *pool) -{ - BufferPoolEntry *cur = NULL, *last = NULL; - - do { - FFSWAP(BufferPoolEntry*, cur, last); - cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, last, NULL); - if (!cur) - return NULL; - } while (cur != last); - - return cur; -} - -static void add_to_pool(BufferPoolEntry *buf) -{ - AVBufferPool *pool; - BufferPoolEntry *cur, *end = buf; - - if (!buf) - return; - pool = buf->pool; - - while (end->next) - end = end->next; - - while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf))) { - /* pool is not empty, retrieve it and append it to our list */ - cur = get_pool(pool); - end->next = cur; - while (end->next) - end = end->next; - } -} - static void pool_release_buffer(void *opaque, uint8_t *data) { BufferPoolEntry *buf = opaque; AVBufferPool *pool = buf->pool; - add_to_pool(buf); + + ff_mutex_lock(&pool->mutex); + buf->next = pool->pool; + pool->pool = buf; + ff_mutex_unlock(&pool->mutex); + if (!avpriv_atomic_int_add_and_fetch(&pool->refcount, -1)) buffer_pool_free(pool); } @@ -306,8 +279,6 @@ static AVBufferRef *pool_alloc_buffer(AVBufferPool *pool) ret->buffer->opaque = buf; ret->buffer->free = pool_release_buffer; - avpriv_atomic_int_add_and_fetch(&pool->refcount, 1); - return ret; } @@ -316,22 +287,22 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool) AVBufferRef *ret; BufferPoolEntry *buf; - /* check whether the pool is empty */ - buf = get_pool(pool); - if (!buf) - return pool_alloc_buffer(pool); - - /* keep the first entry, return the rest of the list to the pool */ - add_to_pool(buf->next); - buf->next = NULL; - - ret = av_buffer_create(buf->data, pool->size, pool_release_buffer, - buf, 0); - if (!ret) { - add_to_pool(buf); - return NULL; + ff_mutex_lock(&pool->mutex); + buf = pool->pool; + if (buf) { + ret = av_buffer_create(buf->data, pool->size, pool_release_buffer, + buf, 0); + if (ret) { + pool->pool = buf->next; + buf->next = NULL; + } + } else { + ret = pool_alloc_buffer(pool); } - avpriv_atomic_int_add_and_fetch(&pool->refcount, 1); + ff_mutex_unlock(&pool->mutex); + + if (ret) + avpriv_atomic_int_add_and_fetch(&pool->refcount, 1); return ret; } diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h index cce83c3cd1..1032a543e5 100644 --- a/libavutil/buffer_internal.h +++ b/libavutil/buffer_internal.h @@ -22,6 +22,7 @@ #include #include "buffer.h" +#include "thread.h" /** * The buffer is always treated as read-only. @@ -68,11 +69,12 @@ typedef struct BufferPoolEntry { void (*free)(void *opaque, uint8_t *data); AVBufferPool *pool; - struct BufferPoolEntry * volatile next; + struct BufferPoolEntry *next; } BufferPoolEntry; struct AVBufferPool { - BufferPoolEntry * volatile pool; + AVMutex mutex; + BufferPoolEntry *pool; /* * This is used to track when the pool is to be freed. From 2bcd8f22f2fae253d87b11a5c9f8805d79253180 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Fri, 28 Nov 2014 09:52:50 -0500 Subject: [PATCH 459/822] Treat all '*.pnm' files as non-text file This convinces the pre-receive hook to not consider all *.pnm files as text files to reduce the patch sizes and avoids triggering whitespace checks, Contains a correction by Janne Grunau (cherry picked from commit b877814e09b9f25308ec205cf48bb9554b33e95c) Signed-off-by: Reinhard Tartler --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..a900528e47 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.pnm -diff -text From d1c2f86b21b96c27fac200209f52c98dcb2b3194 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 27 Nov 2014 18:21:03 +0100 Subject: [PATCH 460/822] Replace lena.pnm The new reference.pnm is a freely licensed replacement. The photo has been taken by Reinhard Tartler on August 28 2014, and is licensed under the expat license as stated at http://www.jclark.com/xml/copying.txt (cherry picked from commit e38231007e19e5f27b0e77e72bcd26fb3d76edfb) Signed-off-by: Reinhard Tartler --- tests/Makefile | 2 +- tests/lena.pnm | 109 ---- tests/ref/seek/vsynth2-asv1 | 40 +- tests/ref/seek/vsynth2-asv2 | 40 +- tests/ref/seek/vsynth2-ffv1 | 40 +- tests/ref/seek/vsynth2-flashsv | 40 +- tests/ref/seek/vsynth2-flv | 40 +- tests/ref/seek/vsynth2-h261 | 40 +- tests/ref/seek/vsynth2-h263 | 40 +- tests/ref/seek/vsynth2-h263p | 40 +- tests/ref/seek/vsynth2-huffyuv | 40 +- tests/ref/seek/vsynth2-jpegls | 40 +- tests/ref/seek/vsynth2-ljpeg | 40 +- tests/ref/seek/vsynth2-mjpeg | 40 +- tests/ref/seek/vsynth2-mpeg1 | 40 +- tests/ref/seek/vsynth2-mpeg1b | 40 +- tests/ref/seek/vsynth2-mpeg2-422 | 40 +- tests/ref/seek/vsynth2-mpeg2-idct-int | 40 +- tests/ref/seek/vsynth2-mpeg2-ilace | 40 +- tests/ref/seek/vsynth2-mpeg2-ivlc-qprd | 40 +- tests/ref/seek/vsynth2-mpeg2-thread | 40 +- tests/ref/seek/vsynth2-mpeg2-thread-ivlc | 40 +- tests/ref/seek/vsynth2-mpeg4 | 48 +- tests/ref/seek/vsynth2-mpeg4-adap | 40 +- tests/ref/seek/vsynth2-mpeg4-adv | 40 +- tests/ref/seek/vsynth2-mpeg4-error | 40 +- tests/ref/seek/vsynth2-mpeg4-nr | 40 +- tests/ref/seek/vsynth2-mpeg4-qpel | 40 +- tests/ref/seek/vsynth2-mpeg4-qprd | 40 +- tests/ref/seek/vsynth2-mpeg4-rc | 40 +- tests/ref/seek/vsynth2-mpeg4-thread | 40 +- tests/ref/seek/vsynth2-msmpeg4 | 40 +- tests/ref/seek/vsynth2-msmpeg4v2 | 40 +- tests/ref/seek/vsynth2-roqvideo | 2 +- tests/ref/seek/vsynth2-rv10 | 55 +- tests/ref/seek/vsynth2-rv20 | 54 +- tests/ref/seek/vsynth2-svq1 | 48 +- tests/ref/seek/vsynth2-wmv1 | 40 +- tests/ref/seek/vsynth2-wmv2 | 40 +- tests/ref/vsynth/vsynth2-asv1 | 8 +- tests/ref/vsynth/vsynth2-asv2 | 8 +- tests/ref/vsynth/vsynth2-cljr | 6 +- tests/ref/vsynth/vsynth2-dnxhd-1080i | 6 +- tests/ref/vsynth/vsynth2-dnxhd-720p | 6 +- tests/ref/vsynth/vsynth2-dnxhd-720p-10bit | 6 +- tests/ref/vsynth/vsynth2-dnxhd-720p-rd | 6 +- tests/ref/vsynth/vsynth2-dv | 6 +- tests/ref/vsynth/vsynth2-dv-411 | 6 +- tests/ref/vsynth/vsynth2-dv-50 | 6 +- tests/ref/vsynth/vsynth2-ffv1 | 6 +- tests/ref/vsynth/vsynth2-ffvhuff | 6 +- tests/ref/vsynth/vsynth2-flashsv | 8 +- tests/ref/vsynth/vsynth2-flv | 8 +- tests/ref/vsynth/vsynth2-h261 | 8 +- tests/ref/vsynth/vsynth2-h263 | 8 +- tests/ref/vsynth/vsynth2-h263-obmc | 8 +- tests/ref/vsynth/vsynth2-h263p | 8 +- tests/ref/vsynth/vsynth2-huffyuv | 6 +- tests/ref/vsynth/vsynth2-jpegls | 8 +- tests/ref/vsynth/vsynth2-ljpeg | 6 +- tests/ref/vsynth/vsynth2-mjpeg | 8 +- tests/ref/vsynth/vsynth2-mpeg1 | 8 +- tests/ref/vsynth/vsynth2-mpeg1b | 8 +- tests/ref/vsynth/vsynth2-mpeg2 | 8 +- tests/ref/vsynth/vsynth2-mpeg2-422 | 8 +- tests/ref/vsynth/vsynth2-mpeg2-idct-int | 8 +- tests/ref/vsynth/vsynth2-mpeg2-ilace | 8 +- tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd | 8 +- tests/ref/vsynth/vsynth2-mpeg2-thread | 8 +- tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc | 8 +- tests/ref/vsynth/vsynth2-mpeg4 | 8 +- tests/ref/vsynth/vsynth2-mpeg4-adap | 8 +- tests/ref/vsynth/vsynth2-mpeg4-adv | 8 +- tests/ref/vsynth/vsynth2-mpeg4-error | 8 +- tests/ref/vsynth/vsynth2-mpeg4-nr | 8 +- tests/ref/vsynth/vsynth2-mpeg4-qpel | 8 +- tests/ref/vsynth/vsynth2-mpeg4-qprd | 8 +- tests/ref/vsynth/vsynth2-mpeg4-rc | 8 +- tests/ref/vsynth/vsynth2-mpeg4-thread | 8 +- tests/ref/vsynth/vsynth2-msmpeg4 | 8 +- tests/ref/vsynth/vsynth2-msmpeg4v2 | 8 +- tests/ref/vsynth/vsynth2-prores | 8 +- tests/ref/vsynth/vsynth2-qtrle | 8 +- tests/ref/vsynth/vsynth2-rgb | 6 +- tests/ref/vsynth/vsynth2-roqvideo | 8 +- tests/ref/vsynth/vsynth2-rv10 | 8 +- tests/ref/vsynth/vsynth2-rv20 | 8 +- tests/ref/vsynth/vsynth2-svq1 | 8 +- tests/ref/vsynth/vsynth2-v210 | 6 +- tests/ref/vsynth/vsynth2-wmv1 | 8 +- tests/ref/vsynth/vsynth2-wmv2 | 8 +- tests/ref/vsynth/vsynth2-yuv | 4 +- tests/reference.pnm | 696 +++++++++++++++++++++ 93 files changed, 1636 insertions(+), 1050 deletions(-) delete mode 100644 tests/lena.pnm create mode 100644 tests/reference.pnm diff --git a/tests/Makefile b/tests/Makefile index ae7e653a80..1128b3175e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -16,7 +16,7 @@ tests/data/vsynth1.yuv: tests/videogen$(HOSTEXESUF) | tests/data $(M)$< $@ tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data - $(M)$< $(SRC_PATH)/tests/lena.pnm $@ + $(M)$< $(SRC_PATH)/tests/reference.pnm $@ tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN diff --git a/tests/lena.pnm b/tests/lena.pnm deleted file mode 100644 index 700508c86c..0000000000 --- a/tests/lena.pnm +++ /dev/null @@ -1,109 +0,0 @@ -P6 -# CREATOR: The GIMP's PNM Filter Version 1.0 -256 256 -255 -}߈v|{|rބu݄nފv߂kބj܄pg݂tށsjrvrrwzyvxvtwfvvZaP_@T>\=YEXGXJZIZJ\NWJVLVOZLXLXNXLVNZNZJSJTOVSYTZXZTXZY^Z[\`\^\\Zf_b^ebabbbkhffd`b]b``^g_d^d`a^hahjb^ebfagfebe`ddfbgdhef`d^ffjffefbjfgbidibichjheghknhlffe_ddf^e]cbcbjhibdadddbb\e`hbf`g`jdd\fd``j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๧ἰ¶¹޼·޿ܾ÷źȿƾ˾6LCN[Viatjtrnmoo~orzplfc^NRe@b@cA`<`L;K=LI>L?K=L6H@LKR]YiXv`flsqrurnsj{dqdbYTTEM0F'@)B,D0F5H;N>N@LCP@M@MCLENBLDMBLDJDKEPELHPKTOWLPNRNTQ]HYOXkocAM:L@MFSDSJTJUPXPU@L@PW[MZX^\_af^`b`[bZ_OYVe^fjmrp^`TZ`afbU[PXLXVi~ڌܚޟܧژ؍֎אՖܣږԒڥܧޞܤܦئأڮ৕޼ܮ޹خܪݧڮ߷٩ڢ֣۲⿶㿵๲⹨޼ὰ۴ݮ⻪ø´޾¶úļĻŻǼŻƶŸüſɿμevBKYUhaul|lm~joj~lh}otcojZZHJ:Gg6J8F>o>aҼ޺ʐʢϽ˻̾̾ɸŶƽńMcKDP@ZAZB^Ab@b?fBbB`<`=`;b<\>V9]Ab?c>iAbB]EYCgH@dj}ЂԂ~zzxxx{~|ш׌֊|؇zֈyԇ|Ԋ{Պ}ՈzӉ~҆|ԉxъ~Ҋz׊yN>M>N@OCOCREMAL@L@JDPISHSGPIOJQJRMSOUPTFR@R[YМq|aHT:MGTDRHWMWGSHR>QGUNUU\Y`X`\_]`T]^fY`N`Zk_c`ghgdf]gbfjd`dRWGTYeԋފڋܜٔ֓֊ۣ҄ٛ׌ؗݦߧުٟۡۛݪ߲߰ڪާױ۩ݴۮ۴ڦڠٝխ޸ݳḨ⾵ུയඦῴᾮܺݲᾮ¶¸߽࿵³ľ࿰޿ڹؾľƼǾŸȾ̶htXXcXtfyh}h~ilhj~lxeschbRQBI-D]:]#Jfʸ̴۴ȖΰооλλǹݻŸķȺĂK`JDR@\C\D`GdDdC`8\:\9]:d@`;[@]A_>eBfBd>Y[F|*R\t|ф|z~t|~шԌ׉׉|֌~և|ԋ|ӈ~ҋ҈yԊ~ч|ԇxԇ}ӊ~։y>M@N>L@KBO@JDNAK@L?K>K=J@LNRZXnct`jnnxqwpllpgvefYSWFO4G0F+E0F4J8I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~҅z҈}ӈ|ЇzЈ}҆z҅yσ{ԅy҄xCRFOBN?HBL@LCPBLFTQNVIR@TR^X^T`Y^RZJXW`\aS_R`Uesvyrwv{ov|suuvvԁ҈diy~ՉڐٍՁژۦڠם֒ؓהԒُܪۦ߰٦׉҃֙ܬܡ۝١ښ୘ܪܠۤؤؚݦج؞ۦ߸ອߴߪ߰ئИ֬۳޸ڲڲحׯ۸ڵغڼڻݶݸ۶ڴۼؾؼյֲպԴع»ź݄yz]zbxfxk؏ܲʼͶᶜٳڵ٪طʼξʸǺŹ´Ĺĸƺ¶ƺȻ̿οܼv|KCRJX"I^H^E`AbAa@b>\:\I@KGJNK_WlZ{hnqsmvrt}xvj{giZXPBL2G.F.D3I;OJCGPM]Vm]zflnmrpswu~rp{fn^UQFL6D+D.C3F?O@P8EI?K>LDN>LAKBLDNFLJPFLBK9O`Ad#EdD]@Y;Z8`>d>a?dIk$Pq$P1\Imf{{}~~x{wzy|τ҉֌}،~؍~׊֊֊֊҇ӆ~ӈӆ|Ԋ|҆zцyԆx҆|҅{̆}҈z҆}FUAMBPBNDP:L@MBNDPAIDKBLHMQR^Tl^yaglrmxvrmrri{gkZROIO5G,B+@0B4D8F=L:H=JJBL@LAMCM@I@LDMIODNBHAL8NFRͩǏx|x_zc\W]XLUVRKTDPFVCRJVKPJRPVRQOTX_bdV_]d``P_F[hruw|wwwsqnnpnxv|rad_jpsxtuv|ԀӁy֔|{}yօ֍ْםؑڞܥ؞ԃҀ֎ܪܠؓܜ۞ژڗۤڜܠ؛֘הڗۨܦݨؤإڨܩܪܫܭ֤֦ڱٲڸԯڲضٳزܪګبכԤ֫֯հԤҮӪԭΤʚȜΪҪ׵±俨߰ޭ޽ສ޸öʻ̼ȷ³⽫³࿰߿߾·÷ƸøŷƸຮ۱ܸúɽʿξظ›L>O =X>[<_@]:cAb>[>\;Y<`Ab=f=gDdFbEn%R:c[vt}~}|wzvz~~҇Չ؎׍Ռ֊Պֈ~Ԇӈӆԇ}ӉԆ{шч|҆ц~҆}҅{҇{ӅzFWAO>NCPDQAN>H@M>J=I@L?GENQN\Vn`xchssmssyrzqnydhZURIN3E'@)C.E6F8H=LAL?I@M=JAK@M>KALBN@M>I@JCLBJEMINFNBHFR6NLQУʼnqn|cqcj^`Z\UVTNQRXGRHXGRGVMUKV>NQWTWTZ\cY\VaN[`nqsvrz|ytlphlwwԋ_ahouvzyzy~|ՊsupnՆ}z~،ٜڞܚםԍֆ{ևԅڟܡڏݘܜܖܙޜܦڛڐܢ۞ڜ؟֖؜ڔڢՠٟޮ۰٪أئ֨מצٮخ۸մԮڰزةتաלԠԜը֭֭ԩСϠѢɖʐǙԱòêݬץӦۺ༰ݼŹʼ̸ǸIJ۸ܼ޿߻޾࿳ø¸ŻĹƸ٨נܲ߾ƼȽʽպ^fKCR ;Z=[<]=^Db>dD\BX=Y=]JBN?LBJBN@K?LCK?J@KFNDNCMHNDJBM7NTXԭwts\zch_jbQSjbTSMNCNHPCPP[FRHZJ\SXYdT\PTP`L`ckrxjlwyzulqnpvwрwY^Zfpr|t|yyvԂ~ԆztgkprprԇՍ؏ܥٙؔ֋pt֊ݤޠޠܚՍی{ޟܜܚޢݧٛۖܠڞכؙ׏טڗܛ٧ݦۦۣڞ֨ܬ٪ןڨخٵڶײר٢٦ة֮Ӣԛӣ֘֫թըϖ̠Ɋő͢ݿ®޳՞գ޹޺ྲĹǸǶƸƶ²ܼܺ޿߿ྴ÷úƼ÷ƶƹץҖҕۥڵƺĶƸѺɴo,HQ@Tc$L_&LV;`>a;eDhDcDY@ZA3\cy|~ԃz|v|z|Ѓъ֌׊|֌׍~։׋֌׋~֌Պԇ}ӈԊ~ԋxӉԉ|Ӊ|Ԉ}҆}ԊzՌ{ԆzGBNCJ>IDJ>H?LFODJGNIODN@I7P\T׫€zjzoper`aX]VZSHNHQJVDOETIYRXGV[b\YGRAWHXlsxuhjtpurkjsurpЀrT_\hnlyvtrzvՁՁ|opktxz~xy،zцՇ~ٜ҂}Ԋۙߚݡڜ۔۔Տݐݞڞܜޜߢژ،ւ֔٣֕֍ܖ۠ڜܠҐ֜ץ٢ܪگحڟګڱد׫ץ؟נئؤ٭ק֘ԡ՘Ԧԟ̐ƎǖۻĮṞ֪׫ٶܳߺƶƵö±±޽ݼ޾߿߽´ĸźĹƹŶܰԔъӌ؛ݸජް伮ʼήƕTU@Z@]>`@_?^;]AZ?\>_;`9_=`C_H_Hn!LJjn}~}y|v|҈Ԍ֌~֏֏ٍ֋ֈ׊ԌԋՆyԈ|ԇ|Ӊ|Ԉ~ӈ{҇|Շ{ӌ{҈{ӈ}Ԇ}Ԇz@LAJAJBQ>NAN>L@M=I@K>I?HGPNO`Xo`zbnlouvzxtvxi|jjZXWFP2H.F*E3I9H>N?L?L@L?MHSBNBO@L?KBJ@JAN>HCNBLDMAJEKBIAM5QVTԮ~ulghwar^mXj]Z[QTPOIP2FBSMSDPUZXYRXHTFXdjtsspmnfdnvmnԀtrrP^Xfrpvu{xz|zwӂ|vx|{ry|ׅԊrxns֒΃tp}ڑߞݞۓُڐښٕ۔ג؊ܖڠٖڋ؎ה֐Ӎڍؘ؜ؘՏҍГՠ֙؜ؤ؟ۮܮڪ֡קקסآ֞Ֆ٧ר֧إҖԚЉК̒ȓԪ®ڧ٬۷ݴݺ¸Ķ°²༮޸ܺݹܽݽ༰߿޽õ¸ŸƻȾ²՛ҋ͈Ћ֤أ΀z؞ḭĮϸLWQ@T@]"J]C`A`@aB`A^@W=\8`<^9Z<^Cn&Vz0\:_cyy|}zxwzy|Ђ҈~֋׋،،Պ׋|؊Ԉԏԉ}ԇ~ӌш}ӌ~ш~Ҋ{Ԉ|ӌҌӆ|Ӈt҉Նx@JBN>JESK?LBLBNNSa\oalhlruvpsvylkz`k\[VGO6J0F.D.F6H>P>O>PERDP@N@NBL@L@KAL@K@K@LEOBJBLHP@KBL?M7V`WԬp{fmd|jpYogdZg]\VNS@NBR\;\Bb Oy.Z8dXrt|{|}vzvỳ҈ҋԋ׌Ԍ֊ք}֋׊֋֊ӉҊ҈{҉҈҈Ҋԉ|҉Ҍ|ԇ|҆yԈ}Ԉ@L@K;J>H>L:LL>I?L@NBOQRbZrb{cfpruwtsrvojzcl\XRHP8H)D/H.F5JJBMAJ>H@IAHDHAJENAI@I>M4Pl\̜|lqgheobj\pfm_XUFNFS@M8NHQLSHPEO@TmrtqmjioifeglnppqoP\Zjjnllllxt׀}tssrlotrԁvp~x~֊օ{yjp}{ۖւو܏ډ݊ܘٌۖڒؖܒؓ؋ֆ؂|ߠٌؔݑٗՍ~ϋѕԓ֙֕ؔ۟ܞוؗԓء۬أמ֓ԙ՝ԞӑӚԕգҚŎŃΔٱު֥٭ڪ޲ȼĴòݹܯڸݺܶڵݺ໲޾µøȾȽǺǵ⽭̇ˈюأإkjnqӋ۠ߴѴv}Pc<\>_Fl#R~1\Ijo}z|{z{vzz}Є׉ԌՎՌҏЎև~ԌՇ}ӈҊ|Ԋ~ҌՋ҆~ІԈz҇y҈}Ӎҋ}ԊyІ{ϊ~҇~JBK@L=J>I>L@J?LDPSX`[n^|dilrvrytvxqm|dr`YTFN6H*D,F0H8L>M=LBOBPBQAN@KBN;G>LAJ@MANAJBJFQ@IAK@J?H8K2NziΞjxko_rf{^m`fYpf[RJOGTCTJUJPLWETEYdlrqpqkjjiY`intuaaZhXe`iqqwuqrrptortnqvqryqjgr|x؄ׂ~ցos{zz܊ّ҇{ׂz؇܌ݣے؆ي؆؊ّڐ֎ۆݘٖvqықӍ֊֔׌ۖ֗ڔڜڔٌؚؔۘכՖ֜ӒؘԜΐҔˌΐΐȐب㼦ⱑښ՞ܯܰ޾ȸŲ¯ܺܶٹܸܺ۸ܷܺݼྴ³µ߿¸ĸøļȼɻ˺ɸ՘ˆҒڢנpnw}ʆؙܟ㶤ҼBTN K@M?L=J>L>L>KLM@K@L@KK]EU:^$KaBeBdB^E_Jk+X8bdt}Ҁ}|uxvyЀщӉԌՌՋԈъ҆~ӄ|ӈԈ~Ԉ|ҋ҉}ш҇}ҋ}Љ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㻪⸦Ὥ޸޸߸޼Ἢݹܺڴضٻܺ޻߾´ྰྮ⽭ǺƸŹƽƻǺڪvdXTDM>L@O9J:G9H@PBWXd̃ݧ跤̳ìv/BY$IR=X=[Aa?a@\@\?V@a@h@g@aAX@O@bJIfox~z}vwsx|{ӈԌԎӎӍӌԋԊ~Ԋӌҋ~ԊъЇцωҁ|̃|υΆφ~Ї~·}͆}̈́{̄|΅{І|φ|҆z҃v?PEPEQHQFPAODPAPDN@KHOIOJNVRf\r^~`fpprrtvtuqllrc^RKQ0F&B)A1F4H8N=N@P>LCRAM>JG=E5C,IZNΟɖz~jeeVPLbT^Qc^UWT`R]NZU]dgFRRcQ^_kjnhmhmfjhkfhU`^ddjfljqeodkjq`hdpnrrrlvntdtIoZvo|n|`RvZyhzQhJxfj^8m|1i~BtD}>ph^9qv6kr4ke#Xh"`RXk,Xi+bj,hm0dr5hWKRCN?K -:RQONNQ`۪ϊ}xЏ޼ðı仪໮޵޺ܶ޶߷޹ܹ߻ݹٶڸ۹ܼܺ޾߾޾ུ߸⿱ɻķǸɼྤЕ{\VEN;J;IKSDQBr*SXnwz{xx{w~x~҃ԍ֑ԋҌԎԋ~֊ӌՌ~Ԍ҉҈Ӊ~ъωχІ~΅ͅυ~΃~Ї~Ά{υ}ψ{І}υ|΂xςx΅xфyCPDNERHPFNBKBL=JAMJRHNFKLLWOcTr`|`nlrttvqpsslip^`XGN4F.D(B2G3FLDQ>J?MDKBJBJ?IDMAL@M@KBP?IBKfn1h\!MVDM>C 9B -:HD{Dlͤܠurv|͚ݬ⼬潤⾭ẫ⻬ߺ߹ݷܺݸݶ߻໩ݸݹڸطܹܶܺ߾ݺܼ÷ŵ°ƹʺʷéƋrMNBO9L9L9J7JbAb@c@_=^?[>_Dd=j?eCX@PBXE?dj|}|{xzv|΀~Ӊ׎ؑ֎׎ӋԌԏԋԌԋҌΊъчч~ΈψшЈχ΄~Ѓ{Ї}І|χ~΄{΅~υ|΄|΄{уzBRDSFRGRFQDP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^<:Xx)TGfϐuy&Fa@[>X@]:^>`?d:ji@jAn%Fl"Dm#DkB^8^;]:]8b7d?_=\DbJ|2T\muvutnqjpzyɂ|ʆzɁzȂx͆ΊҐ~ՑԕՕԔԔӒҐҒ}ӏҎՎԌԒ֒Ւԏԍэҋ~ҋϊЉҋ~э~΋Љ~ϋ~Έ͈Јz΄xЄ{~zDQHVIUFRHRDODRBNENER@K7F=HIP[Xi]xhpxtwvsxxwwvj{nc\PY/E1F5GO?NBNBNAK@NEOBP@OBOAOBPENEPEMKQIRLTSXTXMPLRJQDL>ROTȜўԜsFMKRKQKWLVU\R[VdXg`i\aaibgBXRgOdPcG_C\7V[A^D7b@i]>XY:b@_=b\=ZEj!PB\iuxvqpjqptǂ·~˅~ʂyʁȳ{ǃ}͆ω~ъҏԒЎҏӐՐ|֎~ӍҎӎ~Ԑ~ԐՓӐԌэььΌшЉЊъ~Ћ~Ҍ{ψ~ψzЇ}Єy΃|yEPHTFTIUHTGSFQEQ@KDP@N:INBODQCOCPDRDRAMENDPCRBUDNCO?MGRmuRUPURUNTPRLQIM>O>Q쬁֫ӜށjPZLPSXS[OZPXFUL`hjbdXdT^T_7W0Q9\0T}$L/Q3VkJ_GDo{1^Xk!P_Aj"N\A\E\Bl)Ts/`h"Qg#Wm(^{S 8M 8K 5E5O>Zi֎xSaSgΉ߬۔ڏՎvĖԜ۴ԤըқћМ̖͕ϜզҊ{z㈁䎄昊蝍覛ꨜ첦첥춧켯LöôƷdzǴ﬚{V[n?j"EeAfCh?hDl Do)Jl%Dl @b>^9]>_g=c@W>\Fr(PVhu{ztnpdp{v̈ЎΆʆȃ|̈́~Ƃ~Ɂ~Ȃ̄΅~χ΋ю}ЌЌ|Ԑ~ҏӌӎӏ~ӒҐӒҌЍЍԌяшЋщЈ~щ|҈|Ї{х{І|ς|΂||BQITITCNHTGSDNDLDNAN>LNg҉yajQeЃݢܚؔؑӔ{̦ҩ׶׳֦ЗИҜΜҝЛӅ|yzቆ䍇撇嘑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ҔӓґӓҔύ~Ί|·͉~Ȇ„|zy}~|}}~z}~zyy{yzzx}z|z}zʄ̇~Ɂ{ˁ|Ёx́xπyDRHQEOENCS@PCL=J?LBN>L6F:IDMYYibzqqx|z|xz~{urmtbb[KN;M.K(E.G6M5Nnk0TR>RGH XCt*O.V|ٞdv~,Pk&JeFi$Kp*Nh"Fm&Ji!Fl'Jn(Ik&Hf@]@_BbBa>e@aV>Z@dL[Ig(Mp2[S >\FU`LY>|FvWF]VRLaErx_a;Swݫܑ~ݘܠؙԍԊ֝۱׳ֱزҪөѤ|kTZ`iqwxy~ᆉ⋍⍉損敕癒Ꙓ꜔ꞔ뜏ꛑ뜐좔죕쮞봤ﳡﶦ︦ŲȸƸ|NV,F}Bc9U :R:V?kGw"Px٣q{+N{,LdHn,Nm*Ne Ef Hk$Eo%Ho*GjCb>^>bBa@d?f!E^?TBe K@dbsrwrslqnsȀ|ҌҐ~ӑҐґҏ~ґЍ~ЍΏБzђҒӒӘҕґґώϊ̋~ˌ}Ȉ~Æ|ƒy}~}{||~|{}y{{|{{y}wyz|{~yxwr|w{x}vGRCOFRDO@MBN@L@M>LAM=J;I8HEPUTjfqfox|y||zzvvqqvddYNR:L.L*H0K6P8NRERCPDPBQBNGTHQJRLSQTPPTWTRSZUTSWR\Ն㮉քdbPb:n6t:(=ZnjdcmV]LURV9TdJm.lu;g|KxL -=NHb"Xcv8iP :Y@`Dk"Pp&OdDaDeJZ;V ;X@]A^DaHf'N_GT Bh.`O^Kg&Zw7id$YQCQ>\h}nDY]lݰݓܢܪԗЄ~ҁ՛۳ڶܹܴ׳̟PJ*>:PJ^Q`_lhsjpru݀⍌哒藒뜕렕띒ꙑ階똌뚍졑쪞봢촦ﶤﺥðôðꛉvqDL@p=aH 9D[}qLZN^Ԝࠆߖݡ߮޴Ҏ΅Ίبܳܺ޺ڸʐHPBWK^KZEW@NBV6I?UK_Vfmrۂ㐊蚓ꢘ뜔뚍ꚑ욒ꕊ뚉죒쨗겣몜밞®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䷤䶨溰辰´Źļʻ˵ȷnRIhEZDRBPHTHRPWRZPYbff^j]h\c\`V\X]T[T`\j^l[kZfZXPRSBKZ@]AXBZv,N~8PBVGTDNHQ \ No newline at end of file diff --git a/tests/ref/seek/vsynth2-asv1 b/tests/ref/seek/vsynth2-asv1 index 5873bb17b7..b3cca3b0c7 100644 --- a/tests/ref/seek/vsynth2-asv1 +++ b/tests/ref/seek/vsynth2-asv1 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 776840 size: 18256 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 939696 size: 22704 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 305352 size: 16180 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 364636 size: 19476 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 595448 size: 17980 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 717284 size: 21768 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 135516 size: 14868 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 160544 size: 17672 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 404100 size: 16856 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 484496 size: 20396 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 704136 size: 18140 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 849824 size: 22364 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 241764 size: 15736 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 288188 size: 18920 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 524488 size: 17548 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 631032 size: 21416 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 77020 size: 14496 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 90952 size: 17244 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 337808 size: 16388 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 403836 size: 20024 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 631584 size: 18188 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 761056 size: 22012 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 180212 size: 15168 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 214224 size: 18228 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-asv2 b/tests/ref/seek/vsynth2-asv2 index 7d37b7ac06..906c2358e4 100644 --- a/tests/ref/seek/vsynth2-asv2 +++ b/tests/ref/seek/vsynth2-asv2 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 736152 size: 17340 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 891064 size: 21664 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 289708 size: 15300 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 343044 size: 18440 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 564140 size: 17016 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 678500 size: 20848 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 128564 size: 14052 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 151024 size: 16584 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 383244 size: 15896 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 456544 size: 19448 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 667016 size: 17172 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 805248 size: 21364 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 229388 size: 14956 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 271044 size: 17784 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 496932 size: 16564 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 596008 size: 20456 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 73176 size: 13664 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 85924 size: 16152 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 320444 size: 15592 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 380220 size: 18948 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 598288 size: 17180 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 720420 size: 21060 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171012 size: 14392 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 201408 size: 17128 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-ffv1 b/tests/ref/seek/vsynth2-ffv1 index 715a27227c..153becbae1 100644 --- a/tests/ref/seek/vsynth2-ffv1 +++ b/tests/ref/seek/vsynth2-ffv1 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2498334 size: 75937 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2589296 size: 81788 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1630830 size: 72682 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1666112 size: 77204 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2498334 size: 75937 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2589296 size: 81788 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801262 size: 69457 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808352 size: 70696 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1630830 size: 72682 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1666112 size: 77204 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3392418 size: 77461 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3550788 size: 83738 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3392418 size: 77461 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3550788 size: 83738 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801262 size: 69457 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808352 size: 70696 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3392418 size: 77461 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3550788 size: 83738 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2498334 size: 75937 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2589296 size: 81788 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71679 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5688 size: 71768 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3392418 size: 77461 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3550788 size: 83738 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1630830 size: 72682 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1666112 size: 77204 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2498334 size: 75937 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2589296 size: 81788 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801262 size: 69457 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808352 size: 70696 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-flashsv b/tests/ref/seek/vsynth2-flashsv index 8bfb2fc6df..d5762040dd 100644 --- a/tests/ref/seek/vsynth2-flashsv +++ b/tests/ref/seek/vsynth2-flashsv @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:240757 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:219405 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:240757 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:219405 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:11605762 size:254053 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:10902666 size:244577 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4820517 size:245503 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4458630 size:230521 ret:-1 st: 0 flags:1 ts:-0.317000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:8811911 size:253041 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:8234850 size:240794 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: 0.400000 pos:2387452 size:241101 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: 0.400000 pos:2201103 size:221959 ret:-1 st: 0 flags:1 ts:-0.741000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:6302834 size:248927 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:5853927 size:235507 ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:240757 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:219405 ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114712 size:254237 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391926 size:244616 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.760000 pts: 1.760000 pos:10843576 size:253913 +ret: 0 st: 0 flags:1 dts: 1.760000 pts: 1.760000 pos:10170997 size:243403 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.600000 pts: 0.600000 pos:3598805 size:243372 +ret: 0 st: 0 flags:1 dts: 0.600000 pts: 0.600000 pos:3319331 size:226082 ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:240757 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:219405 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114712 size:254237 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391926 size:244616 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:8053716 size:252195 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:7515916 size:239079 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1187821 size:238567 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1098694 size:220236 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:240757 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size:219405 ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114712 size:254237 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391926 size:244616 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.920000 pts: 0.920000 pos:5559238 size:247341 +ret: 0 st: 0 flags:1 dts: 0.920000 pts: 0.920000 pos:5152596 size:233102 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.672000 ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:9572247 size:254219 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:8958219 size:241837 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2870253 size:242377 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2645900 size:223865 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-flv b/tests/ref/seek/vsynth2-flv index 6952a4e375..955b0a2b95 100644 --- a/tests/ref/seek/vsynth2-flv +++ b/tests/ref/seek/vsynth2-flv @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83240 size: 12295 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108765 size: 16158 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52585 size: 11127 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 67812 size: 14392 ret:-1 st: 0 flags:1 ts:-0.317000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83240 size: 12295 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108765 size: 16158 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25960 size: 10089 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32549 size: 12708 ret:-1 st: 0 flags:1 ts:-0.741000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52585 size: 11127 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 67812 size: 14392 ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117158 size: 12730 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155338 size: 17185 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117158 size: 12730 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155338 size: 17185 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25960 size: 10089 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32549 size: 12708 ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117158 size: 12730 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155338 size: 17185 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83240 size: 12295 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108765 size: 16158 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 10380 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 199 size: 12771 ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117158 size: 12730 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155338 size: 17185 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52585 size: 11127 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 67812 size: 14392 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.672000 ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83240 size: 12295 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108765 size: 16158 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25960 size: 10089 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32549 size: 12708 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-h261 b/tests/ref/seek/vsynth2-h261 index 1789adc408..4aa0c43cc9 100644 --- a/tests/ref/seek/vsynth2-h261 +++ b/tests/ref/seek/vsynth2-h261 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82060 size: 10322 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 106950 size: 13195 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44666 size: 9404 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82060 size: 10322 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 106950 size: 13195 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44666 size: 9404 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9645 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82060 size: 10322 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 106950 size: 13195 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44666 size: 9404 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-h263 b/tests/ref/seek/vsynth2-h263 index b92074fa0c..3e0c9245dd 100644 --- a/tests/ref/seek/vsynth2-h263 +++ b/tests/ref/seek/vsynth2-h263 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66792 size: 11128 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 88646 size: 14393 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36438 size: 10090 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66792 size: 11128 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 88646 size: 14393 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36438 size: 10090 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10381 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66792 size: 11128 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 88646 size: 14393 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36438 size: 10090 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-h263p b/tests/ref/seek/vsynth2-h263p index 9d842a665c..673f412d49 100644 --- a/tests/ref/seek/vsynth2-h263p +++ b/tests/ref/seek/vsynth2-h263p @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 size: 40907 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 448856 size: 50481 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 size: 40907 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 448856 size: 50481 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 36208 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 size: 40907 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 448856 size: 50481 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-huffyuv b/tests/ref/seek/vsynth2-huffyuv index 69a37f559b..a3e176b9ca 100644 --- a/tests/ref/seek/vsynth2-huffyuv +++ b/tests/ref/seek/vsynth2-huffyuv @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:129760 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:129760 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6069172 size:128520 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6010684 size:136724 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2579612 size:129192 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2445132 size:126464 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:4778228 size:129424 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:4658492 size:133884 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1160248 size:128504 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1085808 size:121284 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3355284 size:129424 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3211900 size:129428 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:129760 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5553996 size:129016 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5466432 size:135664 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2062492 size:129204 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1944388 size:124456 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:129760 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4260860 size:129280 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4126904 size:132312 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 646908 size:128204 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 604036 size:120044 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:129760 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2838068 size:129268 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2698592 size:127564 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5037024 size:129284 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:4926660 size:134484 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1546172 size:128860 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1451012 size:122720 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-jpegls b/tests/ref/seek/vsynth2-jpegls index 3c0da21283..1b27a3654a 100644 --- a/tests/ref/seek/vsynth2-jpegls +++ b/tests/ref/seek/vsynth2-jpegls @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:164074 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:164074 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7804118 size:176295 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7767024 size:181048 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3172780 size:164643 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3057326 size:163405 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:6052974 size:174097 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:5971676 size:177984 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1402344 size:157283 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1334822 size:150568 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:4170248 size:168401 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:4056260 size:170347 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:164074 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7101754 size:175326 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7045426 size:180307 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2519260 size:162522 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2414840 size:159022 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:164074 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5360818 size:172183 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5265990 size:175400 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 779834 size:154579 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 742066 size:147109 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:164074 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3502828 size:166017 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3385508 size:165810 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:6401452 size:174815 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:6328220 size:178473 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1876416 size:159659 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1789916 size:154383 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-ljpeg b/tests/ref/seek/vsynth2-ljpeg index 92264c9c4e..47f64c6dda 100644 --- a/tests/ref/seek/vsynth2-ljpeg +++ b/tests/ref/seek/vsynth2-ljpeg @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 96069 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 96069 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4481864 size: 94870 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4406068 size:102731 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1902318 size: 95465 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1761620 size: 92236 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:3527724 size: 95724 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:3394414 size: 99800 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 854944 size: 94635 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 778564 size: 87118 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:2475566 size: 95649 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:2323284 size: 95279 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 96069 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:4101338 size: 95353 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:3997920 size:101607 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1520284 size: 95410 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1397770 size: 90251 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 96069 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:3145114 size: 95587 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:2999316 size: 98183 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 477226 size: 94261 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 433426 size: 85897 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 96069 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2093302 size: 95528 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:1946636 size: 93348 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:3719126 size: 95615 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:3594390 size:100410 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1139238 size: 95032 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1041206 size: 88501 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mjpeg b/tests/ref/seek/vsynth2-mjpeg index 59db09a53f..6072ddfb97 100644 --- a/tests/ref/seek/vsynth2-mjpeg +++ b/tests/ref/seek/vsynth2-mjpeg @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 627854 size: 14811 +ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 771990 size: 19172 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 247488 size: 12959 +ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 294112 size: 15816 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 480758 size: 14528 +ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 584836 size: 18250 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 111000 size: 11927 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 130062 size: 14140 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 326672 size: 13489 +ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 391598 size: 16843 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 568652 size: 14746 +ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 696224 size: 18821 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 196416 size: 12719 +ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 232462 size: 15159 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 423482 size: 14119 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 512664 size: 17924 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 63860 size: 11714 +ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 74366 size: 13812 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881 +ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 273508 size: 13131 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 325950 size: 16219 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 509926 size: 14597 +ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 621546 size: 18498 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146958 size: 12168 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 173092 size: 14609 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg1 b/tests/ref/seek/vsynth2-mpeg1 index a85055a270..52eef058ae 100644 --- a/tests/ref/seek/vsynth2-mpeg1 +++ b/tests/ref/seek/vsynth2-mpeg1 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 11963 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124245 size: 11796 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 76694 size: 10792 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 103348 size: 13767 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124245 size: 11796 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 76694 size: 10792 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 103348 size: 13767 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177089 size: 12057 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177089 size: 12057 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177089 size: 12057 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124245 size: 11796 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177089 size: 12057 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 76694 size: 10792 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 103348 size: 13767 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124245 size: 11796 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg1b b/tests/ref/seek/vsynth2-mpeg1b index 3b0b084a74..6e3af809f3 100644 --- a/tests/ref/seek/vsynth2-mpeg1b +++ b/tests/ref/seek/vsynth2-mpeg1b @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 14617 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194420 size: 14837 +ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 101700 size: 16809 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 34797 size: 12009 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 43550 size: 14859 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 101700 size: 16809 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194420 size: 14837 +ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194420 size: 14837 +ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 34797 size: 12009 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 43550 size: 14859 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194420 size: 14837 +ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194420 size: 14837 +ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470 +ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 101700 size: 16809 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-422 b/tests/ref/seek/vsynth2-mpeg2-422 index d06b7cb267..20da5b40c2 100644 --- a/tests/ref/seek/vsynth2-mpeg2-422 +++ b/tests/ref/seek/vsynth2-mpeg2-422 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325162 size: 19936 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349114 size: 20626 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200736 size: 22575 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231211 size: 21764 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265477 size: 21329 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 291275 size: 22607 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 104454 size: 28984 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 128376 size: 34086 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200736 size: 22575 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231211 size: 21764 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325162 size: 19936 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349114 size: 20626 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325162 size: 19936 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349114 size: 20626 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 104454 size: 28984 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 128376 size: 34086 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325162 size: 19936 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349114 size: 20626 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265477 size: 21329 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 291275 size: 22607 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19035 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325162 size: 19936 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349114 size: 20626 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200736 size: 22575 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231211 size: 21764 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265477 size: 21329 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 291275 size: 22607 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200736 size: 22575 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231211 size: 21764 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-idct-int b/tests/ref/seek/vsynth2-mpeg2-idct-int index 698cedf7c5..22c6a15211 100644 --- a/tests/ref/seek/vsynth2-mpeg2-idct-int +++ b/tests/ref/seek/vsynth2-mpeg2-idct-int @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172012 size: 15275 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 105663 size: 13880 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172012 size: 15275 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50226 size: 12380 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 105663 size: 13880 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245898 size: 16121 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245898 size: 16121 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50226 size: 12380 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245898 size: 16121 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172012 size: 15275 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12080 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245898 size: 16121 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 105663 size: 13880 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172012 size: 15275 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50226 size: 12380 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-ilace b/tests/ref/seek/vsynth2-mpeg2-ilace index a2427f3888..f78f374584 100644 --- a/tests/ref/seek/vsynth2-mpeg2-ilace +++ b/tests/ref/seek/vsynth2-mpeg2-ilace @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132607 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177636 size: 15331 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 82152 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 108979 size: 13935 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132607 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177636 size: 15331 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51705 size: 12433 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 82152 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 108979 size: 13935 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188429 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253295 size: 16171 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188429 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253295 size: 16171 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51705 size: 12433 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188429 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253295 size: 16171 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132607 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177636 size: 15331 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188429 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253295 size: 16171 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 82152 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 108979 size: 13935 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132607 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177636 size: 15331 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51705 size: 12433 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd b/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd index 9a623c291c..883125f692 100644 --- a/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd +++ b/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253798 size: 12165 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192233 size: 13300 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 223848 size: 13616 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 98748 size: 29165 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 119717 size: 33100 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192233 size: 13300 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253798 size: 12165 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253798 size: 12165 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 98748 size: 29165 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 119717 size: 33100 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253798 size: 12165 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 223848 size: 13616 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17884 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253798 size: 12165 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192233 size: 13300 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 223848 size: 13616 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192233 size: 13300 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-thread b/tests/ref/seek/vsynth2-mpeg2-thread index d8c9e28c94..462395bc73 100644 --- a/tests/ref/seek/vsynth2-mpeg2-thread +++ b/tests/ref/seek/vsynth2-mpeg2-thread @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158225 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201763 size: 16171 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67790 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83592 size: 13935 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110330 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 138728 size: 15331 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30747 size: 10045 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37622 size: 12433 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67790 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83592 size: 13935 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158225 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201763 size: 16171 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158225 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201763 size: 16171 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30747 size: 10045 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37622 size: 12433 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158225 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201763 size: 16171 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110330 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 138728 size: 15331 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12134 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158225 size: 12232 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201763 size: 16171 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67790 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83592 size: 13935 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110330 size: 11970 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 138728 size: 15331 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67790 size: 10965 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83592 size: 13935 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg2-thread-ivlc b/tests/ref/seek/vsynth2-mpeg2-thread-ivlc index f1909b6afb..0985282717 100644 --- a/tests/ref/seek/vsynth2-mpeg2-thread-ivlc +++ b/tests/ref/seek/vsynth2-mpeg2-thread-ivlc @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157678 size: 11930 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199701 size: 15461 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67723 size: 10791 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82859 size: 13386 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110080 size: 11697 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 137366 size: 14681 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30744 size: 9980 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37320 size: 12056 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67723 size: 10791 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82859 size: 13386 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157678 size: 11930 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199701 size: 15461 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157678 size: 11930 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199701 size: 15461 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30744 size: 9980 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37320 size: 12056 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157678 size: 11930 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199701 size: 15461 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110080 size: 11697 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 137366 size: 14681 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11843 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157678 size: 11930 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199701 size: 15461 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67723 size: 10791 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82859 size: 13386 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110080 size: 11697 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 137366 size: 14681 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67723 size: 10791 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82859 size: 13386 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4 b/tests/ref/seek/vsynth2-mpeg4 index 0600ed0273..36ba46c06c 100644 --- a/tests/ref/seek/vsynth2-mpeg4 +++ b/tests/ref/seek/vsynth2-mpeg4 @@ -1,50 +1,50 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 47228 size: 9634 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 60954 size: 12631 ret: 0 st: 0 flags:1 ts:-0.320000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862 ret: 0 st: 0 flags:1 ts:-0.760000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 47228 size: 9634 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 60954 size: 12631 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106167 size: 11182 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106167 size: 11182 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106167 size: 11182 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106167 size: 11182 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 47228 size: 9634 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 60954 size: 12631 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965 diff --git a/tests/ref/seek/vsynth2-mpeg4-adap b/tests/ref/seek/vsynth2-mpeg4-adap index 87b80ccb46..152d020ff3 100644 --- a/tests/ref/seek/vsynth2-mpeg4-adap +++ b/tests/ref/seek/vsynth2-mpeg4-adap @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174444 size: 16883 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98216 size: 17063 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135586 size: 17525 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 151228 size: 18225 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 59442 size: 17261 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 73890 size: 20238 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98216 size: 17063 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174444 size: 16883 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174444 size: 16883 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 59442 size: 17261 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 73890 size: 20238 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174444 size: 16883 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135586 size: 17525 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 151228 size: 18225 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6855 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174444 size: 16883 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98216 size: 17063 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135586 size: 17525 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 151228 size: 18225 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98216 size: 17063 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-adv b/tests/ref/seek/vsynth2-mpeg4-adv index 676586440a..06d88ae796 100644 --- a/tests/ref/seek/vsynth2-mpeg4-adv +++ b/tests/ref/seek/vsynth2-mpeg4-adv @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91718 size: 11013 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59492 size: 9815 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 75418 size: 12802 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91718 size: 11013 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31932 size: 8753 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59492 size: 9815 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 75418 size: 12802 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31932 size: 8753 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91718 size: 11013 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8653 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59492 size: 9815 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 75418 size: 12802 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91718 size: 11013 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31932 size: 8753 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-error b/tests/ref/seek/vsynth2-mpeg4-error index 322bcabdb3..45550476b1 100644 --- a/tests/ref/seek/vsynth2-mpeg4-error +++ b/tests/ref/seek/vsynth2-mpeg4-error @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 71648 size: 11680 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 100670 size: 17313 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36770 size: 10310 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 71648 size: 11680 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 100670 size: 17313 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36770 size: 10310 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9564 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 71648 size: 11680 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 100670 size: 17313 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36770 size: 10310 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-nr b/tests/ref/seek/vsynth2-mpeg4-nr index 5273ae1862..e0abfe8544 100644 --- a/tests/ref/seek/vsynth2-mpeg4-nr +++ b/tests/ref/seek/vsynth2-mpeg4-nr @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65468 size: 11181 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83222 size: 14678 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35300 size: 9987 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65468 size: 11181 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83222 size: 14678 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35300 size: 9987 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10673 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65468 size: 11181 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83222 size: 14678 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35300 size: 9987 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-qpel b/tests/ref/seek/vsynth2-mpeg4-qpel index 195fb3001d..6f23d126ab 100644 --- a/tests/ref/seek/vsynth2-mpeg4-qpel +++ b/tests/ref/seek/vsynth2-mpeg4-qpel @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141518 size: 15562 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64104 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100356 size: 15057 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 126396 size: 19941 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 32806 size: 11813 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 39736 size: 14805 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64104 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141518 size: 15562 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141518 size: 15562 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 32806 size: 11813 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 39736 size: 14805 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141518 size: 15562 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100356 size: 15057 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 126396 size: 19941 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 11942 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141518 size: 15562 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64104 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100356 size: 15057 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 126396 size: 19941 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64104 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-qprd b/tests/ref/seek/vsynth2-mpeg4-qprd index 4c3c7f501e..675e993a9b 100644 --- a/tests/ref/seek/vsynth2-mpeg4-qprd +++ b/tests/ref/seek/vsynth2-mpeg4-qprd @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211020 size: 14638 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150654 size: 14502 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180770 size: 14371 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 198340 size: 15560 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 93024 size: 29366 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 111330 size: 29024 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150654 size: 14502 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211020 size: 14638 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211020 size: 14638 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 93024 size: 29366 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 111330 size: 29024 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211020 size: 14638 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180770 size: 14371 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 198340 size: 15560 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14873 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211020 size: 14638 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150654 size: 14502 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180770 size: 14371 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 198340 size: 15560 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150654 size: 14502 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-rc b/tests/ref/seek/vsynth2-mpeg4-rc index 5c96c78cdc..21aca4c8ae 100644 --- a/tests/ref/seek/vsynth2-mpeg4-rc +++ b/tests/ref/seek/vsynth2-mpeg4-rc @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207956 size: 13826 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153800 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180948 size: 13326 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 210456 size: 14427 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 94582 size: 32807 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 114894 size: 39545 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153800 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207956 size: 13826 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207956 size: 13826 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 94582 size: 32807 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 114894 size: 39545 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207956 size: 13826 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180948 size: 13326 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 210456 size: 14427 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15766 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207956 size: 13826 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153800 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180948 size: 13326 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 210456 size: 14427 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153800 size: 13382 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-mpeg4-thread b/tests/ref/seek/vsynth2-mpeg4-thread index 8c4f663184..2b0f0d310c 100644 --- a/tests/ref/seek/vsynth2-mpeg4-thread +++ b/tests/ref/seek/vsynth2-mpeg4-thread @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228210 size: 16324 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162150 size: 16475 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195320 size: 16136 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 215778 size: 16807 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 97832 size: 33332 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 117134 size: 37486 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162150 size: 16475 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228210 size: 16324 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228210 size: 16324 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 97832 size: 33332 +ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 117134 size: 37486 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228210 size: 16324 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195320 size: 16136 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 215778 size: 16807 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 14874 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228210 size: 16324 +ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162150 size: 16475 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195320 size: 16136 +ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 215778 size: 16807 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162150 size: 16475 +ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-msmpeg4 b/tests/ref/seek/vsynth2-msmpeg4 index 323f96a959..c2a708166a 100644 --- a/tests/ref/seek/vsynth2-msmpeg4 +++ b/tests/ref/seek/vsynth2-msmpeg4 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82508 size: 10783 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53846 size: 9624 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 68772 size: 12670 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82508 size: 10783 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29388 size: 8502 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53846 size: 9624 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 68772 size: 12670 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29388 size: 8502 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82508 size: 10783 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8637 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53846 size: 9624 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 68772 size: 12670 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82508 size: 10783 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29388 size: 8502 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-msmpeg4v2 b/tests/ref/seek/vsynth2-msmpeg4v2 index 177898ebac..bf992fdc3a 100644 --- a/tests/ref/seek/vsynth2-msmpeg4v2 +++ b/tests/ref/seek/vsynth2-msmpeg4v2 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83870 size: 11165 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54778 size: 10010 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69622 size: 13068 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83870 size: 11165 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29770 size: 8869 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54778 size: 10010 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69622 size: 13068 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29770 size: 8869 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83870 size: 11165 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 9003 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54778 size: 10010 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69622 size: 13068 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83870 size: 11165 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29770 size: 8869 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-roqvideo b/tests/ref/seek/vsynth2-roqvideo index d003a37404..6ed78b54ed 100644 --- a/tests/ref/seek/vsynth2-roqvideo +++ b/tests/ref/seek/vsynth2-roqvideo @@ -1,4 +1,4 @@ -ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.000000 pos: 24 size: 26082 +ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.000000 pos: 24 size: 25810 ret:-1 st:-1 flags:0 ts:-1.000000 ret:-1 st:-1 flags:1 ts: 1.894167 ret:-1 st: 0 flags:0 ts: 0.800000 diff --git a/tests/ref/seek/vsynth2-rv10 b/tests/ref/seek/vsynth2-rv10 index 123b03c1cc..e31a7f9f10 100644 --- a/tests/ref/seek/vsynth2-rv10 +++ b/tests/ref/seek/vsynth2-rv10 @@ -1,53 +1,52 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 +ret:-1 st:-1 flags:1 ts: 1.894167 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400 ret: 0 st: 0 flags:1 ts:-0.317000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716 ret: 0 st: 0 flags:1 ts:-0.741000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400 ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716 ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 ret: 0 st: 0 flags:0 ts: 2.672000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139556 size: 12738 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194 ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779 diff --git a/tests/ref/seek/vsynth2-rv20 b/tests/ref/seek/vsynth2-rv20 index f2b24e300e..0a69c7165e 100644 --- a/tests/ref/seek/vsynth2-rv20 +++ b/tests/ref/seek/vsynth2-rv20 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120 ret: 0 st: 0 flags:1 ts:-0.317000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414 ret: 0 st: 0 flags:1 ts:-0.741000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120 ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414 ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 ret: 0 st: 0 flags:0 ts: 2.672000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139145 size: 11803 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859 ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720 diff --git a/tests/ref/seek/vsynth2-svq1 b/tests/ref/seek/vsynth2-svq1 index 17bb99e618..5b90ec8049 100644 --- a/tests/ref/seek/vsynth2-svq1 +++ b/tests/ref/seek/vsynth2-svq1 @@ -1,50 +1,50 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 392428 size: 28568 ret: 0 st: 0 flags:1 ts:-0.320000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544 ret: 0 st: 0 flags:1 ts:-0.760000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 392428 size: 28568 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 392428 size: 28568 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188 diff --git a/tests/ref/seek/vsynth2-wmv1 b/tests/ref/seek/vsynth2-wmv1 index 85465b37a5..47b79b80ee 100644 --- a/tests/ref/seek/vsynth2-wmv1 +++ b/tests/ref/seek/vsynth2-wmv1 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83742 size: 11099 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54758 size: 9931 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69132 size: 13137 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83742 size: 11099 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29794 size: 8796 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54758 size: 9931 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69132 size: 13137 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29794 size: 8796 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83742 size: 11099 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 8990 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54758 size: 9931 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69132 size: 13137 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83742 size: 11099 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29794 size: 8796 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/seek/vsynth2-wmv2 b/tests/ref/seek/vsynth2-wmv2 index 53680d0f7e..3ba67649e1 100644 --- a/tests/ref/seek/vsynth2-wmv2 +++ b/tests/ref/seek/vsynth2-wmv2 @@ -1,46 +1,46 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83764 size: 11170 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54534 size: 9989 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69348 size: 13297 ret:-1 st: 0 flags:1 ts:-0.320000 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83764 size: 11170 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153 ret: 0 st: 0 flags:0 ts: 0.360000 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29588 size: 8839 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342 ret:-1 st: 0 flags:1 ts:-0.760000 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54534 size: 9989 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69348 size: 13297 ret: 0 st: 0 flags:0 ts:-0.040000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st: 0 flags:1 ts: 2.840000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116062 size: 11554 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116062 size: 11554 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29588 size: 8839 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116062 size: 11554 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83764 size: 11170 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st: 0 flags:0 ts:-0.920000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8917 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264 ret: 0 st: 0 flags:1 ts: 2.000000 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116062 size: 11554 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54534 size: 9989 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69348 size: 13297 ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.680000 ret: 0 st: 0 flags:1 ts: 1.560000 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83764 size: 11170 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29588 size: 8839 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342 ret:-1 st:-1 flags:1 ts:-0.645825 diff --git a/tests/ref/vsynth/vsynth2-asv1 b/tests/ref/vsynth/vsynth2-asv1 index 282435b06b..de8892fcc1 100644 --- a/tests/ref/vsynth/vsynth2-asv1 +++ b/tests/ref/vsynth/vsynth2-asv1 @@ -1,4 +1,4 @@ -ae8d79e0e421138a9a67a148a42c26c5 *tests/data/fate/vsynth2-asv1.avi -832500 tests/data/fate/vsynth2-asv1.avi -c96ff7fd17c52f99ddb7922a4cb9168f *tests/data/fate/vsynth2-asv1.out.rawvideo -stddev: 10.47 PSNR: 27.73 MAXDIFF: 98 bytes: 7603200/ 7603200 +50f5bba0ab3f7ebe687619368b20d29a *tests/data/fate/vsynth2-asv1.avi +1008588 tests/data/fate/vsynth2-asv1.avi +bd8e5390a51f062d3ec9545fc93e7ca2 *tests/data/fate/vsynth2-asv1.out.rawvideo +stddev: 12.39 PSNR: 26.26 MAXDIFF: 110 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-asv2 b/tests/ref/vsynth/vsynth2-asv2 index 89428628f7..b7a8f1345d 100644 --- a/tests/ref/vsynth/vsynth2-asv2 +++ b/tests/ref/vsynth/vsynth2-asv2 @@ -1,4 +1,4 @@ -ccf6762758395eee9a29ef7a4ef3cd58 *tests/data/fate/vsynth2-asv2.avi -789060 tests/data/fate/vsynth2-asv2.avi -74a78015b64b2cf8cb9da2e44f508a69 *tests/data/fate/vsynth2-asv2.out.rawvideo -stddev: 10.28 PSNR: 27.89 MAXDIFF: 95 bytes: 7603200/ 7603200 +fc746339bb82e299d14049ea8c7e9a4e *tests/data/fate/vsynth2-asv2.avi +956832 tests/data/fate/vsynth2-asv2.avi +4b3fe82b31221ac2b0f292760017668f *tests/data/fate/vsynth2-asv2.out.rawvideo +stddev: 12.19 PSNR: 26.41 MAXDIFF: 111 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-cljr b/tests/ref/vsynth/vsynth2-cljr index 39c74c3fd3..b372fa43d7 100644 --- a/tests/ref/vsynth/vsynth2-cljr +++ b/tests/ref/vsynth/vsynth2-cljr @@ -1,4 +1,4 @@ -5745ff1d80a6f454ae448dcf0bce50e0 *tests/data/fate/vsynth2-cljr.avi +624a1bcef30a52b39f616d73ded8bb30 *tests/data/fate/vsynth2-cljr.avi 5075648 tests/data/fate/vsynth2-cljr.avi -cfe7802bf34aafed7df5dcaa5126ef23 *tests/data/fate/vsynth2-cljr.out.rawvideo -stddev: 3.69 PSNR: 36.78 MAXDIFF: 22 bytes: 7603200/ 7603200 +273b2f8fb471602a683049f91f7c4cbb *tests/data/fate/vsynth2-cljr.out.rawvideo +stddev: 3.69 PSNR: 36.79 MAXDIFF: 36 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-dnxhd-1080i b/tests/ref/vsynth/vsynth2-dnxhd-1080i index 35db6d2789..4a4424b6ab 100644 --- a/tests/ref/vsynth/vsynth2-dnxhd-1080i +++ b/tests/ref/vsynth/vsynth2-dnxhd-1080i @@ -1,4 +1,4 @@ -c456f2a7ac9435ea5bfea86bc69c1c41 *tests/data/fate/vsynth2-dnxhd-1080i.mov +1bc9fe8d89bae57ed54ae4d5b5262209 *tests/data/fate/vsynth2-dnxhd-1080i.mov 3031875 tests/data/fate/vsynth2-dnxhd-1080i.mov -42262a2325441b38b3b3c8a42d888e7d *tests/data/fate/vsynth2-dnxhd-1080i.out.rawvideo -stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 7603200/ 760320 +da7f9fbf6034c3a99a1467e77dd62f6b *tests/data/fate/vsynth2-dnxhd-1080i.out.rawvideo +stddev: 1.53 PSNR: 44.43 MAXDIFF: 31 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-dnxhd-720p b/tests/ref/vsynth/vsynth2-dnxhd-720p index afc6fde333..a6e3ae0c33 100644 --- a/tests/ref/vsynth/vsynth2-dnxhd-720p +++ b/tests/ref/vsynth/vsynth2-dnxhd-720p @@ -1,4 +1,4 @@ -58e07cc6ae0a2d36787044d0e82708a6 *tests/data/fate/vsynth2-dnxhd-720p.dnxhd +71c7491a41545882b36f07ee98021b4b *tests/data/fate/vsynth2-dnxhd-720p.dnxhd 2293760 tests/data/fate/vsynth2-dnxhd-720p.dnxhd -ab601eaafef74d80d3d20b780dddd836 *tests/data/fate/vsynth2-dnxhd-720p.out.rawvideo -stddev: 1.36 PSNR: 45.45 MAXDIFF: 127 bytes: 7603200/ 760320 +adef978dc9c9e4f10dc7c30418af62af *tests/data/fate/vsynth2-dnxhd-720p.out.rawvideo +stddev: 6.69 PSNR: 31.62 MAXDIFF: 171 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-dnxhd-720p-10bit b/tests/ref/vsynth/vsynth2-dnxhd-720p-10bit index f087c133b1..749d5f0d28 100644 --- a/tests/ref/vsynth/vsynth2-dnxhd-720p-10bit +++ b/tests/ref/vsynth/vsynth2-dnxhd-720p-10bit @@ -1,4 +1,4 @@ -4b57da2c0c1280469ff3579f7151c227 *tests/data/fate/vsynth2-dnxhd-720p-10bit.dnxhd +4798978f178cdb91203cda27e76ce75e *tests/data/fate/vsynth2-dnxhd-720p-10bit.dnxhd 2293760 tests/data/fate/vsynth2-dnxhd-720p-10bit.dnxhd -31a6aa8b8702e85fa3b48e73f035c4e4 *tests/data/fate/vsynth2-dnxhd-720p-10bit.out.rawvideo -stddev: 1.35 PSNR: 45.46 MAXDIFF: 23 bytes: 7603200/ 760320 +7ce1b7e73432498b530c6aa970566757 *tests/data/fate/vsynth2-dnxhd-720p-10bit.out.rawvideo +stddev: 1.56 PSNR: 44.24 MAXDIFF: 31 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-dnxhd-720p-rd b/tests/ref/vsynth/vsynth2-dnxhd-720p-rd index c1b8f9630d..d9500e33cd 100644 --- a/tests/ref/vsynth/vsynth2-dnxhd-720p-rd +++ b/tests/ref/vsynth/vsynth2-dnxhd-720p-rd @@ -1,4 +1,4 @@ -092ffb7b8cf3c11556bb05dbb8b476ac *tests/data/fate/vsynth2-dnxhd-720p-rd.dnxhd +819a7714098e098981bf08253ef2e490 *tests/data/fate/vsynth2-dnxhd-720p-rd.dnxhd 2293760 tests/data/fate/vsynth2-dnxhd-720p-rd.dnxhd -33547ca318acff9448cba719cb99296d *tests/data/fate/vsynth2-dnxhd-720p-rd.out.rawvideo -stddev: 1.32 PSNR: 45.66 MAXDIFF: 22 bytes: 7603200/ 760320 +a05c35b99e5e74a9c8b3a9c66da01775 *tests/data/fate/vsynth2-dnxhd-720p-rd.out.rawvideo +stddev: 1.53 PSNR: 44.39 MAXDIFF: 31 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-dv b/tests/ref/vsynth/vsynth2-dv index 2aac5ff815..fd1f3c6778 100644 --- a/tests/ref/vsynth/vsynth2-dv +++ b/tests/ref/vsynth/vsynth2-dv @@ -1,4 +1,4 @@ -bfa766f89bfeabc0ae1044f3954bed52 *tests/data/fate/vsynth2-dv.dv +dbea9acebf1bd2e3a827ab37777ff4bf *tests/data/fate/vsynth2-dv.dv 7200000 tests/data/fate/vsynth2-dv.dv -7ec62bd3350a6848364669e6e1e4b9cc *tests/data/fate/vsynth2-dv.out.rawvideo -stddev: 1.71 PSNR: 43.47 MAXDIFF: 33 bytes: 7603200/ 7603200 +be0a13c96af0065541aa7b3f6a1d688f *tests/data/fate/vsynth2-dv.out.rawvideo +stddev: 1.99 PSNR: 42.11 MAXDIFF: 38 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-dv-411 b/tests/ref/vsynth/vsynth2-dv-411 index 00ecace283..608ee665eb 100644 --- a/tests/ref/vsynth/vsynth2-dv-411 +++ b/tests/ref/vsynth/vsynth2-dv-411 @@ -1,4 +1,4 @@ -00a9d8683ac6826af41bcf7223fb0389 *tests/data/fate/vsynth2-dv-411.dv +1bf5ee0be63310b567fe01235c6b81d7 *tests/data/fate/vsynth2-dv-411.dv 7200000 tests/data/fate/vsynth2-dv-411.dv -3cd4b85065d67bfb7fbab3bea4039711 *tests/data/fate/vsynth2-dv-411.out.rawvideo -stddev: 2.89 PSNR: 38.91 MAXDIFF: 45 bytes: 7603200/ 7603200 +653619342dbecd1e1314fa1eed0488fa *tests/data/fate/vsynth2-dv-411.out.rawvideo +stddev: 3.48 PSNR: 37.28 MAXDIFF: 56 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-dv-50 b/tests/ref/vsynth/vsynth2-dv-50 index e7e5dc1245..0ba19befc4 100644 --- a/tests/ref/vsynth/vsynth2-dv-50 +++ b/tests/ref/vsynth/vsynth2-dv-50 @@ -1,4 +1,4 @@ -61e31c79e8949b25c849753a0785b0d7 *tests/data/fate/vsynth2-dv-50.dv +ef9ec02d39b706ce491c027567ffb41a *tests/data/fate/vsynth2-dv-50.dv 14400000 tests/data/fate/vsynth2-dv-50.dv -af3f2dd5ab62c1a1d98b07d4aeb6852f *tests/data/fate/vsynth2-dv-50.out.rawvideo -stddev: 0.82 PSNR: 49.82 MAXDIFF: 12 bytes: 7603200/ 7603200 +8ba68c2a400fd4974a8489dcecd3d82c *tests/data/fate/vsynth2-dv-50.out.rawvideo +stddev: 0.88 PSNR: 49.21 MAXDIFF: 17 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-ffv1 b/tests/ref/vsynth/vsynth2-ffv1 index 8263b01afd..4dc2169443 100644 --- a/tests/ref/vsynth/vsynth2-ffv1 +++ b/tests/ref/vsynth/vsynth2-ffv1 @@ -1,4 +1,4 @@ -9d8486fc8a260204d8ee3212d95915b5 *tests/data/fate/vsynth2-ffv1.avi -3546258 tests/data/fate/vsynth2-ffv1.avi -dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ffv1.out.rawvideo +4af788aeb692573717fe205f3ba20a33 *tests/data/fate/vsynth2-ffv1.avi +3716494 tests/data/fate/vsynth2-ffv1.avi +36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ffv1.out.rawvideo stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-ffvhuff b/tests/ref/vsynth/vsynth2-ffvhuff index 8daed2bd8a..40c29bbb76 100644 --- a/tests/ref/vsynth/vsynth2-ffvhuff +++ b/tests/ref/vsynth/vsynth2-ffvhuff @@ -1,4 +1,4 @@ -f6a213ef136012a3d189d09468d80dd3 *tests/data/fate/vsynth2-ffvhuff.avi -4988044 tests/data/fate/vsynth2-ffvhuff.avi -dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ffvhuff.out.rawvideo +9884966783a0d092b45462ea586df2f8 *tests/data/fate/vsynth2-ffvhuff.avi +4951180 tests/data/fate/vsynth2-ffvhuff.avi +36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ffvhuff.out.rawvideo stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-flashsv b/tests/ref/vsynth/vsynth2-flashsv index cbe79e6905..7cc9a78ed0 100644 --- a/tests/ref/vsynth/vsynth2-flashsv +++ b/tests/ref/vsynth/vsynth2-flashsv @@ -1,4 +1,4 @@ -0667077971e0cb63b5f49c580006e90e *tests/data/fate/vsynth2-flashsv.flv -12368953 tests/data/fate/vsynth2-flashsv.flv -592b3321994e26a990deb3a0a1415de9 *tests/data/fate/vsynth2-flashsv.out.rawvideo -stddev: 0.65 PSNR: 51.84 MAXDIFF: 14 bytes: 7603200/ 7603200 +f4b45770dd93b43b4077532e8ef90bfc *tests/data/fate/vsynth2-flashsv.flv +11636546 tests/data/fate/vsynth2-flashsv.flv +eed2322f11b95fc7abe5356306f00d97 *tests/data/fate/vsynth2-flashsv.out.rawvideo +stddev: 1.21 PSNR: 46.42 MAXDIFF: 20 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-flv b/tests/ref/vsynth/vsynth2-flv index 6864a1ba40..aca74dc228 100644 --- a/tests/ref/vsynth/vsynth2-flv +++ b/tests/ref/vsynth/vsynth2-flv @@ -1,4 +1,4 @@ -2edc92093d36506bcc0a5c0e17e86113 *tests/data/fate/vsynth2-flv.flv -131360 tests/data/fate/vsynth2-flv.flv -8999c8264fb0941561f64c4a736e9d88 *tests/data/fate/vsynth2-flv.out.rawvideo -stddev: 5.33 PSNR: 33.59 MAXDIFF: 80 bytes: 7603200/ 7603200 +707da24b9a6f5dd7d8dc4e27bdb35ebe *tests/data/fate/vsynth2-flv.flv +174677 tests/data/fate/vsynth2-flv.flv +c6e9b6c165558d052541309e48b5f551 *tests/data/fate/vsynth2-flv.out.rawvideo +stddev: 6.02 PSNR: 32.53 MAXDIFF: 83 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-h261 b/tests/ref/vsynth/vsynth2-h261 index 71ea191c7c..2c3d99b3ae 100644 --- a/tests/ref/vsynth/vsynth2-h261 +++ b/tests/ref/vsynth/vsynth2-h261 @@ -1,4 +1,4 @@ -921e06dffd04667d336449c7cd1c6589 *tests/data/fate/vsynth2-h261.avi -191074 tests/data/fate/vsynth2-h261.avi -db7ceff174823b98834faa2320ca89ac *tests/data/fate/vsynth2-h261.out.rawvideo -stddev: 6.37 PSNR: 32.03 MAXDIFF: 77 bytes: 7603200/ 7603200 +b5187bd5be8b422ff220f297de90fbcb *tests/data/fate/vsynth2-h261.avi +257928 tests/data/fate/vsynth2-h261.avi +1a9bb0d52bd24cb62162c5e3c2aed317 *tests/data/fate/vsynth2-h261.out.rawvideo +stddev: 7.21 PSNR: 30.97 MAXDIFF: 96 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-h263 b/tests/ref/vsynth/vsynth2-h263 index b2ce3706c5..ce63aab7e7 100644 --- a/tests/ref/vsynth/vsynth2-h263 +++ b/tests/ref/vsynth/vsynth2-h263 @@ -1,4 +1,4 @@ -329c0318b8727d66946ec729c6e960fc *tests/data/fate/vsynth2-h263.avi -160094 tests/data/fate/vsynth2-h263.avi -61213b91b359697ebcefb9e0a53ac54a *tests/data/fate/vsynth2-h263.out.rawvideo -stddev: 5.43 PSNR: 33.42 MAXDIFF: 77 bytes: 7603200/ 7603200 +350cf3bdc9b0ddbac5648d3343f6311f *tests/data/fate/vsynth2-h263.avi +216468 tests/data/fate/vsynth2-h263.avi +4d9c35b109b48f49a62d2a9208e3f0e7 *tests/data/fate/vsynth2-h263.out.rawvideo +stddev: 6.12 PSNR: 32.39 MAXDIFF: 83 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-h263-obmc b/tests/ref/vsynth/vsynth2-h263-obmc index 67fd2fddfd..40ab3f5f68 100644 --- a/tests/ref/vsynth/vsynth2-h263-obmc +++ b/tests/ref/vsynth/vsynth2-h263-obmc @@ -1,4 +1,4 @@ -3abbe86e18ef9d407cc3817dd31ebeba *tests/data/fate/vsynth2-h263-obmc.avi -154716 tests/data/fate/vsynth2-h263-obmc.avi -6f326547cf1cbd95a8c0a5ddce9eb71a *tests/data/fate/vsynth2-h263-obmc.out.rawvideo -stddev: 5.39 PSNR: 33.49 MAXDIFF: 82 bytes: 7603200/ 7603200 +c42dc221b17353b814c72202eb2d9e54 *tests/data/fate/vsynth2-h263-obmc.avi +208520 tests/data/fate/vsynth2-h263-obmc.avi +cec8aa66f5ee1c8569f40b572c1ea100 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo +stddev: 6.10 PSNR: 32.41 MAXDIFF: 90 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-h263p b/tests/ref/vsynth/vsynth2-h263p index 826dcd15ce..5a72e729d1 100644 --- a/tests/ref/vsynth/vsynth2-h263p +++ b/tests/ref/vsynth/vsynth2-h263p @@ -1,4 +1,4 @@ -865ca965ab4fdfe225db7de3d23b4ad8 *tests/data/fate/vsynth2-h263p.avi -868006 tests/data/fate/vsynth2-h263p.avi -4b0ee791f280029dc03c528f76f195d4 *tests/data/fate/vsynth2-h263p.out.rawvideo -stddev: 1.91 PSNR: 42.50 MAXDIFF: 19 bytes: 7603200/ 7603200 +a0527f9eab97e5e6543a5feb901283d0 *tests/data/fate/vsynth2-h263p.avi +1134962 tests/data/fate/vsynth2-h263p.avi +66e8c0bd40918f970e62b6cdd7df79a5 *tests/data/fate/vsynth2-h263p.out.rawvideo +stddev: 2.01 PSNR: 42.04 MAXDIFF: 21 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-huffyuv b/tests/ref/vsynth/vsynth2-huffyuv index 7d062dd3cc..0d4f1f92e0 100644 --- a/tests/ref/vsynth/vsynth2-huffyuv +++ b/tests/ref/vsynth/vsynth2-huffyuv @@ -1,4 +1,4 @@ -30d509aca4a7298cf7667581a5e37671 *tests/data/fate/vsynth2-huffyuv.avi -6455220 tests/data/fate/vsynth2-huffyuv.avi -dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-huffyuv.out.rawvideo +37c68caa7a0bd66a7511e6439c1ada49 *tests/data/fate/vsynth2-huffyuv.avi +6422324 tests/data/fate/vsynth2-huffyuv.avi +36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-huffyuv.out.rawvideo stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-jpegls b/tests/ref/vsynth/vsynth2-jpegls index 75ad4030db..fba01fe610 100644 --- a/tests/ref/vsynth/vsynth2-jpegls +++ b/tests/ref/vsynth/vsynth2-jpegls @@ -1,4 +1,4 @@ -f34315ed0e30cf4d94dd21ff1d4cea1b *tests/data/fate/vsynth2-jpegls.avi -8334618 tests/data/fate/vsynth2-jpegls.avi -592b3321994e26a990deb3a0a1415de9 *tests/data/fate/vsynth2-jpegls.out.rawvideo -stddev: 0.65 PSNR: 51.84 MAXDIFF: 14 bytes: 7603200/ 7603200 +d5901351df4887fd45c6e5da9bdaffcf *tests/data/fate/vsynth2-jpegls.avi +8311644 tests/data/fate/vsynth2-jpegls.avi +eed2322f11b95fc7abe5356306f00d97 *tests/data/fate/vsynth2-jpegls.out.rawvideo +stddev: 1.21 PSNR: 46.42 MAXDIFF: 20 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-ljpeg b/tests/ref/vsynth/vsynth2-ljpeg index a7b8a2d245..fe78d715e8 100644 --- a/tests/ref/vsynth/vsynth2-ljpeg +++ b/tests/ref/vsynth/vsynth2-ljpeg @@ -1,4 +1,4 @@ -5d603cecd59db0f255a53bda837a6bae *tests/data/fate/vsynth2-ljpeg.avi -4766902 tests/data/fate/vsynth2-ljpeg.avi -dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ljpeg.out.rawvideo +5198a8578e3a4a82a622eaf91ac13548 *tests/data/fate/vsynth2-ljpeg.avi +4715702 tests/data/fate/vsynth2-ljpeg.avi +36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ljpeg.out.rawvideo stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mjpeg b/tests/ref/vsynth/vsynth2-mjpeg index 981d01bd50..4fc585893d 100644 --- a/tests/ref/vsynth/vsynth2-mjpeg +++ b/tests/ref/vsynth/vsynth2-mjpeg @@ -1,4 +1,4 @@ -ba05f4fad7f34a96c77964e8cdf9d5c0 *tests/data/fate/vsynth2-mjpeg.avi -673212 tests/data/fate/vsynth2-mjpeg.avi -a96a4e15ffcb13e44360df642d049496 *tests/data/fate/vsynth2-mjpeg.out.rawvideo -stddev: 4.32 PSNR: 35.40 MAXDIFF: 49 bytes: 7603200/ 7603200 +972d25dee3c6fe965304fa34e2f75f8a *tests/data/fate/vsynth2-mjpeg.avi +830288 tests/data/fate/vsynth2-mjpeg.avi +5f979b021284f8b2868f558f6cc593fe *tests/data/fate/vsynth2-mjpeg.out.rawvideo +stddev: 4.87 PSNR: 34.37 MAXDIFF: 55 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg1 b/tests/ref/vsynth/vsynth2-mpeg1 index a9759732fc..eebc514546 100644 --- a/tests/ref/vsynth/vsynth2-mpeg1 +++ b/tests/ref/vsynth/vsynth2-mpeg1 @@ -1,4 +1,4 @@ -73ca6f1deab02d1d67a0e8495c026a9e *tests/data/fate/vsynth2-mpeg1.mpeg1video -192783 tests/data/fate/vsynth2-mpeg1.mpeg1video -56147e94b12f08df7213e610e177823d *tests/data/fate/vsynth2-mpeg1.out.rawvideo -stddev: 4.95 PSNR: 34.22 MAXDIFF: 57 bytes: 7603200/ 7603200 +9daec4f4e4b6fb8960c3509c84eae0c7 *tests/data/fate/vsynth2-mpeg1.mpeg1video +262171 tests/data/fate/vsynth2-mpeg1.mpeg1video +33916bea6d2bc5db93aaf38ee706ba46 *tests/data/fate/vsynth2-mpeg1.out.rawvideo +stddev: 5.54 PSNR: 33.26 MAXDIFF: 77 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg1b b/tests/ref/vsynth/vsynth2-mpeg1b index 4b92ac570a..4aab85ecce 100644 --- a/tests/ref/vsynth/vsynth2-mpeg1b +++ b/tests/ref/vsynth/vsynth2-mpeg1b @@ -1,4 +1,4 @@ -e026a2fef80c9679776d2b5c8be09338 *tests/data/fate/vsynth2-mpeg1b.mpeg1video -225198 tests/data/fate/vsynth2-mpeg1b.mpeg1video -1150495f4bd487486ee53326c42d0bb8 *tests/data/fate/vsynth2-mpeg1b.out.rawvideo -stddev: 4.10 PSNR: 35.86 MAXDIFF: 59 bytes: 7603200/ 7603200 +30d6d3f9b7b4234e74d3ed22c012ab31 *tests/data/fate/vsynth2-mpeg1b.mpeg1video +298135 tests/data/fate/vsynth2-mpeg1b.mpeg1video +bbac65e2e1fd7e14d83f50072e188852 *tests/data/fate/vsynth2-mpeg1b.out.rawvideo +stddev: 4.60 PSNR: 34.87 MAXDIFF: 77 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2 b/tests/ref/vsynth/vsynth2-mpeg2 index a2a2ca6f9a..bc8e94989e 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2 +++ b/tests/ref/vsynth/vsynth2-mpeg2 @@ -1,4 +1,4 @@ -2d55ce623a7be4e8136f80266e487678 *tests/data/fate/vsynth2-mpeg2.mpeg2video -198667 tests/data/fate/vsynth2-mpeg2.mpeg2video -b7cae8a1f751b821cddcbe4d5dbc518c *tests/data/fate/vsynth2-mpeg2.out.rawvideo -stddev: 4.96 PSNR: 34.20 MAXDIFF: 59 bytes: 7603200/ 7603200 +014f1226392d61fda9032ef14d67a8cb *tests/data/fate/vsynth2-mpeg2.mpeg2video +268169 tests/data/fate/vsynth2-mpeg2.mpeg2video +5887392ff0a05babc480e9f29a1797a3 *tests/data/fate/vsynth2-mpeg2.out.rawvideo +stddev: 5.55 PSNR: 33.23 MAXDIFF: 77 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-422 b/tests/ref/vsynth/vsynth2-mpeg2-422 index 2405cf0c8e..cbcdab6484 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-422 +++ b/tests/ref/vsynth/vsynth2-mpeg2-422 @@ -1,4 +1,4 @@ -2c8e33c2d2efab86fc16a195f6877682 *tests/data/fate/vsynth2-mpeg2-422.mpeg2video -356124 tests/data/fate/vsynth2-mpeg2-422.mpeg2video -df6e54e2d8a4feb8382029286857ca6d *tests/data/fate/vsynth2-mpeg2-422.out.rawvideo -stddev: 3.16 PSNR: 38.13 MAXDIFF: 49 bytes: 7603200/ 7603200 +7ea009428328d714f487078e8242b7e0 *tests/data/fate/vsynth2-mpeg2-422.mpeg2video +379334 tests/data/fate/vsynth2-mpeg2-422.mpeg2video +4fa5ef85867d7fbe441dafc0d57717a9 *tests/data/fate/vsynth2-mpeg2-422.out.rawvideo +stddev: 4.16 PSNR: 35.73 MAXDIFF: 70 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-idct-int b/tests/ref/vsynth/vsynth2-mpeg2-idct-int index 83874b14d8..c47d5d6b26 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-idct-int +++ b/tests/ref/vsynth/vsynth2-mpeg2-idct-int @@ -1,4 +1,4 @@ -f979bcca866e6e4cad5dc6cb06e56cfb *tests/data/fate/vsynth2-mpeg2-idct-int.mpeg2video -198041 tests/data/fate/vsynth2-mpeg2-idct-int.mpeg2video -92794e70e4a19a494f10efe353d9895d *tests/data/fate/vsynth2-mpeg2-idct-int.out.rawvideo -stddev: 4.97 PSNR: 34.19 MAXDIFF: 58 bytes: 7603200/ 7603200 +cda8de3a119b45f3f5154a8682fd2f8f *tests/data/fate/vsynth2-mpeg2-idct-int.mpeg2video +267370 tests/data/fate/vsynth2-mpeg2-idct-int.mpeg2video +b750f48d58f157da94613fe92012e7a5 *tests/data/fate/vsynth2-mpeg2-idct-int.out.rawvideo +stddev: 5.56 PSNR: 33.22 MAXDIFF: 77 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-ilace b/tests/ref/vsynth/vsynth2-mpeg2-ilace index e488bc545b..3ac1fe5a0a 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-ilace +++ b/tests/ref/vsynth/vsynth2-mpeg2-ilace @@ -1,4 +1,4 @@ -f90197a8b6e62ae25f82625337f27240 *tests/data/fate/vsynth2-mpeg2-ilace.mpeg2video -204579 tests/data/fate/vsynth2-mpeg2-ilace.mpeg2video -ea5057b60146c06d40449cdfc686bf13 *tests/data/fate/vsynth2-mpeg2-ilace.out.rawvideo -stddev: 4.98 PSNR: 34.18 MAXDIFF: 65 bytes: 7603200/ 7603200 +15784eab76d7c614da9751d65b8b3dd2 *tests/data/fate/vsynth2-mpeg2-ilace.mpeg2video +274954 tests/data/fate/vsynth2-mpeg2-ilace.mpeg2video +fe069b1be5c6aa5808c0840008485912 *tests/data/fate/vsynth2-mpeg2-ilace.out.rawvideo +stddev: 5.57 PSNR: 33.20 MAXDIFF: 77 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd b/tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd index 30e129bafa..9d47f8c3fe 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd +++ b/tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd @@ -1,4 +1,4 @@ -1ba5efeb53fab7b4b71edc96d86f6c91 *tests/data/fate/vsynth2-mpeg2-ivlc-qprd.mpeg2video -244694 tests/data/fate/vsynth2-mpeg2-ivlc-qprd.mpeg2video -b26e21599dee48a174bdbc40b2817e55 *tests/data/fate/vsynth2-mpeg2-ivlc-qprd.out.rawvideo -stddev: 4.15 PSNR: 35.76 MAXDIFF: 74 bytes: 7603200/ 7603200 +85933176f843eec48a84aa62b56447ca *tests/data/fate/vsynth2-mpeg2-ivlc-qprd.mpeg2video +269721 tests/data/fate/vsynth2-mpeg2-ivlc-qprd.mpeg2video +322bf95092c06d32e993fca9b3eb41f0 *tests/data/fate/vsynth2-mpeg2-ivlc-qprd.out.rawvideo +stddev: 5.54 PSNR: 33.25 MAXDIFF: 94 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-thread b/tests/ref/vsynth/vsynth2-mpeg2-thread index f43cdbc72d..da7d605e86 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-thread +++ b/tests/ref/vsynth/vsynth2-mpeg2-thread @@ -1,4 +1,4 @@ -889c754a42d7689b228853e1ece6d345 *tests/data/fate/vsynth2-mpeg2-thread.mpeg2video -179650 tests/data/fate/vsynth2-mpeg2-thread.mpeg2video -8c6a7ed2eb73bd18fd2bb9829464100d *tests/data/fate/vsynth2-mpeg2-thread.out.rawvideo -stddev: 4.72 PSNR: 34.65 MAXDIFF: 72 bytes: 7603200/ 7603200 +d87459988f4011c4ce362f3baf7c68f6 *tests/data/fate/vsynth2-mpeg2-thread.mpeg2video +230618 tests/data/fate/vsynth2-mpeg2-thread.mpeg2video +f35531461e7b31bfba66802954329f2e *tests/data/fate/vsynth2-mpeg2-thread.out.rawvideo +stddev: 5.31 PSNR: 33.62 MAXDIFF: 73 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc b/tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc index 2c42a21bab..dd20e225d4 100644 --- a/tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc +++ b/tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc @@ -1,4 +1,4 @@ -10b900e32809758857c596d56746e00e *tests/data/fate/vsynth2-mpeg2-thread-ivlc.mpeg2video -178801 tests/data/fate/vsynth2-mpeg2-thread-ivlc.mpeg2video -8c6a7ed2eb73bd18fd2bb9829464100d *tests/data/fate/vsynth2-mpeg2-thread-ivlc.out.rawvideo -stddev: 4.72 PSNR: 34.65 MAXDIFF: 72 bytes: 7603200/ 7603200 +6e30ef923881b5dadd96f0ddf720f377 *tests/data/fate/vsynth2-mpeg2-thread-ivlc.mpeg2video +227846 tests/data/fate/vsynth2-mpeg2-thread-ivlc.mpeg2video +f35531461e7b31bfba66802954329f2e *tests/data/fate/vsynth2-mpeg2-thread-ivlc.out.rawvideo +stddev: 5.31 PSNR: 33.62 MAXDIFF: 73 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4 b/tests/ref/vsynth/vsynth2-mpeg4 index a654c13819..1aa75a8cb0 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4 +++ b/tests/ref/vsynth/vsynth2-mpeg4 @@ -1,4 +1,4 @@ -0282105e98166fac06f7ba9e857cfbfe *tests/data/fate/vsynth2-mpeg4.mp4 -119833 tests/data/fate/vsynth2-mpeg4.mp4 -90a3577850239083a9042bef33c50e85 *tests/data/fate/vsynth2-mpeg4.out.rawvideo -stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200 +f60260ca447624a19ad8307abad7a431 *tests/data/fate/vsynth2-mpeg4.mp4 +159432 tests/data/fate/vsynth2-mpeg4.mp4 +871fda3853f4766669ad875923920bd5 *tests/data/fate/vsynth2-mpeg4.out.rawvideo +stddev: 6.02 PSNR: 32.53 MAXDIFF: 89 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-adap b/tests/ref/vsynth/vsynth2-mpeg4-adap index fb4c206414..4cfbf4936f 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-adap +++ b/tests/ref/vsynth/vsynth2-mpeg4-adap @@ -1,4 +1,4 @@ -76c8962b06b7a0d748bd7eb3f6fc0e18 *tests/data/fate/vsynth2-mpeg4-adap.avi -198498 tests/data/fate/vsynth2-mpeg4-adap.avi -4affb83f6adc94f31024b4f9e0168945 *tests/data/fate/vsynth2-mpeg4-adap.out.rawvideo -stddev: 3.75 PSNR: 36.65 MAXDIFF: 71 bytes: 7603200/ 7603200 +00b903b1de8c943b344d493312cea9e7 *tests/data/fate/vsynth2-mpeg4-adap.avi +214026 tests/data/fate/vsynth2-mpeg4-adap.avi +a004e972aebc9baf8c84965226115526 *tests/data/fate/vsynth2-mpeg4-adap.out.rawvideo +stddev: 4.87 PSNR: 34.37 MAXDIFF: 86 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-adv b/tests/ref/vsynth/vsynth2-mpeg4-adv index b3bf2646ea..4ae4a84eb7 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-adv +++ b/tests/ref/vsynth/vsynth2-mpeg4-adv @@ -1,4 +1,4 @@ -1875ae5a45936c08778c4430a22e87eb *tests/data/fate/vsynth2-mpeg4-adv.avi -141534 tests/data/fate/vsynth2-mpeg4-adv.avi -3f3a21e9db85a9c0f7022f557a5374c1 *tests/data/fate/vsynth2-mpeg4-adv.out.rawvideo -stddev: 4.94 PSNR: 34.25 MAXDIFF: 69 bytes: 7603200/ 7603200 +e18d6c882c22ac06bffffeb8ef0c1899 *tests/data/fate/vsynth2-mpeg4-adv.avi +187242 tests/data/fate/vsynth2-mpeg4-adv.avi +505bdffb9b051dc2123d07a4ae183faf *tests/data/fate/vsynth2-mpeg4-adv.out.rawvideo +stddev: 5.51 PSNR: 33.30 MAXDIFF: 80 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-error b/tests/ref/vsynth/vsynth2-mpeg4-error index 35dd03db6e..fd908aa293 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-error +++ b/tests/ref/vsynth/vsynth2-mpeg4-error @@ -1,4 +1,4 @@ -d3025e5f784efeb2ab9b84f8924eda19 *tests/data/fate/vsynth2-mpeg4-error.avi -176576 tests/data/fate/vsynth2-mpeg4-error.avi -96baa9e4c24c837a3ba5abd8dd2cdd30 *tests/data/fate/vsynth2-mpeg4-error.out.rawvideo -stddev: 8.98 PSNR: 29.06 MAXDIFF: 184 bytes: 7603200/ 7603200 +054264098fa7da0a04d154a7e76ae0e5 *tests/data/fate/vsynth2-mpeg4-error.avi +248248 tests/data/fate/vsynth2-mpeg4-error.avi +d341895eb9a76a2236f0eac8b4e331c3 *tests/data/fate/vsynth2-mpeg4-error.out.rawvideo +stddev: 6.52 PSNR: 31.83 MAXDIFF: 209 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-nr b/tests/ref/vsynth/vsynth2-mpeg4-nr index 7fdce67eeb..63e6c43760 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-nr +++ b/tests/ref/vsynth/vsynth2-mpeg4-nr @@ -1,4 +1,4 @@ -75725f3c2a08efa145a2692a20373a21 *tests/data/fate/vsynth2-mpeg4-nr.avi -155032 tests/data/fate/vsynth2-mpeg4-nr.avi -f7fc191308679f709405e62271f5c65f *tests/data/fate/vsynth2-mpeg4-nr.out.rawvideo -stddev: 4.73 PSNR: 34.63 MAXDIFF: 64 bytes: 7603200/ 7603200 +cf978cf6801e09440877c04cd09bee3b *tests/data/fate/vsynth2-mpeg4-nr.avi +205964 tests/data/fate/vsynth2-mpeg4-nr.avi +2968ea4618c7fe646fb3e142cea0b8ee *tests/data/fate/vsynth2-mpeg4-nr.out.rawvideo +stddev: 5.32 PSNR: 33.61 MAXDIFF: 78 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-qpel b/tests/ref/vsynth/vsynth2-mpeg4-qpel index cab264afaf..18860d5153 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-qpel +++ b/tests/ref/vsynth/vsynth2-mpeg4-qpel @@ -1,4 +1,4 @@ -c45101c6c3b681f5d420a938c0689a37 *tests/data/fate/vsynth2-mpeg4-qpel.avi -163676 tests/data/fate/vsynth2-mpeg4-qpel.avi -26dc7c78955fa678fbf150e236eb5627 *tests/data/fate/vsynth2-mpeg4-qpel.out.rawvideo -stddev: 3.97 PSNR: 36.14 MAXDIFF: 54 bytes: 7603200/ 7603200 +41eaa93241ac0eeda43326d063191c05 *tests/data/fate/vsynth2-mpeg4-qpel.avi +209952 tests/data/fate/vsynth2-mpeg4-qpel.avi +597bcb0df5f17cbbac0c1e9fcfeadc0b *tests/data/fate/vsynth2-mpeg4-qpel.out.rawvideo +stddev: 4.42 PSNR: 35.22 MAXDIFF: 56 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-qprd b/tests/ref/vsynth/vsynth2-mpeg4-qprd index 1779dd77a7..6971ca4303 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-qprd +++ b/tests/ref/vsynth/vsynth2-mpeg4-qprd @@ -1,4 +1,4 @@ -81afd85c3ab00b685588e1b61cc3e4b3 *tests/data/fate/vsynth2-mpeg4-qprd.avi -231446 tests/data/fate/vsynth2-mpeg4-qprd.avi -de8a883865e2dff7a51f66da6c48df48 *tests/data/fate/vsynth2-mpeg4-qprd.out.rawvideo -stddev: 3.71 PSNR: 36.72 MAXDIFF: 61 bytes: 7603200/ 7603200 +a8b93de39254468708ebf2744ff8239e *tests/data/fate/vsynth2-mpeg4-qprd.avi +248702 tests/data/fate/vsynth2-mpeg4-qprd.avi +baa8d0d57a7fb5e393642cb20efed2c2 *tests/data/fate/vsynth2-mpeg4-qprd.out.rawvideo +stddev: 4.85 PSNR: 34.40 MAXDIFF: 85 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-rc b/tests/ref/vsynth/vsynth2-mpeg4-rc index 74e7962048..7ead7f624e 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-rc +++ b/tests/ref/vsynth/vsynth2-mpeg4-rc @@ -1,4 +1,4 @@ -e3621649079539ec118e8581c54bc2ef *tests/data/fate/vsynth2-mpeg4-rc.avi -226320 tests/data/fate/vsynth2-mpeg4-rc.avi -2b34e606af895b62a250de98749a19b0 *tests/data/fate/vsynth2-mpeg4-rc.out.rawvideo -stddev: 4.23 PSNR: 35.60 MAXDIFF: 85 bytes: 7603200/ 7603200 +0e2fdca5f87e09c33c638aadd11cadfd *tests/data/fate/vsynth2-mpeg4-rc.avi +254748 tests/data/fate/vsynth2-mpeg4-rc.avi +4cf9c72a43a42af3eedef8483a33abef *tests/data/fate/vsynth2-mpeg4-rc.out.rawvideo +stddev: 5.57 PSNR: 33.20 MAXDIFF: 116 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4-thread b/tests/ref/vsynth/vsynth2-mpeg4-thread index 61478a0604..902d2a858b 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4-thread +++ b/tests/ref/vsynth/vsynth2-mpeg4-thread @@ -1,4 +1,4 @@ -69b716c9f99c5acb86a744521c32cf72 *tests/data/fate/vsynth2-mpeg4-thread.avi -250128 tests/data/fate/vsynth2-mpeg4-thread.avi -5355deb8c7609a3f1ff2173aab1dee70 *tests/data/fate/vsynth2-mpeg4-thread.out.rawvideo -stddev: 3.69 PSNR: 36.78 MAXDIFF: 65 bytes: 7603200/ 7603200 +8dfa6ee464e24417797af572398befdb *tests/data/fate/vsynth2-mpeg4-thread.avi +268392 tests/data/fate/vsynth2-mpeg4-thread.avi +75042fdb02de159446ab599cb7fe6bb9 *tests/data/fate/vsynth2-mpeg4-thread.out.rawvideo +stddev: 4.89 PSNR: 34.34 MAXDIFF: 86 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-msmpeg4 b/tests/ref/vsynth/vsynth2-msmpeg4 index a7cc94e771..162e420ecc 100644 --- a/tests/ref/vsynth/vsynth2-msmpeg4 +++ b/tests/ref/vsynth/vsynth2-msmpeg4 @@ -1,4 +1,4 @@ -f602d25096c83f166bdab01fa07a34c1 *tests/data/fate/vsynth2-msmpeg4.avi -127668 tests/data/fate/vsynth2-msmpeg4.avi -0e1c6e25c71c6a8fa8e506e3d97ca4c9 *tests/data/fate/vsynth2-msmpeg4.out.rawvideo -stddev: 5.33 PSNR: 33.59 MAXDIFF: 78 bytes: 7603200/ 7603200 +5c1986c0a11537a6fe8d42c56bd0794e *tests/data/fate/vsynth2-msmpeg4.avi +170436 tests/data/fate/vsynth2-msmpeg4.avi +ce58683e7a261aedd4958de6cdbcffd9 *tests/data/fate/vsynth2-msmpeg4.out.rawvideo +stddev: 6.02 PSNR: 32.53 MAXDIFF: 89 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-msmpeg4v2 b/tests/ref/vsynth/vsynth2-msmpeg4v2 index 542dfe5851..aee7782f6b 100644 --- a/tests/ref/vsynth/vsynth2-msmpeg4v2 +++ b/tests/ref/vsynth/vsynth2-msmpeg4v2 @@ -1,4 +1,4 @@ -43d6ca9b63993b4603d4f08fa6aaeab3 *tests/data/fate/vsynth2-msmpeg4v2.avi -129906 tests/data/fate/vsynth2-msmpeg4v2.avi -8920194f8bf8f9cdd6c65b3df9e1a292 *tests/data/fate/vsynth2-msmpeg4v2.out.rawvideo -stddev: 5.33 PSNR: 33.59 MAXDIFF: 80 bytes: 7603200/ 7603200 +84a9d7579bbaac6b48b5c319d22a8f55 *tests/data/fate/vsynth2-msmpeg4v2.avi +171910 tests/data/fate/vsynth2-msmpeg4v2.avi +0213600e1a77c1f28708233cb5a790ac *tests/data/fate/vsynth2-msmpeg4v2.out.rawvideo +stddev: 6.02 PSNR: 32.53 MAXDIFF: 83 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-prores b/tests/ref/vsynth/vsynth2-prores index 9d56b95831..248b7ce643 100644 --- a/tests/ref/vsynth/vsynth2-prores +++ b/tests/ref/vsynth/vsynth2-prores @@ -1,4 +1,4 @@ -7d167fee27e8c34968bbecec282f927a *tests/data/fate/vsynth2-prores.mov -3884722 tests/data/fate/vsynth2-prores.mov -ca2f6c1162635dedfa468c90f1fdc0ef *tests/data/fate/vsynth2-prores.out.rawvideo -stddev: 0.92 PSNR: 48.77 MAXDIFF: 10 bytes: 7603200/ 7603200 +b7e8f1fc9cba6db205a89b16ca7ae1da *tests/data/fate/vsynth2-prores.mov +3868288 tests/data/fate/vsynth2-prores.mov +549787c514c9172f1f698e9282f009f2 *tests/data/fate/vsynth2-prores.out.rawvideo +stddev: 1.17 PSNR: 46.72 MAXDIFF: 14 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-qtrle b/tests/ref/vsynth/vsynth2-qtrle index ac2b557f14..b55bc5bb2a 100644 --- a/tests/ref/vsynth/vsynth2-qtrle +++ b/tests/ref/vsynth/vsynth2-qtrle @@ -1,4 +1,4 @@ -fe3db3dd385b8e5dc43cccc17b50f7f0 *tests/data/fate/vsynth2-qtrle.mov -14798419 tests/data/fate/vsynth2-qtrle.mov -b2418e0e3a9a8619b31219cbcf24dc82 *tests/data/fate/vsynth2-qtrle.out.rawvideo -stddev: 1.26 PSNR: 46.06 MAXDIFF: 13 bytes: 7603200/ 7603200 +3ad59e9e4586a67328d0642dea77782e *tests/data/fate/vsynth2-qtrle.mov +14036000 tests/data/fate/vsynth2-qtrle.mov +abbfc86dbfdac158525addbf48cbb15f *tests/data/fate/vsynth2-qtrle.out.rawvideo +stddev: 1.54 PSNR: 44.34 MAXDIFF: 17 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-rgb b/tests/ref/vsynth/vsynth2-rgb index 5c9a98e3f6..b50d064a75 100644 --- a/tests/ref/vsynth/vsynth2-rgb +++ b/tests/ref/vsynth/vsynth2-rgb @@ -1,4 +1,4 @@ -01199075994e44f282fbb6a8e3ccc668 *tests/data/fate/vsynth2-rgb.avi +f218f8f0e6bdaf486b8a20ebf8363944 *tests/data/fate/vsynth2-rgb.avi 15213248 tests/data/fate/vsynth2-rgb.avi -b2418e0e3a9a8619b31219cbcf24dc82 *tests/data/fate/vsynth2-rgb.out.rawvideo -stddev: 1.26 PSNR: 46.06 MAXDIFF: 13 bytes: 7603200/ 7603200 +abbfc86dbfdac158525addbf48cbb15f *tests/data/fate/vsynth2-rgb.out.rawvideo +stddev: 1.54 PSNR: 44.34 MAXDIFF: 17 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-roqvideo b/tests/ref/vsynth/vsynth2-roqvideo index d4c075a89d..3343765e55 100644 --- a/tests/ref/vsynth/vsynth2-roqvideo +++ b/tests/ref/vsynth/vsynth2-roqvideo @@ -1,4 +1,4 @@ -b46f899b2363065c60f3782ba1f8b7bd *tests/data/fate/vsynth2-roqvideo.roq -92786 tests/data/fate/vsynth2-roqvideo.roq -e69fca960dd0911e9b8d589c13e11dc1 *tests/data/fate/vsynth2-roqvideo.out.rawvideo -stddev: 3.81 PSNR: 36.49 MAXDIFF: 54 bytes: 7603200/ 760320 +217bc0f8cc28558f88a6c8e1aba56ebd *tests/data/fate/vsynth2-roqvideo.roq +91575 tests/data/fate/vsynth2-roqvideo.roq +64385eb8f2c5a15a44f23c914b7d007f *tests/data/fate/vsynth2-roqvideo.out.rawvideo +stddev: 4.82 PSNR: 34.45 MAXDIFF: 71 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-rv10 b/tests/ref/vsynth/vsynth2-rv10 index 7afe4fca40..e1fd75d811 100644 --- a/tests/ref/vsynth/vsynth2-rv10 +++ b/tests/ref/vsynth/vsynth2-rv10 @@ -1,4 +1,4 @@ -b1467b0e8d8cad730e36d1e8ab49d573 *tests/data/fate/vsynth2-rv10.rm -154310 tests/data/fate/vsynth2-rv10.rm -61213b91b359697ebcefb9e0a53ac54a *tests/data/fate/vsynth2-rv10.out.rawvideo -stddev: 5.43 PSNR: 33.42 MAXDIFF: 77 bytes: 7603200/ 7603200 +3b46a4ecefe76e021bb81cc8cbd09fdc *tests/data/fate/vsynth2-rv10.rm +210685 tests/data/fate/vsynth2-rv10.rm +4d9c35b109b48f49a62d2a9208e3f0e7 *tests/data/fate/vsynth2-rv10.out.rawvideo +stddev: 6.12 PSNR: 32.39 MAXDIFF: 83 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-rv20 b/tests/ref/vsynth/vsynth2-rv20 index a3440fa0cb..38c0c8b633 100644 --- a/tests/ref/vsynth/vsynth2-rv20 +++ b/tests/ref/vsynth/vsynth2-rv20 @@ -1,4 +1,4 @@ -96acb098850b9bf309f89e48b08fe96f *tests/data/fate/vsynth2-rv20.rm -153302 tests/data/fate/vsynth2-rv20.rm -46f314e70d9bac2e7d82cfc230534977 *tests/data/fate/vsynth2-rv20.out.rawvideo -stddev: 5.48 PSNR: 33.35 MAXDIFF: 81 bytes: 7603200/ 7603200 +1bfdb1840495e6c2876ddab73d1c98b6 *tests/data/fate/vsynth2-rv20.rm +210666 tests/data/fate/vsynth2-rv20.rm +d32edd26c6a04dceb75b19cf837b9d95 *tests/data/fate/vsynth2-rv20.out.rawvideo +stddev: 6.19 PSNR: 32.28 MAXDIFF: 81 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-svq1 b/tests/ref/vsynth/vsynth2-svq1 index e2af545e59..9d8dcead95 100644 --- a/tests/ref/vsynth/vsynth2-svq1 +++ b/tests/ref/vsynth/vsynth2-svq1 @@ -1,4 +1,4 @@ -c15de1e0b0439981dc94b927b1933889 *tests/data/fate/vsynth2-svq1.mov -766851 tests/data/fate/vsynth2-svq1.mov -aa03471dac3f49455a33a2b19fda1098 *tests/data/fate/vsynth2-svq1.out.rawvideo -stddev: 3.23 PSNR: 37.93 MAXDIFF: 61 bytes: 7603200/ 7603200 +9118e474af8b119c6c44e828a8dfaa8d *tests/data/fate/vsynth2-svq1.mov +940439 tests/data/fate/vsynth2-svq1.mov +a8cd3b833cd7f570ddbf1e6b3eb125b6 *tests/data/fate/vsynth2-svq1.out.rawvideo +stddev: 3.71 PSNR: 36.72 MAXDIFF: 210 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-v210 b/tests/ref/vsynth/vsynth2-v210 index eb80b3424d..5e934de41b 100644 --- a/tests/ref/vsynth/vsynth2-v210 +++ b/tests/ref/vsynth/vsynth2-v210 @@ -1,4 +1,4 @@ -ddc80f41b9e92c26adbe09567a4c7a1d *tests/data/fate/vsynth2-v210.avi +87bb634932b3f5cacd4d08142798db17 *tests/data/fate/vsynth2-v210.avi 14752448 tests/data/fate/vsynth2-v210.avi -a627fb50c8276200fd71383977d87ca3 *tests/data/fate/vsynth2-v210.out.rawvideo -stddev: 0.34 PSNR: 57.43 MAXDIFF: 6 bytes: 7603200/ 7603200 +8bb1c449e1a2a94fd0d98841c04246bb *tests/data/fate/vsynth2-v210.out.rawvideo +stddev: 0.39 PSNR: 56.17 MAXDIFF: 9 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-wmv1 b/tests/ref/vsynth/vsynth2-wmv1 index 188b5184d4..1e20493c62 100644 --- a/tests/ref/vsynth/vsynth2-wmv1 +++ b/tests/ref/vsynth/vsynth2-wmv1 @@ -1,4 +1,4 @@ -73f3b72208ed1e61be60f1412dbf35e2 *tests/data/fate/vsynth2-wmv1.avi -129518 tests/data/fate/vsynth2-wmv1.avi -81eee429b665254d19a06607463c0b5e *tests/data/fate/vsynth2-wmv1.out.rawvideo -stddev: 5.33 PSNR: 33.60 MAXDIFF: 77 bytes: 7603200/ 7603200 +54e3a0432da62f1a11543a1df4aa05eb *tests/data/fate/vsynth2-wmv1.avi +172394 tests/data/fate/vsynth2-wmv1.avi +73fbdc771422e590afe213d1242943a2 *tests/data/fate/vsynth2-wmv1.out.rawvideo +stddev: 6.01 PSNR: 32.54 MAXDIFF: 88 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-wmv2 b/tests/ref/vsynth/vsynth2-wmv2 index 25c0deec07..6cc0642465 100644 --- a/tests/ref/vsynth/vsynth2-wmv2 +++ b/tests/ref/vsynth/vsynth2-wmv2 @@ -1,4 +1,4 @@ -c7db61ce6fc07e8fb9a7204992c2e4c4 *tests/data/fate/vsynth2-wmv2.avi -129848 tests/data/fate/vsynth2-wmv2.avi -288bdf1b411b814a067ceb00ac6b9d16 *tests/data/fate/vsynth2-wmv2.out.rawvideo -stddev: 5.33 PSNR: 33.59 MAXDIFF: 77 bytes: 7603200/ 7603200 +2e22f5024860163d1e11a125b283f261 *tests/data/fate/vsynth2-wmv2.avi +173824 tests/data/fate/vsynth2-wmv2.avi +65c4485e592d7fc48b55ba3b6051ddff *tests/data/fate/vsynth2-wmv2.out.rawvideo +stddev: 6.02 PSNR: 32.54 MAXDIFF: 88 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-yuv b/tests/ref/vsynth/vsynth2-yuv index d79e98677c..335660a78f 100644 --- a/tests/ref/vsynth/vsynth2-yuv +++ b/tests/ref/vsynth/vsynth2-yuv @@ -1,4 +1,4 @@ -d08219372af7a764c1afbc99a1002fe0 *tests/data/fate/vsynth2-yuv.avi +57fa20652deda0945e57251bf261399a *tests/data/fate/vsynth2-yuv.avi 7610048 tests/data/fate/vsynth2-yuv.avi -dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-yuv.out.rawvideo +36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-yuv.out.rawvideo stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/reference.pnm b/tests/reference.pnm new file mode 100644 index 0000000000..e81bd7c2ef --- /dev/null +++ b/tests/reference.pnm @@ -0,0 +1,696 @@ +P6 +# CREATOR: GIMP PNM Filter Version 1.1 +256 256 +255 +ҸܼὟ澟庞輟齟䷛麝縘跘崒淒縗齇ޯ鵐££ĥǫȬɭȭˮ˭˭ˬ̮ͭΰϰгαͭͲѵͲͯ˫ʪȨ˪ˮɩǥǦƤĢĢţţġàŸ辛羛澙翛众彙⼘ỗ俛àģŤᾚ߼⿝ĢǥǥŤǧƥǥȦɧͫϭ˩ȣǢȤʣɠššƢƣƣŸáŠɤʥɢ˥ȟȞʡϧΨ˥ƠȢƝ̣ϨѫҭΩѫӬٲعӵ̦պkh8P"JHKEDz?w;|B}E!Y3~iCtVy\oMtcH[M8A9,"    + + + + + +   + + +  +     +   +        +      + +    + +  yϧ佢ᷙ缞澜幛庙蹘涔蹗黙巐缕͚᳆뷐¤èèƩƪǩȪͮίͮͮϰϯϰгҲή̬ϰήͭάͬ˩ɧɧɦɧɧǦäâŦä¢龜辜优会㻘伙鿠忝⾜ὛţŢǤƢƦƦȥ̪Ϊά̪ȥǤɥɥȡǠǢàŠġšĠšȣȣɤɣȣȟɢ̦ͥ˥ĚĜǠɠͦҬЪϪ̦Ҭײ޿ղұˣ׻onAT*JLO#HD~D|?wAzN,|\5}fDwlNt_A_Q6?9%$     + + + + + + + + + + + + + + + + + +   + + +    +  +    + +  + + + +  + + + + +    +   +  + \D.dK1}^Ffǟ~Ϥ߳ᶗ߳ⵖ渕幙给꽗默軖ϛ乍빓Ħǫɭɭɭ̱̬ͬϯήίдϲѳѳв̮̭ΰͮ˭ˬ̪ȥǥƢŦƣšĠžŸž漝㽜仗⻗依忝俛㿝Ἓᾜ ƢŸġâƥǦ˩ʧ˨ͫɣɤ̨ʥɠʣžƟŝŝĝğÛƢƣȟŚƞǠǡ̤̣ǟژěȟˣΧͧΦΧЪӮ۹߾޼ڷӰѬ̤ؾžquG]2S Q$Q#L$H&}C~D{E"|Q0vX4o];bU4J?$3(   + + + + + +  + + + + + +  + + +           +  +     +   +      +    bJ5iK8gO9gKv]ouԧթۮݱ幔底缘躙꺕Т乒깑캘츚¥æĨãȦʨɧ˨̬Ϯϯͭаѳίίϰг̯αΰ˭ȩʫˬȧȩĢàĥŤž侞⼘㾛庛⼛⼜侞ἚນỚ༙⿜šğĠǣǤ˨˩ȤɥȦǥʤˣȢǤşǠƝĜƝɣɡȡȠÚěǟɢʠǙÙտĘǛˡˢ̣ˣɟˢͤӰֱձԯѭϩʥٿǡq{Ld6]+V+Q)I"H%~D|CO2R6vR3N?%80  +  + + +  + + + + + +   + + +       +   +    + + +   +  +  +    +  + iQ:gN5qXvW<^F,7,  +    + + + + + + + + + + + + + + + + + +        +         + + + +    +   +           kX@yaCzXyhCrOxܴݶӪܲ余归㹔ḕޭ֣תۮ 츛츖ãžƦɨ˩̪ͮίϰͮϰϱѳΰ̭ϭίͰͭͮˬ˫̫˫ɨťģƦ¡伜⽛㽜߹߹ݺ޸὚ཛŸŸ ĠǣĠŢǤǣšǣƜȣƟǢȥɤȢȢȤşƞɡʡʢǠØĘƙțɜÖվÚŝȠʠǠŜŜȢɣ˥ˣ̥Ψ̦˦ØѰhtHa0V)M"EH$U1hAmIw_CTH'*!  +    + + + + + + + + +         + + +                 +  +     +  +       ĪīԾϮίҽӻӺɫ¡ͬཝحР{Ѧ֬滛켠뻞쾣콢칟츛츜최붚컘ġĠǧƦȨʪɪʫ˫ʬίΰαͯϱήϱвαΰϯ̭̭˫ɨɩȨŤ¢ã從俚⼜ߺݹ޶໖⿙⿚žġġťȥĠġġšȠǣȤ˥ɢǤĠŜƞŞɣ̨ɢĝĘƞśǚƙտֽşŜśŝĚĜ›ĝȡǡȟȡȟˤǞѲ_tF\-R)HH Q(iC_ZmMUL/&!   + +   + + +        +  + + +   + + +                     + + # )&4/A=0ʲҷӹΰĨȫȩ㿡ժȦã¤๙ȞxǝyҦ縞黝껝뻞켟뼞콡뻞뺝컟컟춛뵗춝쵝쵕추뵖츚칙캖켜ĥȪƨǧɩǨȪɪǨȩʭ˭̮ʬͮ˯ΰͮί̫ͯ˩ʩɧȦɧȦģŠğ俜໖߹ܷỖᾙབྷ߼ᾙ࿛ġĠƢƤţƤĢġġǢƢǣŠǟƢŝÛǠȟ˥ɧȠƟÛĜŜǚ•پؽÚĝĝĜÞپœšŞĚƜěȠˡƚϱZb:U2N)K$M)a@}Tcgz[VO/'# +   + +                  +    + + + + +              !#!0.'@>/OL;]\PolYox²ӮյƩŧٿؾٷ޺ΦЧΦү̪ձ۷ǠznȘu䳘麦黠꺟鹢꺠鸜깜麛뺟鸜鶙츙췙괘궙뵚괘봖괖뵗봔鲓굔鷔뺙뺝áǥƤƤáŤãťŦƧŧǨŦƦâǧȧʪ̭ʪɨŤʩŦ˩ǦǥƤŤƣŢá¡ཚ῜ຘ⾝߼߼޻߼߾៹šǥţĠŢġƢĠÞšĝÜÙɢȢ˧ɣǟŗƙŚ×•սÚĚÚؽœ—ÝĚÜƜڿŧw}NZ)zH~L'N&\;sPgmqe^U4-+  + + +                +         +  +  + + +  + + + + + + + + + +        +    $&%*)63<9!PL:]XEmkTxsesyʱѿǦħ׺ɪţťھָնӱӮظȨ~ǩĤ{qnŔsӣգݪݭ௜ᬘᲡⱘಜ䴜௒ఔⳘ㲙㱓泔嬎寐箏诐鱔譍篑篒곕괗鶕뻘Ƥåũţ濡弚鿡连¢ĥĤãĤŤŤğġġ⾙⿚߼὘߼ݺܹ޽ݽ࿛áĢţĤßšĞġŞŠŸÜơȡɣʦȢšŜĜÙֿֿ׾̙šœտսվ›ؿ•պki>|R&uEyK(Y9jO[k{vjg]::1 +      +    +  +         +  +      + + + + + + +  + + + + +  +      ! ""/+?:*ED8QK2XVBkhTxrYerʻ벚ŦȨ̬ԹʭǩƩؿٻԵѭѯͬǩzsoǑtɑqgu~}Ñ|Ė|ș|ȗ|ə~̜ɘx͚ӛқ{ܥߨ৆㪌⨊㪊䬑䮔毓贘콠£ä輚缛辜輛纙迟迣ƫŸ廛ݲᴙ೗ۮܰگݱܯۯܱܲݲߵ໗Ἓ俞忙⿗⿚߼㿚ᾙབྷ߼߻ۺܻۼܼܻ߼޾ܾßœۿĞƠɣǠƞĜٖ׿־ջѹӼӼٿڿ׿տԼֺۿԽٿ›־βbj>vP%yR(b?mJ_j|rtiFE:     +                   +   + + +   + + + + + + + + + +   + + + +  +    *'75$;9)KG0RM8\YElfNys]~lɿɷν澢ĢǧίαʭɬħֽѲʩɥzȦzϫȪrÞx̐juЏkc@&cE2oN5uS?}YH}]H~^I`LeSgOnSlNoXmPsWvZi͔Ԝ~֛}֜۞~ڡ|۠ܡޤ~䩋贘麘꼞㲓嵔㲑䴕涘嵖鿟溕߰ݬ֥ۨӤҟ̙{ΚΘϚϝПϝѠӢ֨٬گڰڲ۱ڳܴ۶ܸڷݸܷڷ׵׵׶ش״ֵغعڸطָԵԵѲշҳӴѲٺŢپּӼԹиηȲé®Ʈ̱ѸպһҺҹպӼ׾ԽսؽؼպʮnoC|b8fBqOUh{svZUL-.' (! +"& +'#" !   +                   + +  + + + + +  + + + +    + )&/+:7"DC0LG5XTC\[IjiXyrb{muwıȱҾὟäͰͮǦɫȣۿԵΰϭ԰~׬}ͩ|Ǣr׭s׆قŠJ8  *.!/ 2#?-T8$mE3yA,y>&A3E0T>lXkΏv̍qˏrΒtϒtԗ|ҔwҖuכ{ইݨ٧أۥ٧ܪڧ૑ᮎⳍݬئפϛyʖtƑqÏpŽoj‹kčmÌlŏmÍjƑoƑoɓnʖq̙zɘp˝~˝~˟}͡}ˤȨЧͥѩΨϫʨͪϨϨɣȡʥƥ¡¢~{~x{uu}ǩʬͲū{}~rmwv}ŮɳȲʳ϶ежӼеиѸƯp~PxMzO]gu{wzXujIqfHwjI}rZ}r_xpTkcFdZ?RL1C@#61*'    +   +  +      +    +     "#*)!,,!31"?;%IB,NM3]YBjbHulS}gk{ȾdzȳйáäŤáţپѴġͨş׸аЮҬ}ܭڡtqˆE:   + +  +  9)X:(i8"n3p1y3!A.bN~dˋx͎xΎtʌtˎs̍t͎s̎pΒsАuӗ{іxГuәљ}ә}՜՝؟֟֞И{ϖxƎrÌpdccdeˆjkhecgfijjlonmuuqtsptu}vpmjbafbc~`|X|Z~]Z~[\ozsqroqrtlc`^gkvƭǯǮéwjkqqx|ŷ;ŨѼѻ̷ͷտ¤ħƬ˷ow[i`JTN8A8.)   +  + +   (%2.10 92 MG2TRA][NkjYusX|cxy}ŻкĢâààšЭճʥԸ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kOiUiTmWjWkTpZmVpVnWoYoYjRnXmXqZqYqWrZvbv_uVvay`zdz^|[{e}d{a{]~bce~g}_eadb_^_i~a\be~]~\`aebcdchdfefecfbaccenqqkkiaba_d|Šܿݾ[.!]- i-k+n*n't*w(&++0D={h㳈t"  +    8)o^Ir{z~¥ç}zvtvo}i{gzdub{f{iv`xeva}g{ijzd|f|dzdxag{dig~dihh}cfijk~`elhejidfjcdbdffjeg[~b~]bhcjumilgpklgehjghkmwwíƲyyzwpkzÝپܼݽܻڹ۹ݽZ+`, i,l-l,n%t(|().-1 @/fDt豭B:I0"L4&S8$N8"SC5WE:\K:r_MmǪɬƫĪƬ͵ռҷֹѵγٻԶӴضЫ˨{y|yx|q}wtxonollklproqlnipnlqnknkkmnkjtyvrz}y|rmu|}}~z}uw«­DzşͩɢˤǟӾκϼʴл͹Ǟݻݻ۹ضں׼ھY-],g1!h)k)r'w+}))-*4$A7k]㵁佾{k~joqu|˲׺ðįŸɴʺ˶ҽҿѻҿҾѼϼսйŴݸҬʞėɧͰ̮̬ʭ˫ƢƦzxyzu~|xwtxz}|©ê©Ŭɱ̷ӼδϻкϹ˶ŰŮŮ˯ʵ˴йӼáĠпѾѽмҽġšȡʨϪյ׹۾۽طٹ׵׶ղԲӲЯέԳݺٵ׷׶׸Ե׹ܿY-g:'d-g'o)p#x*}&'*+4$=3VVmº栕ཪ߿߿ıǶɹȸ̼ҿིѪƜzvṷèȲƮݰؾԸѶҷ̯˯ʰ˲̲Ŭɯͱж̰ɮǮʱ̳εϷѹҼӼտԽ©ǭɬ˭ͱ̰иӷԾӽи̰ʪɯɳ˱ϴеԼּֽپջԵӳֶӳҰֳհѲүҰұЮշػټݿڼܿټںڻٻڿ׽ٽݽػ׸նշָغ۾W+k8(d.h)d#q&|+'#%*.3(G@`Ux宝ۼxdt]iQmWp[zǬˬҼӽԾлк͵Ͷ̵˴̳Ǯ˴ɰʳ˲ɳǰ˸ɴɳ˵Ͷ̵ζϷѻкҼԾֿվؿٽܾٻظԴάƤϿƟ˧Ъմڽپ۽ؼپؿپڿݿۿ^0!g3"j2 f&es({*#""&(3#5!D2I;Z屳ﱯ}kRhVcRkWhRkWzcūӼѾѾҾҿлҽӾܾ۽ھػѰоwolm~ɸğͱټٿھܾڼ۽ؽٿ׽c4$i9'r:%m1u2 z,("!!&//8(8?(k>կ坌멕ϻҲzccLcMfOfOdIkTzaӺտստԾҽҾһӽԾվӳ͹r_qGygBvdAr_8mFUsѾ˫ٺڼڼپڿڿc;,wE0}E%?%<%/("&#(/27"4<,qM^ߟ|͹ĢmWcKdJbMeRdQkWkɬսֿԽҾҼҼҼԾܿٻƣ~{WpOoL~kIua-?00'&(,1++45C.[C㼆ڹiMyİ~dQcL_D]FeRhSt[tλѵ׿տӽؾǦvuPnMkLlLyd>mX2fS.dQ.dQ1xhGnϾҳܿeBeJgME8F5/*(+(,*/46B*Z;㹇ۺgOږ{ԾܶnfNaH_EcKdNkQw¬Ͷؾʪ]}gHyfCub:ta*5 42224"23>(A'^AǗ߶dEؒnvkRlQfMkPtVsɱҹŨ̴|_xXnGjGxfߥDڝ7֝5ݫN\sĄЛҞ֦ܴγʩxVd@U6>%8%155"4"04"8 =,D/J/oji\Gϕpӳy\rVpVnVs[z`нջҹĦϺ©u^zNwCqD|NђM>Gf͔ܽܽ۹ڸسНɆ~wuu\Nߟ;ޙ2ޟ7ݚ5ؘ4ҏ%ё(ԛ4آDڨP۩Qݮ[ܭ\pȆО۱æwwUB%;*='76430516;!A/lVoMqV]G̎oлvaw^sXtYvZnͱսɯǯ̺Ȳm[ĐXK8+Ն'ZӧӻέʥǤ˧Ҩթѣōt{xq|kQߟ@KGܜ6ٔ-ՌʇЏ#ӕ-ѕ/ך6֚2՛5Ә)В'ٝ8ީYqɇ٧˲ȥaI*6$B07!85!5316 59='VFZFeS^H̒oƵu{e{ey^uZ~gªͰâͭzTFڈ/|s +˃$߯aϚطۻŧ¯ҽ̠Ԩў…oojk~uMPXT@ې%֎Ή˄ˈ̍#ё)ғ'ԕ-ӓ*ʉБ)כ;՚7җ<ۤUiŌϞۻѮxZ:t< ?)8 67%56!13537 I2P@XIcKƍh׷{j~f{b}bz]lðA.{h adɃ۳]ɘԱؽϰǴrzlOqa:{jE}]c~нÓwnߺjٱ^zxY^YߴMMߢ;ݟ3ۚ/֑%я"ʋ͎!А%Ϗ'ԗ0ї0ٞ=ڗ9Ј$~u+}+}$Ɗ6̓Gرt۪ǫȧz~O3G-H-7453352 6$7 :L=XS_GŌdʴyez_w\zbeп湃ߍ,ۈ$n^Ub{ޟ<`ڽɟھԺʳϾjtfGcS1`N)]M&bU,qb5n=LZͪk~trnݳ_߻i߸fҥJܰQܴVZ_UODڞ4ד&Ԕ(Ғ'ؘ-֗1ӗ2ݫLcמBn gmpqqm qǑIŽХݷӶҲt]yN-I)}>:762752-9'VEVMaK†cnrYoYmRzdoԵ֗Oӂw iVfz؎%ܑ)ܑ3١ZХj˳ÝӸαԹ̪ĤlZxW{iDrPxfDp]3j_3eV&iWo\&s6ծjrߺggi۵dҪYحT߶Wemk\UޱGݨB՟3ҕ'Ќ"Ԏ$ҏ&ҕ.avڭQupy|ul o qrw&ȓFܮgʐڮ۽®¡vrUP1|E$:!;#53022*8'SEXQZFa϶ӸwcoVmVt]{csʺඏy6zw nt +|׏*ޒ7օ#z"z)Ā8{7FpӳиԶڹϲȤΫɦ˺zgb\\]|SZYV{RuJ|HBMov޸n޶gܷcߺfߺhز]ݶ^Zdj߻b۶S޴Q۱NܭG֣;ҝ9З3Ȋ"ҍ'ђ,ej֨G"ƅ$ʐ2Ƈ&ukffgm +t}ɓ:ڨSګZyō֥ϹѰuX[:~L.y7"~351/33-/K=UQ\KwUʱҹ||iydzf{g}hxгΔ]q$̈́Ѐzyv~yrvjen+v7q.`ʳոٻЯ׳ѯĢͫǷ³q^_ed^^lr{{yzgܪdsur޸jܷf޹fݸg߼hjܶ]޹\i߽cׯSܵY`߹]޵TשFըDҡ>ď/ԠA٨G^ײTСCƓ7Ŕ>ϠGΜBÇ#ocgchon {%͓:̓C̗7ԣHoէԵ̨kI`?U4r= }<#|7}5.}+/%4F-M@e[{g⻞ǜinjlu{epƱߺףTם>ۥDآCԖ9ω(oh +i h h`` \` cj y,ˍ>ŎӴɢƥĠɪ˪տw|Nb]zQWSVuG~Oehw{ŶоƢͰֽҰolgܷ^lh޼dd`ܵZܰVܧEԙ8Ɉ&|pvzОA֫JխU߾fkܶ^ձ_۸gٶeˣKș?ɚBѤOРKŌ/ufedghjmsĐ,,ɖAٳxԧѸƟϸǭêǫθ϶հqNuXa?\9N1F+?":9!43@/XKibԀn߻ܶr~innms|f٬lԜD٣BۧEۨEӖ1|}rgd ^_bdim#w"́"כBȈӳѿuszkuLwLzMzN|NSPUsANyʺɺǠͧմ׺ծ޷o޲]eܴ[߸_g߽e߹^VM߰LKާBݣ>ٙ:˄!p srr%ǝC߿iuxwղbطhęD:˝GϣNТM˓:xo +ffgfht x{!&Ő5őAݸzٽ̰ϲǫwĤ}ƨжλҽ߽u}`xTmCY7I)I'D C<7D0_Ztf؇q޹ͽ~sojmone޻ʓAȌ,˕2̘6Lj$Lj$͋&ʂ"m fed +^flrz!zԉ&ٟJʼn̡мudxNtFXY|GtDwCxF~NMT^e[xĕѤձܼ޾ɛӦU٭Ycaba]`TNߦ@ߥ;>ݢ;۠9ғ1smo qo(k}yp׳]ճeɡN?ǜMФSϢOʐ6m_^fjlp v | $2ȚRֵ֫ʡԼ̵ťŦ|y¥zжɥٶԽһũ~b~ZzV`=T.O*P%O#^:aCU4q^zύtܷΟvqpjnk{dgɯڰڳiˡT3"" Ƌ)͊+}rkdfovy}#΀̀ю0ԧd˥lIp?h5}K]LvAsW_`۲p͈DžƊ֦̓׬ڮܵ۲ٵڻ״ճԱѲɪȩĥhǕEܬTa][\WWNH?=ߤ=ܣ7ަ>֘5{lfk kl +-۴`tpڵ`ֳ^ȢTDAɞRϤRƌ.|pdafhkr v {"-Î=ݾԲʨͷʳȮǬǫԹӵԸ͵̰ԯfzRwUiG^=Y4b=X.xUw[~]܏q嘊Ж׳佱Ívljkin~g~gpԸ޲ܮث֡آٟܧݩީߨ՝ƃ̩X7‰,ɍ2ό. vsqxxх&̀{rpyҏ=ۚT{9i)GadvDq;yDw?ShͮpضlˁΆхӌ͈̊ϐѕћ͗ϼxz©vmeZo1ibzi6ۤDޟ;ߟ;ڛ5ۘ3ݚ5ޞ:BB@ߢ6Cݤ6ޤ=ޡ<ӏ&w +tquol vΜKݴl۶eӫ]ɠUěNGǞS͡Pɕ5ymfadjmq t #}%,1ҮqҳаέơԾɩվиཛྷqqNiLfDfDg?mK^8xZ͈m՝{檍Ϛֵʗslmjk~i~gz_ߴל͏Ä~ؿ}һq־uux|{̉˄ψΊψь֔ڛݥܔuʪSɤL8ǐ2lj*Ʉ)ǀ%}"{!̄&ӊ+̂yq lm +puiu2Q]Nv?t>v;VzΉԍфπ̃ΆҊχ̅Ί֘כˏβzδzۿ~Ĉʦ]2 В+ܕ,ސ*ڒ)א$֌ ۍ$֋$ݞ;B9ܠ3ؙ1ݠ3ޥ9ܝ9ٕ/ˀ}x~|o +ptʜK֮dԬcѧ]BJǝQͥV˝Mym ^]fip v x ! { z%|)Чk۽ۿѻǩͨjtUkIjGi@rOpK`ڦ߲潙巐ř{ɧܵsqlljhi|efκگȑѺx˭`©Yƫ[ƩXͮ_̱]Ҹd׻hؼh׼lmily}}~Є́ЅӎבؐՍٕwơN*~$ŀ#Ȃ)̃(Ɂ#ˁ$f_fhf RQt,TJu;t6u<Ğ_ȀԉՋӊ~Ӎ֐ܕږ֐ӍҒԙҘғ֘ӕҏ֏҉чӈӆ߲V1ݓ&ޕ+ߔ.ݗ-ߚ-ړ(׋֎"ߝ?8986ؘ0~{*~"~vvmwƚGȞE/B̦[ѨZ͞Nz%e \WZam t u o)-'{x$})v&3ڶԾͶ͵Ұ}f|ZqOqLvJbpʘvʕz‹pnŸ䶡qrnniii}ew[wҲўªbM8=;47=ĥ7ƥ8ǧ;Ȫ8ǧ(ͨ0ɣ+ʥ&ȥ'̦)˨/ֹH׃ͳAΰ;ټLپXmjvx~ςτхݖَ˫bu!nz ǀ$wpa^^XGECDS v,Ww)ߤVsyo{ӈ׌۔ۓאԌ΄ט؜ؙؚ֗ڞ՘ҐψՍ؎x\W?2#ݓ*׎$ڒ%ݗ,ؑ&א$ؑ$ޝ/ߠ/B<ޤ7ڞ5١;ї3)͛;˟HʝE691} x{ ,3ĚPϦ]ѩ]9fj]^f `hspn v(*wvxv#y)@ھҸζͳ׼ȧ~qwOmIvU~a_cjkhw͘tiklkke}_~[¬ݿ߼ι}J)%%+-($!  + + +_ϴBɣ(ɤ+ӵE״ETy|~z΂ܛ֛?N +b†=߳_nqvَ҆ݓߖޒܖ׏φ̂Ԏ٘חύ͌ӏъыאבے׎vdZA80-ݕ,ޕ-֏$Ջ#τ̃ЇӉԌ(ޠ3ۣ7ɖ0ǖ4ҧI;͠=ɣDǠF&.:82&x"-ǟQͤ\ǚE|'ihZVad i +jki +l!~%s"ge jr&ƚ^ֿͣռѺ͵Ʃڼͮ¢py`rQoKsR{Z|`ea{^k滤Ȏqlinlmf}\p̭ݴ̳|D, + + +ĝϬ&pniruӑҴuxTvM{M s-z+dO=>AB=;}8u/DːAcwπԊ֌ِ׌׍ڐޘٓՎړݝڕ̄вhzȃ˃Њٖږܕ׎rdQ?9/ڐ ؉Ԇԅ~Ԉτ΃щ҉!ڛ.׫CճMܽ]ݾd3$-05<4}$6@1z'=̝S-neV +PMUa ekd ag +{'y"aZ d`z;ϸ԰ֻֿԾϸȪĪϰƥitTtWuZwVyZ~d{_|euԽآƍ}‡srˆrÊspgbaεϫڹϺ}G4 }xrn{ÔĘ Pͩ+ѭ1ָKk΃ۢÉgG R._5}LU O=68>=8x2i.e)k'Â6iч׍ړ؎τЁ҉Չ׎۔ܕޘݘݘ֏|ЊЈӌ֏ڒݖݔՈ|\NHB3ܔ%цст΀̀ӃЇό٥<۶R]޼ZΪQ3z$|'.JаaE/3@5~+mĔD.o^TMNOP[ d]ZWr%o!Y +W_dHϼɥѯӽӼԾ׿ԾһϲˬƫݽӲˮxvYvYqUsTxY{]}azbt點˓z̔{ƎwČw‹pƎxmebĩɢ߽ǜ[vBΧڱT-"} ~|~ęę|st|~–ĖǛțǚ ʢԲCuڛӸ`B +A P(X4{MK:78}8}9s1g)]%XWYݯb҇֏؎ӆ}uрՍ׎ޘޘܕܕّٔՌԍӌ׎ڒړ؍؉ԁgVXQܓ ډՇӉтЂЃ͂̀֋ۥ>hں[ҮQÝ;95p~1746FHw$w&77tq*jT RK}ILNU[Z V[jeUT\m,›jζǷ¤ç˴ϷϷӺؾ׿׿ֿӻѶ̲̯˭ȭֺƥi|`x]qXu\gfemѴïנΔ{ɎzǎsƎtǐsɑyh}Zt¡ѱոػٿپڽܭاѢ忎q9wHyCɖ@' vwzx{ɟɘƙÝ ƘǛ̞ ˞ +ʟǜ ̥$nԕeS0@F!R,jE|K>|89z6q3d*Y$S PK{Gۧ]z΁Ռ֋Ӊ}ovԉړّ؏ؑ׎҉чՇҋ~Ӆْx׉ׄqZbDׂ{ +ӆ֌!ч̀΃x ֤̆@޽aϳWãG27,}+E6C@Jͭ],b04w\ oTLM|GyE}ENWW ~LMQ d[T[d&Lßåʺñïij˺ĦٿѷӸռս׿ԼӻԽϷͯɩƦڽԷӵ|g_}\{bkjdiҿͻ赡њʓ|ʒ~ʒ{ɑzȑypuU~\˪абӶӵնӶֹӶ۽׮pf\ޤZݞWЊKZuKWʙ7srss{×Ú×–Ц ˡ̥řȘʛ̡ҥ Ѣ ӤѡդקԢɝҭ1ԋȌj-S-C >E$Q+f:r:r4s7g.^+OJIDDi; כQgrЀԅ׋ْ҈xՌؑڔՍٓؐ׏Ս׎ԇ{ًٍNkstng[Ӑ { ؈ّ+և| ҅Ё˃̌#՚2ԬLέQ3-9(;MظjŠHί_RĢWU},q:œI:ob IzDwCvBxEzGxFTM~K|IR +XWYaq5Ը͸˻̼ɫеӾվϳҵҵԵּҷӴҰ̨ǦƤڽҴ׸mkiotmio޸ӽ«ݤϘʐ{ȍyɑ}ȑ{tuWlEaʳɩͯήҴӵԷԷҴҴԷۿۡkZPHJޖJ̈́:_O +G۰Anmu|ÖÖҨΣ +Ɠ“ŖŕɘʙȗƗʝƗƛư̈̄Ԥ֤צ٨ܫܮ ݸ9zԗW^vK k@_8J)U1T/e4f4`-RIJED=AK_̄;ޢSdnՍՍ҉֌΅̀֍ؐ׏ڕۓڏ؇،ܔ|ڊ,օ&IM\ge6ۍ"۔)Ԇ!֋ Ԍ ϋљ2΢AծSͫOB {&.CSLCڻnŤXJ=v#6:5>8l|Hu?o;r?uAuByF|N +{J +yG}JWXW]f(¨{ìůƷϿŨŧͱ̱Ͱ˭ΰͯϮίΰʧǡŠ ۿڽԸԵҳҲây|ěž~z}vuݵԺ굞җ͒zΐ|ȎxƋrozbjBoIvѻʧ˭аѳӵԷҴҵѴҴֿΧܐMLC=ޘ=ڒ;|-^V >ŁguuƘșƚɚ˛͜˛ɛ˛˛əΜ̛ʛȚđ˖Л͜Ԥߵ[یڴgʗJǍDКPרZƐKF:bvIk>[*LLGA>CBHr3J bq'u+҇CۡSirzчՈ׏ٓՈ׉~~؈ڐۏqڃ#k +g +sPfcB52ݙ+ՇՉ*ԡ9ѬL:ġFģN($$7 PG>=C<96{-z+B>{(|*7qRq9m7p8n:m:rCwHqBvDJ +RSRb+bǨӼ˾̿¤ξȶȷŴ͸ƴ˭ʭʫ̭ɩغؼٻַַٻոԵ˨ŝ̩ʥğ~Ğw׭Ҷͳߩϕ|ɐtʐ{Ǎul|`pPjB{[̨ϭҰԵӴոҵԷӶҵֹÑ،Bޕ=ݖ:ݕ<ْ8ӊ.romˌH3yėŘ̝Ν͞ɜĘ}ϡ ӠОϟϝџĔƖϢ߾UoݕЊgqqsǀ|vӋ֎ȂٳfÕI~4Sh4J<ACM#_4o8x3;@D >R p$Ռ=ޝNakjmZ]hwֈ،҄Y܆$re +^ؖ0I]DA>B7ENc۾`7ţE?>5-.QH;L=:;?{,u(8?|'y(3x R j5i4k4e2l;p@qAk;qA{G KR$yLmϻ˲ԾӹԼȮ{vnräĥɨȩģټָշնӵԶַغھغִʥΪԱѲϭϮɧ|ժƦѻ뾝ӛ{̓zȎvǍuhgnIlKYťѰӰѲշָ׺Է׺ҵӵԶ׻澊֍D؎:ْ9Ԍ3א7Ս3΅+ˁ)~*֐Fڬx¢,ĚȔΟ̟ңҦΠĘ{oƗНѠџҡПר ̛ΜțĖ ,ԽfԆӌʂ{}אّݗٕޚەݙݙ׌Ԋ֊bLJ@J K DF"V2oA p?t;K~:l.l+z2HZn*v.g{/ҋ?~1mԌ?X`ܱR_Kԁr ]e͇߯ITDELLHKP߹SӰP9?@ȡG630J9HT9Q<:y#|,7@y)t$u,y+Va/Y+c2_0h8n<c4g7q> +wDnAU«ÚǛȧδ̳з̼sdb`ֿ׿ƧģǥؾپֺպֻپڿŸŸĠš۽ġִܿǡ{֫Ʈ͵׾ͷݨЙ}̑wɎv…l|YsPqKyUyͫݿۻۻڼ۽ٽ׺ԸӶԷֵپ庋т@ӈ5Ӊ0ԉ2Ԍ1Պ1Ӈ/΂)ˀ.ՑB٥ڑսfή4Ϊ˥ѥҦ΢ɚŖq×ϟӤҢѡ +եӨϩ"ϭ9ػSiՊ֍Љӊܕגܗޘݗߞߜߝޛܖܖߙڐ΁n؟UP?DI'[5m>j3v?w@ Z"W _(y52G PCBQLAPj#ώ0ڛ:׉yp ṽاAPVWRG֝/=EسU̫OɫT<̧QɧTѳ^æWMAHO67ĥTN0{,3;61|*q!1ZZ*V&W)Z)b0c5a0^0^2K&H+zK˷ĔŝɩʬˬʹѸҺʮvdzZǧȦǣȦȣǢşßßǢʦ̨Ϭ˨ͩԲѬ˨αͲȮğث͸ѽ૏љz͑vˊuiuRrHyRyãٽػػӵԵӵմڿ٩p;х/Ӈ*Ӈ,Ջ/Ӌ+ԉ/΄%̀+Ռ:՞ٔӌkHھHַ6ί;'(5+ϰ5ֶ0ObuׄݒՕpduאܓޛޗޛޙّٓڔӆi9T*??I&\3i2g2f.Y UUV `"i(u0w-v,v,u,x,4FQZvDߕ.؇~рӏ*؞=MWZLۤ:؝2ՠ8բ=ҫJήUͭQD@ͮ\ϳaƧUD=BM$\+^)a&WX TUWV]"l)i%f"k%k'n'u-;EϘ9ޛ9܊'لnhm sv ӑ+U]צ<Ι.ʗ2ҤCʤH@A<8R˭\αcQRͰc¥QOMP@B=@9572B>_K<C >B!D!6.139D)|e8Ÿàǩǩ̳ͷϸҽֿϾrؾۿؽٿٿ۾ۿؽսӻдԿɭĬ껡箏ͤ{޷{ɊjcqӰھ˔[y7Ԉ9ӊ+ш*Ԋ)҉+Ӊ-΄%х)҈0Ŋ߷ߴ߶ܯ߱ܧܥު߭U +ݯڥ֢ЖјȈ~پzҳc֪Rן8FuхۓޙݕޖߘۑՄUkW'<9:AL!['j1d+SOMPTZ_!c!g&g%h%h!h!v/B\҃}r tjfcei|U߰MΞ7ɘ8ѨJǢK>NGFعrٻnӴbHMɪ[[JKLCH>KBJM0~0t%X8)'--,-132;"=&X:YʷœƧǨ˱̱ʹϺѼֿֿеIJwܿٽչϳʭƧʰ繣ꤍƣƣ鮑ҨˬڸNJQ{6҆3ԋ+ԋ-҉)ӈ(Ї$φ$Ѓ%υ.q߲ߵܳݳۮڮة՛ҘіҘA:ϗ˓ɏƇćٺx׶kҲdϭ`̟LҚ9'JօߛݚߞߚݖݖޖۓuՖHQ ?664=Db/vA +h3X&NMMWZ!]!c"f%f#f#h%i%j(y0\؉xmh]_c_fn |p 9ϪOşFãL;;UԶnBEˬ]ʩ]H@OQMç]§`ɪeML?E==9xP/"%-,17: ?'I'U*tD `kιŤŤʭζηҹһپǯ¬vռѷ˯ɰ«챠ij黧ǯʲն׻׼ѳͰԺܿȋQz0҈/ч*Ԋ-ԋ-ӈ+҅$σӄ%Չ.bܯ޸ܴܷٯ٫שץӝϘїϒ=wdɋƋ†Çۼ}ںwԱhЭd͠SϘ>ٚ2ݖ!Uߛ֏ܜܚߜߜӌِِڎԈ[t#9@48:L$[.yBD +i5X%PNKOTZa#h&f#g%i'e#g){7ޜEޕ&wid\]\ZZ\epy̥I̭P?׹gC-FåYFLEMAOORRɬdKMJC{+6;:>wL.*((+/3H*Q+c;l9ENPIŮ;ϻžŨȯͶζѺ˭ʶƳñԻ͵͹ȴĮ챘쯖İ̱Ҷϵʱ̵ֶи̱ҶڿƅA*ц.х)ф'Є!ф%ς!τӅ"х(SҠ޶ܲݵܲ٬ڭ׫רاѢϚΑ͔=}s܂!ʊĀݽ~նsسlѫ^ʤVȚHΗD\ޜ#݆ܙٖٕߛߠޘؑ֎ّۏۑЄDVt/L#R)^-p9}E SZKe.W&QLMORW^ b#d#e%h'd b$E ٕ5׋#{ ofb_[[[\g 6@2˧NmsHHRĨR̯Z/Cͮbȫ\JMTIJAA7x*D}/3|1mF +)-/49!B#S-o;}BIPQRT b#bij˸ɷο¥ƪȭֿͯչԽʹɫγҸҹư쵛魗穙奕䢋⨐̷ϵĥ̳컥뻞ŦҷؿپڿڿۼͅL}0-̀%σ'υ#΅Ӈ&҄"тЄ(ܖAʇڪޱܳٯجתԧԤԢӤϚΕɖIwqh1ܾyظuյqӫeЪ`΢WƘIӡQz= hדݘݗߙڎ{ԓMGEQQAL<@=BF99t+Z8=%B&M)[/m7s;DFKNPRQTW f!iŴɷͽ̸мнɯٿ꾨˴ç⩎赘赘߫ߧݦգܭéѸw|ʪ崜̯ԸԹҸҶӹѷҸ׼ؿ׽x=z1}/'ш*֊-҆$Ԉ'Չ(Ӈ*҆)׋0Yϖةڪשרר֨ѝОϙΗɑ˖Ntohmߕ/߶kԵoԲhҫaˣYʝSƔ@ӠHwa||}iޜݗޘߙڑ`tDMX Y WV V ]YMh1W%V"W[#WV]"c$g%d"e$d$a"\N g]jghorgcad{ʝ7ЯT)Bΰ_NC2TZѴjϮa;78:;0ƩZDGFT@IA;Ft+K*Y3uC I I E~AEGMLLPRSSRz;¬zǷǶʶɹĬٿ׾ɱ̮ۿ׻ѳҵԻͶϯηơw|èԢʲ϶δδͳζϴѸ׹Էq/}3Պ6ԉ,Ԍ,؍,َ.׌*؎(ԉ&֋)ֆ(O#S%U$Z&\&["^$f(k+k*h(d%] `#=c\[ggpfhccnͅ$Σ@H-ãM>x#8CŦ]G]C:8CKåT6¤\PDHM4D2}/Bk!A#U/qCQOCADJKPORQORT\Xƹ̽Ǫ׽ֿվƬѾξʼĥվȫ۾ӳΥ“|||Տऋ뽠뼣ǰɵ̷ξѾαx:у2֌2ُ.ّ.ܒ+ے+ޒ-ܑ,ߑ1َ.Ո,ى0׌:ݧeǍϑΘΜ͚Ϝ̖˕˕˔ǐ]sigmsj~ܩ4˦SɠVŘD̑7Fvߑ܎uuwn}y٘ړߘܗӆ̑6N|9W=kˀyز`œ?aGBm8YOP"GS ]$i)o.q/p.o(h&c%n-d \^e]v jjdfr̅ ϡDJ5ǥPB}-8@¥^UOťYSL89GHAJ6DL7n=r'[1Q,O,N(O+S,yHUTROQQPSSVWWW dƗ̴ҼиҼҺӹ㹟㿥Ʈŭǰ侥๢มඡ丞踠䲙䯛٦ۮ޾✑qw[tkQwwvyʷȫ⾘t5π1Ѕ/ф*х&ЄЅ Є!ӃЁ~yxhX +^q.Á=ņDӡ_ϟW۬iڳp߷{v~Mvmiihkllmх8qԆJjhlloopoHgunpqsgmoGӒ6̀́~уЁ~~vqrnhbܯLpRM_lw'2r"Mo<Y'IK P#z@XUSRRRU]]eЈ#ޯPIPLL6EZPBBIH£V8/9BAK=q%}06u)u%0]W/M,N,Q,P-m?W]URQSRUTQVZTU ZCˣ ӽλθѻкѼ׭ยฝพ㹣⷟߲۲֮Ҧ͠Ȝ{Öv_ϏuDzޥni}ʫǸʹܵv4҄3҇2҇)ч&ӆ(΃!΁ }Ё|wspn] +X gx3y3w-~46Ć>ǍBÎ@̒B +nheeejnpgvֈTsrfdfmlkjt|+kkomouj[FBjz̀~y|zxmnefXح?դ7gc d mmk^ +_XREAq;y>VRRPOJS]]^}ߧKEFGX@@[S£[I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w!ⴄخwڮy۱}޵ḋ住็ỏ従ßţɣƣǤߨ܉ae݆a_eleލYߐ\܊U}8Ђ+Ԋ2׌4֌1Ӌ,Ӌ,ؐ,Ս*؏*ڒ*ۓ*ؐ&ڑ#ؒ"؉]RN[^SNFEDI>699;<?I`eWQHIJZ0Vipstvwsttttqonkkli߽]a۴PׯJկJѨDΝ4ϊ"ъ$Ї"ˁ!vq l jjpm j k k i j nw{x ӎԕ%Ň{Âݬ;L[kuŚ2kmlmifdfgcbaggea‡%m _`]\^ZXT\YYTWU[W XW YUt;ݾۿ絠rjyclXXLL;G(A ЌUТdէdЧ_֫^ѣWs1.r>V@ӡbMp A7 ԋdܮz٪wڮ{ܲെ⺌⽒™˜˦̪˪ήƣՐu݄d܂^߆cdpsi؅SބRb܎Vw0҄3ԋ:Ԋ2ӊ+؏1ݕ7ؐ0׎-ޘ5ܗ.ܔ)ؓ ܔ$ږ"v ROT^[QGFGIB15;88;?IVWWLFEWJaiqptvtsprhkj߾h޽g߽eg߿f޽^ڴPڴQذLذKҩDЦBϘ0Ҋ#ψ̄͂xytt vuxtstvzŁǀЈښ*MNF֨6ܪ5߬)M8L.F#CޙdΝWʠZΥ\Ш]ѦYΠP̚LUx4ALyCwÈE^0MX*E& +% 1|}ڭs~۱|”ě”Ơɥ̩ϬҳΫ麝ډo|Y߆f܆dkssObIUQOJFvM]inqsvuwn߽i޼fݾfi߾gdbٺ[ڵRٲMְH֭KөEөEլGФCƆɁ}zwx|xvvwr puuxхב#ԓ!MߴMJݳCOݴCOTVX^roӯKadm i ~Î)ʝ9޵Sbxqqrip{֮Oߩ@ڗ0jUYWUTUVVTRUSRRSM M +o7fƙtѳͱƭˬÛ{`C.;"9< ?$: 9 75;lHyOe8d&K!o2˟SǜN̟G5ǐ?H}8–?٩VWWZ$U"Mf;ɋYzܭtګr㷂幆ŗŘ—śɠʢȦͭ˨ͩͩĠ秋volr~kJ[;rInq܉div{|cܙBݕ7ޖ9ߗ4ޗ/3ߚ/ݗ,ܗ$SKPVVPHFFD8/.>8337<MYXKG1H`iilklol޻fݻegj߼bۺ^ܹ\۶YسVذL׭HӬFѧIХCҥ@ѪE˝>}!uwvtsnnq kkiheatޕ-؜6ީ?߲KGKQLJ޶LUU\WeoplϞ7ݠ=ާi=|~zݲw⺁㼆ÑƚřشƢɩ˫Эǧ䪊݋lۂg݀djlkދbh݊fތfk܋_ք]؂YzRuEێRޘTߛVޛDޘ876552ޘ&+ׅNLQVOJGEA;6*3=FDT\fniZH1IYgjlmgdiܺdط^ڵZ۸_۷YشU״XٴY۳R׬IХAЦB͡?͡<Ҥ@ЪLÙ?wru o +qmmkhceggfЂݗ.J]Q޵QNXQJ޲BHMS޷NSimnrdްGELNZ`nqkolnfZhjkpy XTTVUWUUX Y SSUUUTRd+dȼܽ췙ꥃ栃ֈm@'789S0`֐m{{\,*)257 u;m5Y`3pFb2y*:AÚAȗEifiz@ fh#Y!ުsŠōx{忇߸~~⻃ἉȚˡɤʩ̫Ƨ؍t܁jzbychnk܃e܃a܆cފf݈hۇg܋cԃ_}X|RoHi@؇T}DݔLQG69>6)׊\ONRSLHDILQ\dhjph``^beo0NVZ_߽a߻`޹^۴Yٴ[ص\شZկPׯVӮUײVױTֱTҪHҦDΟ:Р;ț5˝8ϣDƝ;;n n +ln jihcdgcdeЅ"ޝ7M^]Z]`YKGGܱ?ܭ=ޯ>QafnsrpܶQۮGۯJQ_cqpcllk]WcjkşC[ WVUVSRQQRQRS +QQ P +NPf5r籜}斅랃o\B7#2->#jBn̞轍㵊ӏlX72-4- j2j5k5Y,dYn:xx))5<1-h1eYp8y>ڨj߲q߰v}羆⻃ݺ|ݴz޹ݷȚͩˬѰճ䲐ێsby`{ceol܃d݆g߇fމi܈ky܋lڈh؇e}Tes>v:`ڑ;ߖ1ޗ1ە.ِ(׏ۆ oh_]X`Zfhidcegefdb[QRSZ]h#ߠ0FݰOٰSخPٰWٰVײYسZرV֯TذXԬRԪOժNҧE΢@ˠ?˝:ʜ7Ƙ2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YJH2>(612D'Y.b?֔m䲄㹎渏xOyU]sToQd:dBgEfJZ7ER*C֯]5!}Z |VoITUMؽʔ̘đҢmԗfא_׎[ԈUсRvFrIlF]7R0uQ䯃ܲํžŤ幘井єovZw_y]{_z]b؃f؂iكgՁeوj҃fՅjuVV9D(Q.d8d-f0d#eedefݩPkQDŽ1oX C;>=FNVTNVTT[RKDBDAISPJW~Nj7ō8Ő8ő;Đ6Ƒ8Ï63Ê2*)+9ŧYָiռoδjJbc hfkhigj ߡ?]ڮNfkqխNbYbb`VS۱Cժ9ة8ګ9ڬ@Λ(~ ר?gbr||yʧEرHѦ=˚4ԧEӨDծG޼]i_ɘ/ѡ:ԫF޸[۳Mהڽjfr_ͅn_]Y^Pe[[FM5>%8#4"/0>&fB㩁䲌繎̋msWuZەxىrՁcyVpGiFiItOxLz@;{)<ʟH.ŞDǞK-~,ٱrŕݰ˚ݼḆїlԎ]֌\׎^ԅ[҅W΃VwVX9S4T8jQ㭅޴忘ඎ޲ܮܮ՚yrRtXy]y]z]}a{b}b|cԀgՅoՇqՇhR7?*N.]4d7`3c2c*cbdĉHٵѧɜֿնtӪcϗXВOыB{,iWP@ACAMUK>Hi~&&-,0}$z#z xqSӕڜ̭gؾtɋءPgeigd hj̔7Տ*_qeamqfdݹWedjTٯGخ=ݱ@Λ&֧5ܮ>Ȕ#ĊߵI_ggw~ֳW Ő)Ɣ1ң@֫MذNְLԬNխJŘ0լBXܹTxݪň׵i_io^Y|ܹgYledMR5H0D.;!5!/.4<"yUݦ{䰉䰄蹔ˈdjMkQdՀf~^؆^vLqSrMvPqK{Jd*Sa2ȢI3{%fx/ǑXɚ̚ɚǛԛn҉^Ӊ[҈ZՊ`цYЃXyVc'<(:&6".-.+K/ڜw~௅ޫ~⫆xZnSu\Մe~`քcԂ\]fKuRvPkAj@o@TN Qr*ofVXKբةʝē̟Ԛiш\ӈ^҈[Պ_πSmClKmF6V>mL^AQ4~إ}բxکݲ޶⼚ທףs]t[jOnZpSw]hRnZqdjQoTmS23B(iDQ/S2S$Z(d%b!o.ď׽׼ֻ׼չپؾջǙĘɝˡʚԤӠ֦ޱ߳ݳ̘Ӿʮw]O^)V:ĚϵmȃբשԤ׭߶șE@dafg`linnllfa]X޴GܳB޶Fܰ=٭7Ν'ڦ/ӥ3Ҧ5ԩ;“&ǚ*athЭHӫFׯHԦEԫHլHөF۱MӨEݻ^eǝ8ė<šCŚ>ҨMflmlgcarՊo[A';+:#;*4%.1 (0"5%鰐٣|اyˤě㮊xZeJmQۇkx[y\x^vUmIsOmDj@mDa4c:V(PK M UPG ݪtПѣ̠ǗЎf҆^҅\҅Y֋]ˀXd>uMnH;I-\DfM^MYGܑo՝sګݱߴ߷ݺ޺ԢwYhPkUkPeQfN`JkVbFfGgN9$,8!U;L1K%ER)c%g(e(‹ؽӸԹԸԸдӶֺչֻ׽Ô׾׼׿Вďǐɖ˛͙ΜРҥثܮءʰolj‡դ̯֨mڝ,Ⲃݨݨß潑աtڤvܦvЎkjPxZvVpNpRpStTxNh>b;X3Y(`+Z+LQ'OKJ˝Ȝ⺑ޯ؛pˈZшUӏi㼒٩ыeՖiآuЋj;F&mGcAT:D+=$<&ۯڰ۱ٲڶթѡfT;R:N:Q=XEP>P0>/ܝ٫ݲի׬٬əuŎqcPO8K0U@L7U@M5T>N:L4q"19$/XHZ1f6m:˧u׸Ӵϱά|Юί~ѵбϰϲαͭ~ήϲϴ~δҹӹҷϵееӹмѻԽս׽ջּ׽׾׽ÑÐđǏȑǐÎɯuN͙ɓҢĵ.Hgn`qzyurslݷ]ioaXcYݳFLJ޵Cڭ;Cݰ7CQPR\`djo3)‘(Ѡ6جEOVSZ`mnisup޹bb߹W]߰Ӳۤٓzچo<,7'7-#,%-+cN籍x`|[켑ⳆߥޝyԕjՐezZ_[yW}`wYttPlF|[Y2B87O.K#]2a>˦٫}͙izRڢҟyզʫدsG{S`6Q3X>nLnDa7cCր\zTgK^DbKeMؘ{Ӥ٫Ӥ֧ʛzmpL;L-Q7F8H5I9N8D1K3rc aqB%xT_@Q,U'Z0gԳѰ̫{Ϯ~έϮ̯̮~ͯίΰ̮ͯˬγԻˬxˮ}Ȭz˰~ϴѶϴӸжϵӹѶֻҷӹּ׽ؿٿ׿ؿؿƑսkJǐԿËϠͧ.ҕ5Yisvx|{nkprspinaaaٯJN޵DHܯ=޲Aة4ڮ9ݵBLM۲F޸QZirڼ_{ʛ*Ӥ7ש;کDݰI߳LݳK޸QUkprwd߾]mf`^ܪ΄iEݨ㳐ޛn\O69"M2/#(+)﹖罒ߗulIbKdWkNՀZtޕrҋdь_̈́ZXuSuS}`؁dـdւdփ`rGyPh;_6D!<%:!M+_8c7쿒ׯΙlƆ`Ʌbک֩Ģ߻ˇ_O(`DeBR4P5pG܇[`3S1Z@jLmLlIkq\\B΍uӤѡϜ|ȕxnycrYC.J77(7070]Gzcr``Jx2Tc +q +y (4%R3jPdmpoݺYbbb`aԟənJǖw͇o寓ydfWcOB*;!1$)"m^븎ߕyaJT:`EdLeGkNcCwUzQ̀V΁^^vVZԂ`]ےr̀XyV\|[Ԁ`iDt}wQ;:;ڞuѡr˓g~X֝~ğˣǤګ0C-X?d@V5mK܁R[P&M+N+qTT3~\w[cE4$B8g˜|ɗzős~coYvWK;1-,!2(eOo]WD%cO8&a +ry} } w G/|U̥ʦ~ǥxɧxȥy̦ẉzÖo\”kŠv›r vxro§wǫxƪy̱ʮ|˯yβ˰ϲͲϵϲϲееӸҶԾֺٿֻֽе{ǫmѸ}̱xbF]Ʃkihmmjn)0ŏ-ܡ>_surw~yryvs߻bծZgn޷Q`bd^SOE޵>ߴ@֪5˜ʟ/˚*լIg`d޼^ɢ?͞/Р3ϟ0͚%ѝ#դ0ѡ)Ԡ+ک6޳I]޺]fdmjbhc\ȇбdƐjڔ{gPבxo^jZQDM=<&2"$"ﲘ⢃`KVCTA[D_FgMlT`GfOR?lSӁbхaxv鮋墁魆媅⪇嵕ݟ{͆_zؠrښrߝwX9=kDڡ|ΝpȐjnP孈ʨɤӮc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]ϧb̤_ǙWF@{3t,j+g$dr5~FDBr.f*}WwQrJoHkE jD dCoHTxSrM\< P5O3U;U=V>bK]IQEPBVF!VJ&YL,\P3qĨʮδͶϹӾӾӽӾӿӼֿԾζ̵ստҹ׽Իѷʮ§ueVxGt=o8p:f.k3q8u:x>~Cz<}?v7y=xCDA;935;IʡVԨZˣUɢUƜP–IE“JƙKǚLƖJÖHB“C“BÓB@?̛LҥN֧WѦUԧVѥ]ӧVث[ح\٭XجWثWڭZ֫W׭Zح^ح]֭^֭aҪ]ѧ\̟TФVϦ^ͤ[ʡWʡWʠWϧ^խdխbծeӫ`Ҧ_ʜTH??{2{:y3x6{7|m9n:u@|Hw;|C{C}C~C{?w8z:|={9|JțPƜOɡVǞSěQ—KE•GǗKǙMǙOĕJ×JCA>@A=H•HGĖK•EǘH͞R֩[گ[ۯ_٭XۯZگ[޴cܳcٲbڳhխbΤZˢWɠQШ\Υ]ˢZɠUȞTʟUͥ[Ӭd֮eӫbѧ\ө`Υ\̟SśQĘNI<=7:{3p'n#k-k,_~UzSzSXW~VwPnKb?fEfEdEZFgO ZGL=PE$SF%VK(YL-laCμ˲ͷθѼѿӿԿӾԹҿӻֽվսֿ׿׿ּҶɮǽzlY|NzF|DJ~HFEE~AFBx7y9y;|8~8:w6p&j'[[ tTrRsR%tT&pV&WFI;QDRE#[N.\N.zoS˱ͷͷѼԽҾҾӾҿտǵ~׿ջеɮʺ¯v[UWxAw<~Dx?s7r4x@z;|;{=|;|<{:}=~A@?HFKG><@>;989@BDH–I˜NÙNB@A=8CAC@ŕG̟VʠTǜỌYͦXͦYȠUɦ[ѩ]ӫdЩfΨaѩ^ʡRɟSͤZͤWΥXˡUˢT̤ṾVѨ[Ѫ^ѩZѩ[Ѩ[լ`խbҫa֮aױbر_ծ^̥SϤSɝMȟTƞXěQSKK~7r0p6k9j:g1pZ(WGMCPCWK'SG&\M.}gĻ̴ϹθлҾҿԿԻ¼qøԾٿؼѸɩƷk\~Ms~={>A}>}>{;|=~=>~;@HGGÖLGCCDH˜HØMÙN™OÛOŚMIŜRɠQǝVŚU˜PʡWʤ\ͤ`̢^ɟYȞUɡYˢWͤVˢXɠRȟSǝRɠRΥWϧ]Ѩ\ΥVΩZΧYΩ[Ϩ]ԫbԫ[خbױ_֯]ի]ӨZӧ\Ҩ\̤WϨdΨcƠ`ĚZIQTN{Jq[+SFNEPCSH#UJ+]P4~fĻζϹкҾԾ̴vç׿ֽֽ־ּӼͳģķtcQzHyE{@}A|AC~Bw:xs=sEBC?CAAHIMMNQěWÜTÛROMšP›QŚQśPęN›NHJEK×MHƚOÖIŘIŘNǛOʜNȟPȞOˢW̤VΥXͤVӭbկjױnֶrմpͧaȣ_ʣcĠa]x=kW$VJTJ"SG!UH"`T6l_HεкϹѺѾտmӼؾؾ׾Էϰƨŷ|fXMPLMDDx=y5w9u6p.s1v2~;z6}:{8~;~;~;;?ECF7>8>COšVLNPĞWÞUPQIQKšOFNĝUÚRNJ™O˜KD™KĚNLØKDIÕIŚMƚPŚQƜNȟSЩeЫfέkΪf̥`ʣ`ɥešcYzFkS#ZN#\P)XK%[O&_S.ynQεϷиѼӿӿҼտԿӾyjؿԺαˮʽqd^KG{Aw9m/m2k-l/m/v8x6}=}:;}:>|>C<;>JKIDCA~=DMMLEQUŸ\USUSß[àXƢZ̨b˨dʦ`ʧ_̩bɢ[ŝRÜQORPH@@GENOZĢj£kXj3jVhS"gU,hW,fY/o\;~īз϶кҼվԾԿӾӾԾտ|kwȶԼӸȪßƻqZMzCzJ|H{@z?y=y?wJNKGHPVWWVŸ^]QLBORœXPLPTedfgOsa+jZ(m\/l[-m\1xi=vũζкϷӻԿտѽԿӽԿӿ|kѽֽϹŪǽvp_`SNNNONPVXTPI|?}>>GPRPPW[VTUTVQHGPYVLIIP[a]\Jo`.hY*m\1p_3sc:xPαѸѸϸӻӾԿԿҾŠ|eӾѷʯɼzynih[UVZ_`XPNQRJQTW\XYVSTNOKKKMLLBGQ]c_WyAp`0k]-k\0m^2vg>oæϵҹҺӺһԼսӾӽԾտԾѽҾԿӿҿēqɾҽֿҷѸƪæɿƹñvwlnea_Z\YVTTVWYVRRONJONNI=>?ENV[TRq8o^+l^.qb4ue{r βѷзҸӺԾԾӽտӾҿҿӿεؿսжɰ¥;¶|ndjf_\TRXSLKQTWQKM~DJMR^YQi9o_-pe7reChĺѶѹӸԹӻҼտտԾԾн϶׾չҺδŦɺwof]YZVUOPYTOPIK~KSY[~Nwf7o_4rf>z]ɯҹҹԺӻԽԼԿԾտտԿҼӾѾӿѿҺֿռҹҹεäͼĵò}qeYWXNPL}I|J~NUL~MqIwe9rf=zVĭѸҹѼһӾҼտӾӽԿҾѼҿҾ \ No newline at end of file From 7394e53f30cad96f7a6227a4665d737ce91b7712 Mon Sep 17 00:00:00 2001 From: Dave Yeo Date: Fri, 28 Nov 2014 23:34:20 -0800 Subject: [PATCH 461/822] libavutil/thread.h: Support OS/2 threads Signed-off-by: Michael Niedermayer (cherry picked from commit 090a7801a8817c1fbc6db0ed39070bf82255d8f2) Signed-off-by: Michael Niedermayer --- libavutil/thread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/thread.h b/libavutil/thread.h index 62e1340ceb..a004fba3c8 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -24,10 +24,12 @@ #include "config.h" -#if HAVE_PTHREADS || HAVE_W32THREADS +#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS #if HAVE_PTHREADS #include +#elif HAVE_OS2THREADS +#include "compat/os2threads.h" #else #include #endif From 1579f14632223d7ec0da43d3b1090bee127e78f9 Mon Sep 17 00:00:00 2001 From: Dave Yeo Date: Fri, 28 Nov 2014 23:36:06 -0800 Subject: [PATCH 462/822] libavutil/threads.h: correct an include to be local Signed-off-by: Michael Niedermayer (cherry picked from commit 32eadfe453c32788ea57968e6e80f673f434739d) Signed-off-by: Michael Niedermayer --- libavutil/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/thread.h b/libavutil/thread.h index a004fba3c8..973366182e 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -31,7 +31,7 @@ #elif HAVE_OS2THREADS #include "compat/os2threads.h" #else -#include +#include "compat/w32pthreads.h" #endif #define AVMutex pthread_mutex_t From 93360af0d7bf050a1d4c97b69e6d606e2ba12cc9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Nov 2014 01:01:17 +0100 Subject: [PATCH 463/822] avutil/buffer: use the old atomics based code for the release branch the old code worked fine for a long time and was not affected by the bug the new code fixes and the new is not widely tested yet. This can be reverted once the code received more testing in master Signed-off-by: Michael Niedermayer (cherry picked from commit f783259fdb37e288643fe54ac162d723b1bec548) Signed-off-by: Michael Niedermayer --- libavutil/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 0f9f1a2992..4e2a94bfe8 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -25,7 +25,8 @@ #include "mem.h" #include "thread.h" -#define USE_ATOMICS !(HAVE_PTHREADS || HAVE_W32THREADS) +//#define USE_ATOMICS !(HAVE_PTHREADS || HAVE_W32THREADS) +#define USE_ATOMICS 1 // can be changed to the above once it received more testing in master AVBufferRef *av_buffer_create(uint8_t *data, int size, void (*free)(void *opaque, uint8_t *data), From dad7beaceb652864cd16747db4109e7b9b2b4ea1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Nov 2014 01:17:56 +0100 Subject: [PATCH 464/822] avutil/buffer_internal: leave the buffer pool entries volatile Theres no reason to remove the volatile keyword in a release branch Signed-off-by: Michael Niedermayer (cherry picked from commit 0e216ed40789e382eb6725d1cd0941927bfd1400) Signed-off-by: Michael Niedermayer --- libavutil/buffer_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h index e6530485d3..befeb684ae 100644 --- a/libavutil/buffer_internal.h +++ b/libavutil/buffer_internal.h @@ -69,12 +69,12 @@ typedef struct BufferPoolEntry { void (*free)(void *opaque, uint8_t *data); AVBufferPool *pool; - struct BufferPoolEntry *next; + struct BufferPoolEntry * volatile next; } BufferPoolEntry; struct AVBufferPool { AVMutex mutex; - BufferPoolEntry *pool; + BufferPoolEntry * volatile pool; /* * This is used to track when the pool is to be freed. From 394d3c937a764c4972ff7ac4dc0045cbff91f886 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 28 Aug 2014 13:15:50 +0200 Subject: [PATCH 465/822] Remove non-free tests/lena.pnm and adapt FATE tests to depend on lena.pnm in the SAMPLES directory Signed-off-by: Michael Niedermayer (cherry picked from commit c4abee734dcbdb589925dd6da98041dcf663ce49) Conflicts: tests/fate/vcodec.mak Signed-off-by: Michael Niedermayer --- tests/Makefile | 2 +- tests/fate/ffmpeg.mak | 2 +- tests/fate/seek.mak | 11 +++-- tests/fate/vcodec.mak | 3 +- tests/lena.pnm | 109 ------------------------------------------ 5 files changed, 10 insertions(+), 117 deletions(-) delete mode 100644 tests/lena.pnm diff --git a/tests/Makefile b/tests/Makefile index ff5fc2b34d..cf64e7d0ae 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -28,7 +28,7 @@ tests/data/vsynth1.yuv: tests/videogen$(HOSTEXESUF) | tests/data $(M)$< $@ tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data - $(M)$< $(SRC_PATH)/tests/lena.pnm $@ + $(M)$< $(SAMPLES)/lena.pnm $@ tests/data/ffprobe-test.nut: ffmpeg$(EXESUF) | tests/data $(M)$(TARGET_EXEC) ./$< \ diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 21cdd5f4af..fa2ab4236c 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -21,7 +21,7 @@ fate-ffmpeg-filter_complex: CMD = framecrc -filter_complex color=d=1:r=5 FATE_FFMPEG-$(CONFIG_COLOR_FILTER) += fate-ffmpeg-lavfi fate-ffmpeg-lavfi: CMD = framecrc -lavfi color=d=1:r=5 -FATE_FFMPEG-$(CONFIG_RAWVIDEO_DEMUXER) += fate-force_key_frames +FATE_SAMPLES_FFMPEG-$(CONFIG_RAWVIDEO_DEMUXER) += fate-force_key_frames fate-force_key_frames: tests/data/vsynth2.yuv fate-force_key_frames: CMD = enc_dec \ "rawvideo -s 352x288 -pix_fmt yuv420p" tests/data/vsynth2.yuv \ diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index fe8d3ab910..9ee6d3d9e7 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -144,7 +144,7 @@ fate-seek-vsynth2-wmv1: SRC = fate/vsynth2-wmv1.avi fate-seek-vsynth2-wmv2: SRC = fate/vsynth2-wmv2.avi fate-seek-vsynth2-yuv: SRC = fate/vsynth2-yuv.avi -FATE_SEEK += $(FATE_SEEK_VSYNTH2-yes:%=fate-seek-vsynth2-%) +FATE_SAMPLES_SEEK += $(FATE_SEEK_VSYNTH2-yes:%=fate-seek-vsynth2-%) # files from fate-lavf @@ -226,10 +226,11 @@ fate-seek-lavf-yuv4mpeg: SRC = lavf/lavf.y4m FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%) -$(FATE_SEEK): libavformat/seek-test$(EXESUF) -$(FATE_SEEK): CMD = run libavformat/seek-test$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC) -$(FATE_SEEK): fate-seek-%: fate-% +$(FATE_SEEK) $(FATE_SAMPLES_SEEK): libavformat/seek-test$(EXESUF) +$(FATE_SEEK) $(FATE_SAMPLES_SEEK): CMD = run libavformat/seek-test$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC) +$(FATE_SEEK) $(FATE_SAMPLES_SEEK): fate-seek-%: fate-% fate-seek-%: REF = $(SRC_PATH)/tests/ref/seek/$(@:fate-seek-%=%) FATE_AVCONV += $(FATE_SEEK) -fate-seek: $(FATE_SEEK) +FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_SEEK) +fate-seek: $(FATE_SEEK) $(FATE_SAMPLES_SEEK) diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index 5c8c1979b3..70c7ff5001 100644 --- a/tests/fate/vcodec.mak +++ b/tests/fate/vcodec.mak @@ -294,7 +294,8 @@ FATE_VSYNTH2 = $(FATE_VCODEC:%=fate-vsynth2-%) $(FATE_VSYNTH1): tests/data/vsynth1.yuv $(FATE_VSYNTH2): tests/data/vsynth2.yuv -FATE_AVCONV += $(FATE_VSYNTH1) $(FATE_VSYNTH2) +FATE_AVCONV += $(FATE_VSYNTH1) +FATE_SAMPLES_AVCONV += $(FATE_VSYNTH2) fate-vsynth1: $(FATE_VSYNTH1) fate-vsynth2: $(FATE_VSYNTH2) diff --git a/tests/lena.pnm b/tests/lena.pnm deleted file mode 100644 index 700508c86c..0000000000 --- a/tests/lena.pnm +++ /dev/null @@ -1,109 +0,0 @@ -P6 -# CREATOR: The GIMP's PNM Filter Version 1.0 -256 256 -255 -}߈v|{|rބu݄nފv߂kބj܄pg݂tށsjrvrrwzyvxvtwfvvZaP_@T>\=YEXGXJZIZJ\NWJVLVOZLXLXNXLVNZNZJSJTOVSYTZXZTXZY^Z[\`\^\\Zf_b^ebabbbkhffd`b]b``^g_d^d`a^hahjb^ebfagfebe`ddfbgdhef`d^ffjffefbjfgbidibichjheghknhlffe_ddf^e]cbcbjhibdadddbb\e`hbf`g`jdd\fd``jjplgcd_bbe`d`fgb^b`e``eiebcc^b`cbccabadbbbd^^bcba\`[dZ`ZaX_T[PXHVLPV\`]lbqlzlt܄pވnފrڎv݂nzg~jڀjlހn܀rނr݀pކxނn߀hހj~j߀eހlf}f݂jށh܀eބh܄m܆n݂jކq݈q݄p܂h؄nn﹅ȐΖОԣԜԟȐ⪀rjM\HXPZOZX\Z\Za^`acX\^^ZZ^bdh[c\aZ[[^ZZZ^^^]`_^`c`b^_^]V\`c`bb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֎אՖܣږԒڥܧޞܤܦئأڮ৕޼ܮ޹خܪݧڮ߷٩ڢ֣۲⿶㿵๲⹨޼ὰ۴ݮ⻪ø´޾¶úļĻŻǼŻƶŸüſɿμevBKYUhaul|lm~joj~lh}otcojZZHJ:Gg6J8F>o>aҼ޺ʐʢϽ˻̾̾ɸŶƽńMcKDP@ZAZB^Ab@b?fBbB`<`=`;b<\>V9]Ab?c>iAbB]EYCgH@dj}ЂԂ~zzxxx{~|ш׌֊|؇zֈyԇ|Ԋ{Պ}ՈzӉ~҆|ԉxъ~Ҋz׊yN>M>N@OCOCREMAL@L@JDPISHSGPIOJQJRMSOUPTFR@R[YМq|aHT:MGTDRHWMWGSHR>QGUNUU\Y`X`\_]`T]^fY`N`Zk_c`ghgdf]gbfjd`dRWGTYeԋފڋܜٔ֓֊ۣ҄ٛ׌ؗݦߧުٟۡۛݪ߲߰ڪާױ۩ݴۮ۴ڦڠٝխ޸ݳḨ⾵ུയඦῴᾮܺݲᾮ¶¸߽࿵³ľ࿰޿ڹؾľƼǾŸȾ̶htXXcXtfyh}h~ilhj~lxeschbRQBI-D]:]#Jfʸ̴۴ȖΰооλλǹݻŸķȺĂK`JDR@\C\D`GdDdC`8\:\9]:d@`;[@]A_>eBfBd>Y[F|*R\t|ф|z~t|~шԌ׉׉|֌~և|ԋ|ӈ~ҋ҈yԊ~ч|ԇxԇ}ӊ~։y>M@N>L@KBO@JDNAK@L?K>K=J@LNRZXnct`jnnxqwpllpgvefYSWFO4G0F+E0F4J8I>O?LBODNALDPBPALCNDNBL@LEMIPFPHMMSMRMPPRMPJRBUrhΞg`VKS@NGR@LJTGSEN8QJXTbVZNYY\abTXZb\]R^_j^dR]\fhgdlrtnngh`aKRDTajxyۅwܛےڎڈzԊԉؘ֞؇zԇؖ૜ݦकޣ٣՞۪ܪ߲ۨެثڤدݦ۲ڣ֘Қڤ޸ޭ߱ݶ们⾶⼰޻ܵന߼༬޼ݶ⿫÷ܼݳ޺֧նھۺ´ĻĹ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ܖܙޜܦڛڐܢ۞ڜ؟֖؜ڔڢՠٟޮ۰٪أئ֨מצٮخ۸մԮڰزةتաלԠԜը֭֭ԩСϠѢɖʐǙԱòêݬץӦۺ༰ݼŹʼ̸ǸIJ۸ܼ޿߻޾࿳ø¸ŻĹƸ٨נܲ߾ƼȽʽպ^fKCR ;Z=[<]=^Db>dD\BX=Y=]JBN?LBJBN@K?LCK?J@KFNDNCMHNDJBM7NTXԭwts\zch_jbQSjbTSMNCNHPCPP[FRHZJ\SXYdT\PTP`L`ckrxjlwyzulqnpvwрwY^Zfpr|t|yyvԂ~ԆztgkprprԇՍ؏ܥٙؔ֋pt֊ݤޠޠܚՍی{ޟܜܚޢݧٛۖܠڞכؙ׏טڗܛ٧ݦۦۣڞ֨ܬ٪ןڨخٵڶײר٢٦ة֮Ӣԛӣ֘֫թըϖ̠Ɋő͢ݿ®޳՞գ޹޺ྲĹǸǶƸƶ²ܼܺ޿߿ྴ÷úƼ÷ƶƹץҖҕۥڵƺĶƸѺɴo,HQ@Tc$L_&LV;`>a;eDhDcDY@ZA3\cy|~ԃz|v|z|Ѓъ֌׊|֌׍~։׋֌׋~֌Պԇ}ӈԊ~ԋxӉԉ|Ӊ|Ԉ}҆}ԊzՌ{ԆzGBNCJ>IDJ>H?LFODJGNIODN@I7P\T׫€zjzoper`aX]VZSHNHQJVDOETIYRXGV[b\YGRAWHXlsxuhjtpurkjsurpЀrT_\hnlyvtrzvՁՁ|opktxz~xy،zцՇ~ٜ҂}Ԋۙߚݡڜ۔۔Տݐݞڞܜޜߢژ،ւ֔٣֕֍ܖ۠ڜܠҐ֜ץ٢ܪگحڟګڱد׫ץ؟נئؤ٭ק֘ԡ՘Ԧԟ̐ƎǖۻĮṞ֪׫ٶܳߺƶƵö±±޽ݼ޾߿߽´ĸźĹƹŶܰԔъӌ؛ݸජް伮ʼήƕTU@Z@]>`@_?^;]AZ?\>_;`9_=`C_H_Hn!LJjn}~}y|v|҈Ԍ֌~֏֏ٍ֋ֈ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ܒؓ؋ֆ؂|ߠٌؔݑٗՍ~ϋѕԓ֙֕ؔ۟ܞוؗԓء۬أמ֓ԙ՝ԞӑӚԕգҚŎŃΔٱު֥٭ڪ޲ȼĴòݹܯڸݺܶڵݺ໲޾µøȾȽǺǵ⽭̇ˈюأإkjnqӋ۠ߴѴv}Pc<\>_Fl#R~1\Ijo}z|{z{vzz}Є׉ԌՎՌҏЎև~ԌՇ}ӈҊ|Ԋ~ҌՋ҆~ІԈz҇y҈}Ӎҋ}ԊyІ{ϊ~҇~JBK@L=J>I>L@J?LDPSX`[n^|dilrvrytvxqm|dr`YTFN6H*D,F0H8L>M=LBOBPBQAN@KBN;G>LAJ@MANAJBJFQ@IAK@J?H8K2NziΞjxko_rf{^m`fYpf[RJOGTCTJUJPLWETEYdlrqpqkjjiY`intuaaZhXe`iqqwuqrrptortnqvqryqjgr|x؄ׂ~ցos{zz܊ّ҇{ׂz؇܌ݣے؆ي؆؊ّڐ֎ۆݘٖvqықӍ֊֔׌ۖ֗ڔڜڔٌؚؔۘכՖ֜ӒؘԜΐҔˌΐΐȐب㼦ⱑښ՞ܯܰ޾ȸŲ¯ܺܶٹܸܺ۸ܷܺݼྴ³µ߿¸ĸøļȼɻ˺ɸ՘ˆҒڢנpnw}ʆؙܟ㶤ҼBTN K@M?L=J>L>L>KLM@K@L@KK]EU:^$KaBeBdB^E_Jk+X8bdt}Ҁ}|uxvyЀщӉԌՌՋԈъ҆~ӄ|ӈԈ~Ԉ|ҋ҉}ш҇}ҋ}Љ|ц}ъyω|҆|ч|щ~χ}҉ӈx=K?JBRBPANL>LIBNAM>I:D2G0I찆Ŏyz|ppj~_dTyco]f^LNHPK@M@NBPAPAM>P>J@JBMDLHRHNTT`Xm^zcirttvrvtpml|fqca]DK5E*C'?.F4H;L>OAQM>LJ>JCL@I@K>H@HWXf{ⶬؼ̬T?KbBl)LcDbFcNj!Q2\`v}ւ~xxyzz|Ђ~ӈ~Ӌ،~׊Ԋ~ԈՉ~ӈԆ{Ԇ}҆|Ѕ~шԈ~ԅ{ч~ӆ{҇yшzӆuш}ЉzχzЈ~Ѕ|φ~цz΅}DQ>NBO@NJ?LAMNBPASANBPBPCLDNHPSVd[q^{_fossrsstnsnppa]THL6D+@$?+@9K8L=JBNAL?LBPAKDN?I>JDJ@K?KJ:D>JdOzăْۏԌw_TSZ~Wx`sшڈӆǎzV~pkx^pw5pf Omʆvxؤ㳚঎؏ؖۦⶡƴ²⸥ජຨܹܹڶ۸ڷٹڻܺܽ·øĹŸ¶ĺĸĺķȺοоܮҕ̇|h`;H3Jf>h D_G^Kh N3\_vz}|}zx|wyт~Ӌҍӈ}ԉՊ҈~Ռ|ԇ|҇Ԉшшчц~ш~ц|Ї}фzЈ|цzшzЇ~υyΆ}І}Є|͂zΈ|΃zDNBP>MDQDQ@O?MBMBP>NAJCHJPTQdXpZ{bklvuqpvnvplfp^\RHN4D'>,E0D0D8HLAQ@O=M@LAN>KAKBK=KBP@J@L@F=H>F\;`<]9Y9Y:c?iCbA[B\In%RLjp~}~~|x{v||ӆԋ֏ԌՋԈՌ~Չ~ԌԊ|Ԇ|х|ӈч~Јх|ц~І~Ј~Є{ЄxЃ|φ΅|τ{Ά}Ѕz̓xЈxρw@NDPBMBQ@NJV@PCRFSGPFLHOOQYVf\q^~fhktvqvtvutfio[\VHQ7J*E$?,C2F6H=K>MIFQFM=M?LFS>J@JAM?I?K?E@Fh@^?TD^HK@M?NBNBPBL?JBOFP=H=J?L?JBJJH\"Vnٖ֮}ϒذ߼侭彨㻪⸦Ὥ޸޸߸޼Ἢݹܺڴضٻܺ޻߾´ྰྮ⽭ǺƸŹƽƻǺڪvdXTDM>L@O9J:G9H@PBWXd̃ݧ跤̳ìv/BY$IR=X=[Aa?a@\@\?V@a@h@g@aAX@O@bJIfox~z}vwsx|{ӈԌԎӎӍӌԋԊ~Ԋӌҋ~ԊъЇцωҁ|̃|υΆφ~Ї~·}͆}̈́{̄|΅{І|φ|҆z҃v?PEPEQHQFPAODPAPDN@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O?NBNBNAK@NEOBP@OBOAOBPENEPEMKQIRLTSXTXMPLRJQDL>ROTȜўԜsFMKRKQKWLVU\R[VdXg`i\aaibgBXRgOdPcG_C\7V[A^D7b@i]>XY:b@_=b\=ZEj!PB\iuxvqpjqptǂ·~˅~ʂyʁȳ{ǃ}͆ω~ъҏԒЎҏӐՐ|֎~ӍҎӎ~Ԑ~ԐՓӐԌэььΌшЉЊъ~Ћ~Ҍ{ψ~ψzЇ}Єy΃|yEPHTFTIUHTGSFQEQ@KDP@N:INBODQCOCPDRDRAMENDPCRBUDNCO?MGRmuRUPURUNTPRLQIM>O>Q쬁֫ӜށjPZLPSXS[OZPXFUL`hjbdXdT^T_7W0Q9\0T}$L/Q3VkJ_GDo{1^Xk!P_Aj"N\A\E\Bl)Ts/`h"Qg#Wm(^{S 8M 8K 5E5O>Zi֎xSaSgΉ߬۔ڏՎvĖԜ۴ԤըқћМ̖͕ϜզҊ{z㈁䎄昊蝍覛ꨜ첦첥춧켯LöôƷdzǴ﬚{V[n?j"EeAfCh?hDl Do)Jl%Dl @b>^9]>_g=c@W>\Fr(PVhu{ztnpdp{v̈ЎΆʆȃ|̈́~Ƃ~Ɂ~Ȃ̄΅~χ΋ю}ЌЌ|Ԑ~ҏӌӎӏ~ӒҐӒҌЍЍԌяшЋщЈ~щ|҈|Ї{х{І|ς|΂||BQITITCNHTGSDNDLDNAN>LNg҉yajQeЃݢܚؔؑӔ{̦ҩ׶׳֦ЗИҜΜҝЛӅ|yzቆ䍇撇嘑蟕꬞ꦚĴĸõǺŴɸ꓊bdAJ,Dr?V@T:] :jE}+\C`ҕÃ7Y`HdDZ>`Af>h=fBi BkEl"Jl"Fp(In'HiAaAZ<\8bJ:I;HJPYVj`tfksvzxzyuuwpktbd]QX?S,I*F.F2F6Hc>Z9]:`:f;j=[=WAaFCalqyvtxhjzxωҕϐΌ͉z̈~̆Ʌ}ɆȃȅȀzȁzɁ|ʆȂ|Ʉ˄}˄y˄|ψЌь{ҎҏЍЍя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F]VRLaErx_a;Swݫܑ~ݘܠؙԍԊ֝۱׳ֱزҪөѤ|kTZ`iqwxy~ᆉ⋍⍉損敕癒Ꙓ꜔ꞔ뜏ꛑ뜐좔죕쮞봤ﳡﶦ︦ŲȸƸ|NV,F}Bc9U :R:V?kGw"Px٣q{+N{,LdHn,Nm*Ne Ef Hk$Eo%Ho*GjCb>^>bBa@d?f!E^?TBe K@dbsrwrslqnsȀ|ҌҐ~ӑҐґҏ~ґЍ~ЍΏБzђҒӒӘҕґґώϊ̋~ˌ}Ȉ~Æ|ƒy}~}{||~|{}y{{|{{y}wyz|{~yxwr|w{x}vGRCOFRDO@MBN@L@M>LAM=J;I8HEPUTjfqfox|y||zzvvqqvddYNR:L.L*H0K6P8NRERCPDPBQBNGTHQJRLSQTPPTWTRSZUTSWR\Ն㮉քdbPb:n6t:(=ZnjdcmV]LURV9TdJm.lu;g|KxL -=NHb"Xcv8iP :Y@`Dk"Pp&OdDaDeJZ;V ;X@]A^DaHf'N_GT Bh.`O^Kg&Zw7id$YQCQ>\h}nDY]lݰݓܢܪԗЄ~ҁ՛۳ڶܹܴ׳̟PJ*>:PJ^Q`_lhsjpru݀⍌哒藒뜕렕띒ꙑ階똌뚍졑쪞봢촦ﶤﺥðôðꛉvqDL@p=aH 9D[}qLZN^Ԝࠆߖݡ߮޴Ҏ΅Ίبܳܺ޺ڸʐHPBWK^KZEW@NBV6I?UK_Vfmrۂ㐊蚓ꢘ뜔뚍ꚑ욒ꕊ뚉죒쨗겣몜밞®㒁vnRX3Jx@j:a8X 6S;V ?iD{.^JeݪƀLedIhCv,Qj$Ii"HiEm'Hr-Jm%De=_>]>b?dCb@fGXBZFx/WWqptvxpvgpz{Њ|Ր~Ս|э}ӌ|Њ}ЋxҌ~э{ϋz΋|Ό{όz̊~Ў~Ґϐю~ђґ~͊zˆzʇ~͌|̉{ʊ~ljlj{LJ~…~ă†Ā~|z}{|zyx{wzw|xx|szrrBOFRETBREPCQES@LBLAOT =gELkufRX+H-M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z·~˂zχ~Їy˃|ˀx̀z˃y̆ẑw΀vˁzʁyǁxʂvɂyɁx̂xɃ|Ȅ|~z{x~u{tyvxvztz|ttrsrtmxtz‚ӗۦᮈ䲅趈귃뵆궆洆泉貇賅籄鲇DRBP@NG.D/B6G8FX;Y9[;ZJ @Z@ope^FS~ޡޥܫߵóŮhX&>:GHRLVTYblbllsv|z||}℈䅈儂ㄈ⁅y|ށ|ރᇈ⎐㑔ጎ␖ᆊ݄kt]kckjrchXbZhYbYjqx劌訪ĺ⮧⤡ߎ߄x|qw`l^f^hVZPZR^PYJS8G<|=c9h:f>p"Dv,Jn&N\MNiӍקw7]~6Sr(Jb>f=ZAK_Zqd}hv|뜀||~ws}fkZYP@I4E*A2D9G=G@KHNLTLPKPKTJXVf]w^zOpRiEfy-bz?{KQr1_\H_NUJ^MzBzq+fJ[a~@u\Wq5iRf#TI ?ND^Tb[w@q|Aw\ \W Vran,dt@zyAxn9_QBX@_B\>]AZ?Y:Z@\D^HZHUGNFPEEVzkETXf֜ޠެ߲⾬ʰo!>.B?LMSQ\V^^dfsiruxw{~懇厌懆勉甊䔑⌋䊈⌊㌌䖓◓㔏㑐⌌䒏⊊ፈ||jrflopkpch\d[aZfYgov厎騪ǻ䱧ᥝߘމ܁|xyjsdl^hY`RbRaL[HUg:h>h>s#Dx&DkEXFFdюޤ3Yv/Jp"FbXJ@QFZKe&_Jdz@{l2nl4jwDvdHbff$Rh&Mh!G`D^B^@]AX=X;ZDWFXHRDNGeDxs_ZJZˋܟਕߴสĚw=&B5EFRLSV]W`Zbhsgqprx~}}慄摎懆捉蔌蘑䔏䏍掌吐攎甏㑎掓䔓ⓐ⎎yvlthontfn`bYd\fY`U^fr倅訨汪चߏ܃zztxkndhbh]fW_VcS[NUz-HoCW F?`ҎܥLj<]r&Fm A[6jB[A\:d=_<[(?>JYVncoo|zwzx~uoilZTP@H0C,B3E;J;G>F>KCTHXQq\nx}Éy^~Vvz?ki)Yd!Rf%Tl-`e Ux;nMu6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bh%LP?g*V[Hh)Rn(Rg#Pp-Vs*Tx5Zx6b\JbMp0fj.^oHpbLg!T` QiRLubP@w8fv3fu4B1?7@?FGHHIMJQNSRPPTTXSXSWU\SZRZXZX^[]T]T]T^X_T\U\XaZ`Z^X^VcXa\e[e[i`f_^WdZc[d\hhh_hdlfjcnhrgrfpfphrjrjkfrlsjtosmrgwlxluhtlvhyoymtgxj{pwkyortpsy|ᎀ~ߓᘊ⤕⪕⯟䱠崦帨帬翰꿰ĶƼǻʼηĮVl>Z?PDSHN@JBMJVW`W_Y`X[^_e_g\`V[V\WZTXTZWb[h[kXdY]UTRIR>NBQ>O:P7Q{4Q4R6SBY>X@T:Q:P4MDUK^Zkgpn|ktgu]kH^:Qv/Hg >a<_6`:`8c;j?u+F4J@RFRANR9^>`=\=` C[>`HHfęڼ޾ܾܾغѬzqS^`\l\mnx을z|잀{JWFdh&Nj%LY>Q>P:d"Gi*PH8g(RV@r0Yr2[k"Mq*Vm&Nt-Xx4^f%ObS|@t|;hr4Y`Fq.`VBd RGm^THi(Tt4`p+d|Fkns2l\!Nx|EhN=YFSJZDo*Xy:`e-Se"PTD_L}Lso.a`FLzz7NRz8/D1A2>:D8@@DDFHKJJLNQRSRWTVQXQZPXQZTbZa[ZW]T\T\V]W\T`\b^b\d]`T^X^W`Ye^ibe_e]`Xc\d\b^fdhfhdnhihhbojndrlnfpfnnmcrkrhqhrjrhvjxiypwlvhxlxqyixl{ozt{prtxtt~ጂߌߐᔊ☌⦔᪘ᬘ峢䳤䷤䶨溰辰´Źļʻ˵ȷnRIhEZDRBPHTHRPWRZPYbff^j]h\c\`V\X]T[T`\j^l[kZfZXPRSBKZ@]AXBZv,N~8PBVGTDNHQ \ No newline at end of file From 9e65065080f55a0be9c40bbd20354805a5e76016 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 3 Dec 2014 20:01:18 +0100 Subject: [PATCH 466/822] avformat/rmdec: Check codec_data_size Fixes infinite loop Fixes Ticket4154 Signed-off-by: Michael Niedermayer (cherry picked from commit a6f730730b82645a9d31aad0968487cb77d6946c) Signed-off-by: Michael Niedermayer --- libavformat/rmdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index b62f8e0628..4ae5808c2f 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -312,6 +312,9 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, int64_t codec_pos; int ret; + if (codec_data_size < 0) + return AVERROR_INVALIDDATA; + avpriv_set_pts_info(st, 64, 1, 1000); codec_pos = avio_tell(pb); v = avio_rb32(pb); From 223ae2467e3a3e39e2a79bef8942608ea82802f6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 3 Dec 2014 20:21:56 +0100 Subject: [PATCH 467/822] swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output Fixes Ticket4151 Signed-off-by: Michael Niedermayer (cherry picked from commit 8524558858b7e14bc50afa10233e0194f591ab9d) Signed-off-by: Michael Niedermayer --- libswscale/x86/rgb2rgb_template.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index 455e7c25a8..05c75d9ab9 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1864,6 +1864,7 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui for (h=0; h < height; h++) { int w; + if (width >= 16) #if COMPILE_TEMPLATE_SSE2 __asm__( "xor %%"REG_a", %%"REG_a" \n\t" From 9a02be31225bef65de8f22fe56e1e0063e85126e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Dec 2014 16:53:30 +0100 Subject: [PATCH 468/822] avformat/matroskadec: fix handling of recursive SeekHead elements When matroska_execute_seekhead() is called, it goes through the list of seekhead entries and attempts to read elements not read yet. When doing this, the parser can find further SeekHead elements, and will extend the matroska->seekhead list. This can lead to a (practically) infinite loop with certain broken files. (Maybe it can happen even with valid files. The demuxer doesn't seem to check correctly whether an element has already been read.) Fix this by ignoring elements that were added to the seekhead field during executing seekhead entries. This does not fix the possible situation when multiple SeekHead elements after the file header (i.e. occur after the "before_pos" file position) point to the same elements. These elements will probably be parsed multiple times, likely leading to bugs. Fixes ticket #4162. Signed-off-by: Michael Niedermayer (cherry picked from commit 6551acab6877addae815decd02aeca33ba4990c8) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 37e0d1940b..cc6450e51a 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1427,13 +1427,17 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) EbmlList *seekhead_list = &matroska->seekhead; int64_t before_pos = avio_tell(matroska->ctx->pb); int i; + int nb_elem; // we should not do any seeking in the streaming case if (!matroska->ctx->pb->seekable || (matroska->ctx->flags & AVFMT_FLAG_IGNIDX)) return; - for (i = 0; i < seekhead_list->nb_elem; i++) { + // do not read entries that are added while parsing seekhead entries + nb_elem = seekhead_list->nb_elem; + + for (i = 0; i < nb_elem; i++) { MatroskaSeekhead *seekhead = seekhead_list->elem; if (seekhead[i].pos <= before_pos) continue; From 8b8d794800db9b0980760eb8dfb410dfbba54c2d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Nov 2014 01:55:40 +0100 Subject: [PATCH 469/822] 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 --- libavcodec/h264.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 16f489624f..6aa20f5375 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1821,6 +1821,17 @@ static int decode_update_thread_context(AVCodecContext *dst, h->mb_type_pool = NULL; h->ref_index_pool = NULL; h->motion_val_pool = 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; for (i = 0; i < 2; i++) { h->rbsp_buffer[i] = NULL; h->rbsp_buffer_size[i] = 0; From cd01611d7b7aa63bfce6dcb4008ac7686bc13418 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 30 Oct 2014 00:27:04 +0100 Subject: [PATCH 470/822] lavc/utils: Make pix_fmt desc pointer const. Fixes an "initialization discards qualifiers from pointer target type" warning. (cherry picked from commit f05855414ed4cce97c06ba2a31f4987af47e6d4e) Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8d24f0bed9..4969baabc4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -281,7 +281,7 @@ 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); + AVPixFmtDescriptor const *desc = av_pix_fmt_desc_get(s->pix_fmt); if (desc) { w_align = 1 << desc->log2_chroma_w; From 84fdfcab99aa09d957ad84aac61779f532887a51 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 3 Nov 2014 13:20:24 +0100 Subject: [PATCH 471/822] avcodec/options_table fix min of audio channels and sample rate Found-by: Lukasz Marek Signed-off-by: Michael Niedermayer (cherry picked from commit 206c98f303e833c9e94427c9e3f9867f85265f78) Signed-off-by: Michael Niedermayer --- libavcodec/options_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index c82c104cb6..1873a926fc 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -94,8 +94,8 @@ static const AVOption avcodec_options[] = { {"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX}, {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, -{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|D|E}, -{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|D|E}, +{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, +{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|E}, {"frame_size", NULL, OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|E}, {"frame_number", NULL, OFFSET(frame_number), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, From 4d8b82160dbc6b31c08894e4e8147411b6f6078a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 10 Nov 2014 19:44:20 +0100 Subject: [PATCH 472/822] avcodec/utvideodec: fix assumtation that slice_height >= 1 Fixes out of array read Fixes: asan_heap-oob_2573085_3783_utvideo_rgba_median.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 7656c4c6e66f8a787d384f027ad824cc1677fda1) Signed-off-by: Michael Niedermayer --- libavcodec/utvideodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 1c7677345c..ff69a25002 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -222,7 +222,7 @@ static void restore_median(uint8_t *src, int step, int stride, A = bsrc[i]; } bsrc += stride; - if (slice_height == 1) + if (slice_height <= 1) continue; // second line - first element has top prediction, the rest uses median C = bsrc[-stride]; @@ -282,7 +282,7 @@ static void restore_median_il(uint8_t *src, int step, int stride, A = bsrc[stride + i]; } bsrc += stride2; - if (slice_height == 1) + if (slice_height <= 1) continue; // second line - first element has top prediction, the rest uses median C = bsrc[-stride2]; From d054ec868d9665e4c8fb18371c5bb40d6ab35a4e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 10 Nov 2014 23:07:50 +0100 Subject: [PATCH 473/822] avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization Fixes out of array read Fixes: asan_heap-oob_2aec5b0_1828_classical_22_16_2_16000_v3c_0_exclusive_0_29.wma Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 5dcb99033df16eccc4dbbc4a099ad64457f9f090) Signed-off-by: Michael Niedermayer --- libavcodec/wmaprodec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index d57c24dddf..19f5566e8d 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -420,6 +420,9 @@ static av_cold int decode_init(AVCodecContext *avctx) offset &= ~3; if (offset > s->sfb_offsets[i][band - 1]) s->sfb_offsets[i][band++] = offset; + + if (offset >= subframe_len) + break; } s->sfb_offsets[i][band - 1] = subframe_len; s->num_sfb[i] = band - 1; From 944007921667d12fe99840710300521ea4dffd76 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Tue, 11 Nov 2014 21:17:58 +0100 Subject: [PATCH 474/822] lavu/opt: fix av_opt_get function Signed-off-by: Lukasz Marek (cherry picked from commit 173d51c982f1ecaa8d28cd0d8611164be0c9d36d) Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index f644f9b34b..8c58237d5a 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -711,6 +711,10 @@ int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val) return AVERROR(EINVAL); if (!(*out_val = av_malloc(len*2 + 1))) return AVERROR(ENOMEM); + if (!len) { + *out_val[0] = '\0'; + return 0; + } bin = *(uint8_t**)dst; for (i = 0; i < len; i++) snprintf(*out_val + i*2, 3, "%02X", bin[i]); @@ -726,12 +730,14 @@ int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val) break; case AV_OPT_TYPE_DURATION: i64 = *(int64_t *)dst; - ret = snprintf(buf, sizeof(buf), "%"PRIi64"d:%02d:%02d.%06d", + ret = snprintf(buf, sizeof(buf), "%"PRIi64":%02d:%02d.%06d", i64 / 3600000000, (int)((i64 / 60000000) % 60), (int)((i64 / 1000000) % 60), (int)(i64 % 1000000)); break; case AV_OPT_TYPE_COLOR: - ret = snprintf(buf, sizeof(buf), "0x%02x%02x%02x%02x", ((int *)dst)[0], ((int *)dst)[1], ((int *)dst)[2], ((int *)dst)[3]); + ret = snprintf(buf, sizeof(buf), "0x%02x%02x%02x%02x", + (int)((uint8_t *)dst)[0], (int)((uint8_t *)dst)[1], + (int)((uint8_t *)dst)[2], (int)((uint8_t *)dst)[3]); break; case AV_OPT_TYPE_CHANNEL_LAYOUT: i64 = *(int64_t *)dst; From 217f781adca310cadcc631ff5d94cca6d029ec0e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 16 Nov 2014 04:02:56 +0100 Subject: [PATCH 475/822] avformat/hlsenc: Free context after hls_append_segment Fixes reading uninitialized memory Signed-off-by: Michael Niedermayer (cherry picked from commit 530eb6acf8ee867bf00728bf7efaf505da107e17) Conflicts: libavformat/hlsenc.c (cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929) Conflicts: libavformat/hlsenc.c (cherry picked from commit 134d3e1c0331462ea94c78a5e13a63b20d283653) Signed-off-by: Michael Niedermayer --- libavformat/hlsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3b50397010..a370b3d45c 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -308,9 +308,10 @@ static int hls_write_trailer(struct AVFormatContext *s) av_write_trailer(oc); avio_closep(&oc->pb); - avformat_free_context(oc); av_free(hls->basename); append_entry(hls, hls->duration); + avformat_free_context(oc); + hls->avf = NULL; hls_window(s, 1); free_entries(hls); From de7671e4c47f14b2fd8c626bff27d330c693ad19 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 20 Nov 2014 00:43:45 +0100 Subject: [PATCH 476/822] swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*() This avoids out of array accesses Should fix Ticket3451 Signed-off-by: Michael Niedermayer (cherry picked from commit 4388e78a0f022c8572996f9ab568a39b5f716f9d) Signed-off-by: Michael Niedermayer --- libswscale/x86/rgb2rgb_template.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index 05c75d9ab9..734453b7c9 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1623,6 +1623,16 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ #define BGR2V_IDX "16*4+16*34" int y; const x86_reg chromWidth= width>>1; + + if (height > 2) { + ff_rgb24toyv12_c(src, ydst, udst, vdst, width, 2, lumStride, chromStride, srcStride, rgb2yuv); + src += 2*srcStride; + ydst += 2*lumStride; + udst += chromStride; + vdst += chromStride; + height -= 2; + } + for (y=0; y Date: Tue, 25 Nov 2014 13:53:06 +0100 Subject: [PATCH 477/822] avcodec/mjpegdec: Fix context fields becoming inconsistent Fixes out of array access Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 0eecf40935b22644e6cd74c586057237ecfd6844) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7feeade662..a811b51412 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1553,6 +1553,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) } if (id == AV_RB32("LJIF")) { + int rgb = s->rgb; + int pegasus_rct = s->pegasus_rct; if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_INFO, "Pegasus lossless jpeg header found\n"); @@ -1562,17 +1564,27 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) skip_bits(&s->gb, 16); /* unknown always 0? */ switch (i=get_bits(&s->gb, 8)) { case 1: - s->rgb = 1; - s->pegasus_rct = 0; + rgb = 1; + pegasus_rct = 0; break; case 2: - s->rgb = 1; - s->pegasus_rct = 1; + rgb = 1; + pegasus_rct = 1; break; default: av_log(s->avctx, AV_LOG_ERROR, "unknown colorspace %d\n", i); } + len -= 9; + if (s->got_picture) + if (rgb != s->rgb || pegasus_rct != s->pegasus_rct) { + av_log(s->avctx, AV_LOG_WARNING, "Mismatching LJIF tag\n"); + goto out; + } + + s->rgb = rgb; + s->pegasus_rct = pegasus_rct; + goto out; } if (id == AV_RL32("colr") && len > 0) { From a63941eec2f92b27b75d1713d3d4fba1b38ac941 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 25 Nov 2014 14:45:30 +0100 Subject: [PATCH 478/822] avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata() Fixes out of array read Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3d5d95db3f5d8e2093e9e19d0c46e86f54ed2a5d) Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 4969baabc4..292d12b843 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -3482,6 +3482,11 @@ int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf) ret = av_bprint_finalize(buf, &str); if (ret < 0) return ret; + if (!av_bprint_is_complete(buf)) { + av_free(str); + return AVERROR(ENOMEM); + } + avctx->extradata = str; /* Note: the string is NUL terminated (so extradata can be read as a * string), but the ending character is not accounted in the size (in From d41010b895755384e22fd918487e0c11dbc02f8e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Nov 2014 03:29:03 +0100 Subject: [PATCH 479/822] avcodec/flacdec: Call ff_flacdsp_init() unconditionally Fixes out of array access Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b) Conflicts: libavcodec/flacdec.c --- libavcodec/flacdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index f63a918b1b..d3b0df3b8e 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -471,10 +471,10 @@ static int decode_frame(FLACContext *s) ret = allocate_buffers(s); if (ret < 0) return ret; - ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps); s->got_streaminfo = 1; dump_headers(s->avctx, (FLACStreaminfo *)s); } + ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps); // dump_headers(s->avctx, (FLACStreaminfo *)s); From d7470271c7ca3f412aac6b29fb4b8f22ad5c0238 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Nov 2014 15:45:47 +0100 Subject: [PATCH 480/822] avcodec/pngdec: Check IHDR/IDAT order Fixes out of array access Fixes: asan_heap-oob_20a6c26_2690_cov_3434532168_mail.png Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 79ceaf827be0b070675d4cd0a55c3386542defd8) Conflicts: libavcodec/pngdec.c --- libavcodec/pngdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index d4f633ac70..a57deceaaa 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -565,6 +565,12 @@ static int decode_frame(AVCodecContext *avctx, case MKTAG('I', 'H', 'D', 'R'): if (length != 13) goto fail; + + if (s->state & PNG_IDAT) { + av_log(avctx, AV_LOG_ERROR, "IHDR after IDAT\n"); + goto fail; + } + s->width = bytestream2_get_be32(&s->gb); s->height = bytestream2_get_be32(&s->gb); if (av_image_check_size(s->width, s->height, 0, avctx)) { From a06432b6c315fda5a9cc69059fd106d231e7da6c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Nov 2014 18:56:39 +0100 Subject: [PATCH 481/822] avcodec/rawdec: Check the return code of avpicture_get_size() Fixes out of array access Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 1d3a3b9f8907625b361420d48fe05716859620ff) Conflicts: libavcodec/rawdec.c --- libavcodec/rawdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index d187d23cb5..437363d2bc 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -136,6 +136,9 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); } + if (context->frame_size < 0) + return context->frame_size; + if ((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) || From 4fde30ba9d050443fb14116fb206d0d37092bed0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Nov 2014 03:46:56 +0100 Subject: [PATCH 482/822] avcodec/hevc_ps: Check num_long_term_ref_pics_sps Fixes out of array access Fixes: signal_sigsegv_35bd0f0_1182_cov_791726764_STRUCT_B_Samsung_4.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit ea38e5a6b75706477898eb1e6582d667dbb9946c) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index c8350fb90f..53b27bda3b 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -843,6 +843,11 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) sps->long_term_ref_pics_present_flag = get_bits1(gb); if (sps->long_term_ref_pics_present_flag) { sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb); + if (sps->num_long_term_ref_pics_sps > 31U) { + av_log(0, AV_LOG_ERROR, "num_long_term_ref_pics_sps %d is out of range.\n", + sps->num_long_term_ref_pics_sps); + goto err; + } for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { sps->lt_ref_pic_poc_lsb_sps[i] = get_bits(gb, sps->log2_max_poc_lsb); sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb); From 3d9860f68af5d3cc588fe67ebe11eba61c180649 Mon Sep 17 00:00:00 2001 From: Michael Stypa Date: Fri, 28 Nov 2014 15:54:50 +0100 Subject: [PATCH 483/822] fix Makefile objects for pulseaudio support Signed-off-by: Michael Niedermayer (cherry picked from commit cb58c771ade66afcc623250e1c7ac8191381d991) Signed-off-by: Michael Niedermayer --- libavdevice/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/Makefile b/libavdevice/Makefile index ba503a3911..4069b0ca7b 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -34,7 +34,7 @@ OBJS-$(CONFIG_OPENGL_OUTDEV) += opengl_enc.o OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o OBJS-$(CONFIG_OSS_OUTDEV) += oss_audio.o OBJS-$(CONFIG_PULSE_INDEV) += pulse_audio_dec.o \ - pulse_audio_common.o + pulse_audio_common.o timefilter.o OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_SDL_OUTDEV) += sdl.o From 7390c2629dc24a69612bfdf92250fad3effc6d37 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 1 Dec 2014 13:23:24 +0100 Subject: [PATCH 484/822] avcodec/motion_est: use 2x8x8 for interlaced qpel Fixes out of array read Fixes Ticket4121 Signed-off-by: Michael Niedermayer (cherry picked from commit b50e003e1cb6a215df44ffa3354603bf600b4aa3) Signed-off-by: Michael Niedermayer --- libavcodec/motion_est.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 5ca59aa2e5..0d441848d6 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -189,7 +189,13 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int int uvdxy; /* no, it might not be used uninitialized */ if(dxy){ if(qpel){ - c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) + if (h << size == 16) { + c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) + } else if (size == 0 && h == 8) { + c->qpel_put[1][dxy](c->temp , ref[0] + x + y*stride , stride); + c->qpel_put[1][dxy](c->temp + 8, ref[0] + x + y*stride + 8, stride); + } else + av_assert2(0); if(chroma){ int cx= hx/2; int cy= hy/2; From 9f09bfe681259cfed7414f207c88f84c09d5b501 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 8 Dec 2014 19:27:19 +0100 Subject: [PATCH 485/822] Update for 2.2.11 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 0d3ad67afa..0b6e43134b 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.10 +2.2.11 diff --git a/doc/Doxyfile b/doc/Doxyfile index 751aa5963f..c8ef9233cd 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.10 +PROJECT_NUMBER = 2.2.11 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From e7fdd6aa0d11c3e144988d7090f972224799e07f Mon Sep 17 00:00:00 2001 From: Julien Ramseier Date: Sun, 14 Dec 2014 02:00:04 +0100 Subject: [PATCH 486/822] avconv: Use the mpeg12 private option scan_offset Introduced in aed790070486b1b01b48106310d9d0ca1730e459 Bug-Id: debian/773055 CC: libav-stable@libav.org Signed-off-by: Luca Barbato Signed-off-by: Anton Khirnov (cherry picked from commit fd665f7f48fa7db89eb9a93ac33919f6adc40f9d) Signed-off-by: Anton Khirnov (cherry picked from commit 864c0c50eb0e7a112b20007459b0cb94b61cb8d3) Signed-off-by: Anton Khirnov --- avconv_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avconv_opt.c b/avconv_opt.c index 8ffdde94f5..51a0860608 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1794,7 +1794,7 @@ static int opt_target(void *optctx, const char *opt, const char *arg) opt_default(NULL, "maxrate", "2516000"); opt_default(NULL, "minrate", "0"); // 1145000; opt_default(NULL, "bufsize", "1835008"); // 224*1024*8; - opt_default(NULL, "flags", "+scan_offset"); + opt_default(NULL, "scan_offset", "1"); opt_default(NULL, "b:a", "224000"); From b807e987f1c302b80ec468f3422d1b1dd25d7f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sat, 20 Dec 2014 00:17:43 +0100 Subject: [PATCH 487/822] avformat/rsd: make tag_buf string larger av_get_codec_tag_string() uses more that 1 char for unprintable characters. (cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318) --- libavformat/rsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rsd.c b/libavformat/rsd.c index b6f168633b..c14ade09ea 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s) codec->codec_tag = avio_rl32(pb); codec->codec_id = ff_codec_get_id(rsd_tags, codec->codec_tag); if (!codec->codec_id) { - char tag_buf[5]; + char tag_buf[32]; av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag); for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) { From 931f5b235112f1c2a09dead36f0a228061d23942 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Aug 2014 14:39:10 +0000 Subject: [PATCH 488/822] mov: avoid a memleak when multiple stss boxes are present CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 64f7575fbd64e5b65d5c644347408588c776f1fe) Signed-off-by: Anton Khirnov (cherry picked from commit 577f1feb3fd1e51fd14af7ce6d79d468faa3b929) Signed-off-by: Anton Khirnov --- libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 6f72ce8144..5ef343eadc 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1598,6 +1598,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) } if (entries >= UINT_MAX / sizeof(int)) return AVERROR_INVALIDDATA; + av_freep(&sc->keyframes); sc->keyframes = av_malloc(entries * sizeof(int)); if (!sc->keyframes) return AVERROR(ENOMEM); From da4f5d9d77882bee568266d764b95b51f81b7871 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 14 Dec 2014 20:52:13 +0100 Subject: [PATCH 489/822] mjpegdec: check for pixel format changes Fixes possible invalid memory access. Based on code by Michael Niedermayer CC: libav-stable@libav.org Bug-ID: CVE-2014-8541 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 809c3023b699c54c90511913d3b6140dd2436550) Signed-off-by: Anton Khirnov (cherry picked from commit aa7a19b41774ce5f8a4e43f3692a4f9d90aa5c92) Signed-off-by: Anton Khirnov --- libavcodec/mjpegdec.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 8210fd3f00..9db72ff63e 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -215,18 +215,20 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) int ff_mjpeg_decode_sof(MJpegDecodeContext *s) { - int len, nb_components, i, width, height, pix_fmt_id, ret; + int h_count[MAX_COMPONENTS] = { 0 }; + int v_count[MAX_COMPONENTS] = { 0 }; + int len, nb_components, i, width, height, bits, pix_fmt_id, ret; /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); - s->bits = get_bits(&s->gb, 8); + bits = get_bits(&s->gb, 8); if (s->pegasus_rct) - s->bits = 9; - if (s->bits == 9 && !s->pegasus_rct) + bits = 9; + if (bits == 9 && !s->pegasus_rct) s->rct = 1; // FIXME ugly - if (s->bits != 8 && !s->lossless) { + if (bits != 8 && !s->lossless) { av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n"); return -1; } @@ -253,7 +255,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) return AVERROR_INVALIDDATA; } } - if (s->ls && !(s->bits <= 8 || nb_components == 1)) { + if (s->ls && !(bits <= 8 || nb_components == 1)) { avpriv_report_missing_feature(s->avctx, "JPEG-LS that is not <= 8 " "bits/component or 16-bit gray"); @@ -265,25 +267,25 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) for (i = 0; i < nb_components; i++) { /* component id */ s->component_id[i] = get_bits(&s->gb, 8) - 1; - s->h_count[i] = get_bits(&s->gb, 4); - s->v_count[i] = get_bits(&s->gb, 4); + h_count[i] = get_bits(&s->gb, 4); + v_count[i] = get_bits(&s->gb, 4); /* compute hmax and vmax (only used in interleaved case) */ - if (s->h_count[i] > s->h_max) - s->h_max = s->h_count[i]; - if (s->v_count[i] > s->v_max) - s->v_max = s->v_count[i]; + if (h_count[i] > s->h_max) + s->h_max = h_count[i]; + if (v_count[i] > s->v_max) + s->v_max = v_count[i]; s->quant_index[i] = get_bits(&s->gb, 8); if (s->quant_index[i] >= 4) return AVERROR_INVALIDDATA; - if (!s->h_count[i] || !s->v_count[i]) { + if (!h_count[i] || !v_count[i]) { av_log(s->avctx, AV_LOG_ERROR, "Invalid sampling factor in component %d %d:%d\n", - i, s->h_count[i], s->v_count[i]); + i, h_count[i], v_count[i]); return AVERROR_INVALIDDATA; } av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n", - i, s->h_count[i], s->v_count[i], + i, h_count[i], v_count[i], s->component_id[i], s->quant_index[i]); } @@ -296,10 +298,14 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->rgb = 1; /* if different size, realloc/alloc picture */ - /* XXX: also check h_count and v_count */ - if (width != s->width || height != s->height) { + if (width != s->width || height != s->height || bits != s->bits || + memcmp(s->h_count, h_count, sizeof(h_count)) || + memcmp(s->v_count, v_count, sizeof(v_count))) { s->width = width; s->height = height; + s->bits = bits; + memcpy(s->h_count, h_count, sizeof(h_count)); + memcpy(s->v_count, v_count, sizeof(v_count)); s->interlaced = 0; /* test interlaced mode */ From 8f238dd9bdd9eba569fcaa564a07fbdd89412a14 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 14 Dec 2014 21:01:59 +0100 Subject: [PATCH 490/822] jvdec: check frame dimensions The frame size must be set by the caller and each dimension must be a multiple of 8. CC: libav-stable@libav.org Bug-ID: CVE-2014-8542 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 88626e5af8d006e67189bf10b96b982502a7e8ad) Signed-off-by: Anton Khirnov (cherry picked from commit 55788572ea7b89cdd77bab1cf4bf06d14ead34f5) Signed-off-by: Anton Khirnov --- libavcodec/jvdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 662a94492d..caacc2bbd4 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx) { JvContext *s = avctx->priv_data; + if (!avctx->width || !avctx->height || + (avctx->width & 7) || (avctx->height & 7)) { + av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n", + avctx->width, avctx->height); + return AVERROR(EINVAL); + } + s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); From 3f10a779b465fd22d3aec1b744ca8544bc2da970 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 14 Dec 2014 21:01:59 +0100 Subject: [PATCH 491/822] mmvideo: check frame dimensions The frame size must be set by the caller and each dimension must be a multiple of 2. CC: libav-stable@libav.org Bug-ID: CVE-2014-8543 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind (cherry picked from commit 17ba719d9ba30c970f65747f42d5fbb1e447ca28) Signed-off-by: Anton Khirnov (cherry picked from commit 69a930b988ff4f88ae27e4fc24ff6ed116840b5e) Signed-off-by: Anton Khirnov --- libavcodec/mmvideo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index d80c832a31..25124a3edf 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -61,6 +61,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; + if (!avctx->width || !avctx->height || + (avctx->width & 1) || (avctx->height & 1)) { + av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n", + avctx->width, avctx->height); + return AVERROR(EINVAL); + } + s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); From 92888e9ed4ea4e761ae953bbe28c85cc658abc8f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 20:15:52 +0200 Subject: [PATCH 492/822] gifdec: refactor interleave end handling Fixes invalid writes with very small image heights. CC: libav-stable@libav.org Bug-ID: CVE-2014-8547 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov (cherry picked from commit 0b39ac6f54505a538c21fe49a626de94c518c903) Signed-off-by: Anton Khirnov (cherry picked from commit eac49477aa95cf727d87d2741ee8e60be59d394b) Signed-off-by: Anton Khirnov --- libavcodec/gifdec.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index cdb7f23fd4..df5ab78aba 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -125,26 +125,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; } From f249e9889155599ee3ad0172832d38f68b0c625d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2014 22:50:45 +0200 Subject: [PATCH 493/822] smc: fix the bounds check Fixes invalid writes when there are more blocks in a run than total remaining blocks. CC: libav-stable@libav.org Bug-ID: CVE-2014-8548 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov (cherry picked from commit d423dd72be451462c6fb1cbbe313bed0194001ab) Signed-off-by: Anton Khirnov (cherry picked from commit 58dc526ebf722d33bf09275c1241674e0e6b9ef1) Signed-off-by: Anton Khirnov --- libavcodec/smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 46903ab2af..c6541da843 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 < !!n_blocks) \ { \ av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \ return; \ From 2d855c94b62b8f25ac1fbcef77772fa4f418769c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Nov 2014 18:16:15 +0100 Subject: [PATCH 494/822] avformat/mov: Fix memleaks for duplicate STCO/CO64/STSC atoms Also see [FFmpeg-devel] [PATCH] avformat/mov: strengthen some table allocations which contains more fixes but is unfinished Fixes: signal_sigabrt_7ffff6ac7bb9_3484_cov_1830000177_starfox2.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 1b5d11240692025f036e945bc37968735679320a) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3fb774742b..374c4f4ec5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1203,6 +1203,10 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (entries >= UINT_MAX/sizeof(int64_t)) return AVERROR_INVALIDDATA; + if (sc->chunk_offsets) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STCO atom\n"); + av_free(sc->chunk_offsets); + sc->chunk_count = 0; sc->chunk_offsets = av_malloc(entries * sizeof(int64_t)); if (!sc->chunk_offsets) return AVERROR(ENOMEM); @@ -1718,6 +1722,10 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; if (entries >= UINT_MAX / sizeof(*sc->stsc_data)) return AVERROR_INVALIDDATA; + if (sc->stsc_data) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STSC atom\n"); + av_free(sc->stsc_data); + sc->stsc_count = 0; sc->stsc_data = av_malloc(entries * sizeof(*sc->stsc_data)); if (!sc->stsc_data) return AVERROR(ENOMEM); From c494be64119f46329c8ba8a31ae8afa22a07f6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 10 Nov 2014 18:21:28 +0100 Subject: [PATCH 495/822] avformat/mov: strengthen some table allocations (cherry picked from commit 5ab882d7283f57560c889919c35f2688253b1d9c) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 374c4f4ec5..6715d931ed 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1200,14 +1200,12 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!entries) return 0; - if (entries >= UINT_MAX/sizeof(int64_t)) - return AVERROR_INVALIDDATA; if (sc->chunk_offsets) av_log(c->fc, AV_LOG_WARNING, "Duplicate STCO atom\n"); av_free(sc->chunk_offsets); sc->chunk_count = 0; - sc->chunk_offsets = av_malloc(entries * sizeof(int64_t)); + sc->chunk_offsets = av_malloc_array(entries, sizeof(*sc->chunk_offsets)); if (!sc->chunk_offsets) return AVERROR(ENOMEM); sc->chunk_count = entries; @@ -1720,13 +1718,11 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!entries) return 0; - if (entries >= UINT_MAX / sizeof(*sc->stsc_data)) - return AVERROR_INVALIDDATA; if (sc->stsc_data) av_log(c->fc, AV_LOG_WARNING, "Duplicate STSC atom\n"); av_free(sc->stsc_data); sc->stsc_count = 0; - sc->stsc_data = av_malloc(entries * sizeof(*sc->stsc_data)); + sc->stsc_data = av_malloc_array(entries, sizeof(*sc->stsc_data)); if (!sc->stsc_data) return AVERROR(ENOMEM); @@ -1758,9 +1754,11 @@ static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); // version + flags entries = avio_rb32(pb); - if (entries >= UINT_MAX / sizeof(*sc->stps_data)) - return AVERROR_INVALIDDATA; - sc->stps_data = av_malloc(entries * sizeof(*sc->stps_data)); + if (sc->stps_data) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STPS atom\n"); + av_free(sc->stps_data); + sc->stps_count = 0; + sc->stps_data = av_malloc_array(entries, sizeof(*sc->stps_data)); if (!sc->stps_data) return AVERROR(ENOMEM); @@ -1802,9 +1800,11 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->need_parsing = AVSTREAM_PARSE_HEADERS; return 0; } - if (entries >= UINT_MAX / sizeof(int)) - return AVERROR_INVALIDDATA; - sc->keyframes = av_malloc(entries * sizeof(int)); + if (sc->keyframes) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STSS atom\n"); + av_free(sc->keyframes); + sc->keyframe_count = 0; + sc->keyframes = av_malloc_array(entries, sizeof(*sc->keyframes)); if (!sc->keyframes) return AVERROR(ENOMEM); @@ -1863,9 +1863,13 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!entries) return 0; - if (entries >= UINT_MAX / sizeof(int) || entries >= (UINT_MAX - 4) / field_size) + if (entries >= (UINT_MAX - 4) / field_size) return AVERROR_INVALIDDATA; - sc->sample_sizes = av_malloc(entries * sizeof(int)); + if (sc->sample_sizes) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STSZ atom\n"); + av_free(sc->sample_sizes); + sc->sample_count = 0; + sc->sample_sizes = av_malloc_array(entries, sizeof(*sc->sample_sizes)); if (!sc->sample_sizes) return AVERROR(ENOMEM); @@ -1919,11 +1923,11 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); - if (entries >= UINT_MAX / sizeof(*sc->stts_data)) - return -1; - + if (sc->stts_data) + av_log(c->fc, AV_LOG_WARNING, "Duplicate STTS atom\n"); av_free(sc->stts_data); - sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data)); + sc->stts_count = 0; + sc->stts_data = av_malloc_array(entries, sizeof(*sc->stts_data)); if (!sc->stts_data) return AVERROR(ENOMEM); @@ -2062,9 +2066,11 @@ static int mov_read_sbgp(MOVContext *c, AVIOContext *pb, MOVAtom atom) entries = avio_rb32(pb); if (!entries) return 0; - if (entries >= UINT_MAX / sizeof(*sc->rap_group)) - return AVERROR_INVALIDDATA; - sc->rap_group = av_malloc(entries * sizeof(*sc->rap_group)); + if (sc->rap_group) + av_log(c->fc, AV_LOG_WARNING, "Duplicate SBGP atom\n"); + av_free(sc->rap_group); + sc->rap_group_count = 0; + sc->rap_group = av_malloc_array(entries, sizeof(*sc->rap_group)); if (!sc->rap_group) return AVERROR(ENOMEM); From e9ddf726aa72f5719697da55142f438d6719b0a2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 25 Dec 2014 12:38:20 +0100 Subject: [PATCH 496/822] avformat/segment: Use av_freep() avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 68fa549230af35179df2a2af2bdb84ee6c825bed) Signed-off-by: Michael Niedermayer --- libavformat/segment.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 9b4b44f514..2ab424e15c 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -321,7 +321,7 @@ static int segment_end(AVFormatContext *s, int write_trailer, int is_last) if (seg->list_size && seg->segment_count > seg->list_size) { entry = seg->segment_list_entries; seg->segment_list_entries = seg->segment_list_entries->next; - av_free(entry->filename); + av_freep(&entry->filename); av_freep(&entry); } @@ -479,10 +479,10 @@ static int open_null_ctx(AVIOContext **ctx) return 0; } -static void close_null_ctx(AVIOContext *pb) +static void close_null_ctxp(AVIOContext **pb) { - av_free(pb->buffer); - av_free(pb); + av_freep(&(*pb)->buffer); + av_freep(pb); } static int select_reference_stream(AVFormatContext *s) @@ -638,7 +638,7 @@ static int seg_write_header(AVFormatContext *s) s->avoid_negative_ts = 1; if (!seg->write_header_trailer) { - close_null_ctx(oc->pb); + close_null_ctxp(&oc->pb); if ((ret = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE, &s->interrupt_callback, NULL)) < 0) goto fail; @@ -743,7 +743,7 @@ static int seg_write_trailer(struct AVFormatContext *s) goto fail; open_null_ctx(&oc->pb); ret = av_write_trailer(oc); - close_null_ctx(oc->pb); + close_null_ctxp(&oc->pb); } else { ret = segment_end(s, 1, 1); } @@ -758,7 +758,7 @@ fail: cur = seg->segment_list_entries; while (cur) { next = cur->next; - av_free(cur->filename); + av_freep(&cur->filename); av_free(cur); cur = next; } From a6d59978a00e2406501bb9b2b91179e6af8a3b03 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 31 Dec 2014 21:41:46 +0100 Subject: [PATCH 497/822] avformat/cdxl: Fix integer overflow of image_size Signed-off-by: Michael Niedermayer (cherry picked from commit 3eb5cbe0c50d0a0bbe10bcabbd6b16d73d93c128) Signed-off-by: Michael Niedermayer --- libavformat/cdxl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index ab8a846cc5..51b9567d20 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -127,6 +127,8 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) height = AV_RB16(&cdxl->header[16]); palette_size = AV_RB16(&cdxl->header[20]); audio_size = AV_RB16(&cdxl->header[22]); + if (FFALIGN(width, 16) * (uint64_t)height * cdxl->header[19] > INT_MAX) + return AVERROR_INVALIDDATA; image_size = FFALIGN(width, 16) * height * cdxl->header[19] / 8; video_size = palette_size + image_size; From 1c983ee2c10ee75251678a596a8e07f62cbfcf53 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 1 Jan 2015 18:07:24 +0100 Subject: [PATCH 498/822] avformat/flvdec: do not inject dts=0 metadata packets which failed to be parsed into a new data stream Such data streams (which then contain no other packets except the faulty one) confuse some user applications, like VLC Works around vlcticket 12389 Signed-off-by: Michael Niedermayer (cherry picked from commit 322f0f5960a743cac47252d90a0f1ea7a025feff) Conflicts: libavformat/flvdec.c --- libavformat/flvdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index b11e3352c1..a0189b1548 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -541,13 +541,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) type = avio_r8(ioc); if (type != AMF_DATA_TYPE_STRING || amf_get_string(ioc, buffer, sizeof(buffer)) < 0) - return -1; + return 2; if (!strcmp(buffer, "onTextData")) return 1; if (strcmp(buffer, "onMetaData")) - return -1; + return 2; // find the streams now so that amf_parse_object doesn't need to do // the lookup every time it is called. @@ -813,7 +813,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) stream_type=FLV_STREAM_TYPE_DATA; if (size > 13 + 1 + 4 && dts == 0) { // Header-type metadata stuff meta_pos = avio_tell(s->pb); - if (flv_read_metabody(s, next) == 0) { + if (flv_read_metabody(s, next) <= 0) { goto skip; } avio_seek(s->pb, meta_pos, SEEK_SET); From ef33242c2ac51f10166cfe0e3d00bb67f3efcd33 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 1 Jan 2015 18:15:16 +0100 Subject: [PATCH 499/822] avformat/flvdec: Increase string array size Fixes parsing httphostheader of Scarlatti\,\ Pieter-Jan\ Belder\ -\ Sonata\ K113\ in\ A\ major\ -\ Alle.flv Signed-off-by: Michael Niedermayer (cherry picked from commit eb767a276bfdb9a0493bdb0b38203638230b7ccb) Signed-off-by: Michael Niedermayer --- libavformat/flvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index a0189b1548..3b6d01af63 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -376,7 +376,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, FLVContext *flv = s->priv_data; AVIOContext *ioc; AMFDataType amf_type; - char str_val[256]; + char str_val[1024]; double num_val; num_val = 0; From 92a36a4e78e647523baa01f882e078ed2390b06b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 4 Jan 2015 01:03:26 +0100 Subject: [PATCH 500/822] avfilter/vf_sab: fix filtering tiny images Fixes out of array reads Signed-off-by: Michael Niedermayer (cherry picked from commit 9bff052b51f27f6cce04e8d7d8b405c710d7ad67) Signed-off-by: Michael Niedermayer --- libavfilter/vf_sab.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c index 51bbc5aed9..f5f8916e87 100644 --- a/libavfilter/vf_sab.c +++ b/libavfilter/vf_sab.c @@ -220,6 +220,19 @@ static int config_props(AVFilterLink *inlink) #define NB_PLANES 4 +static inline int mirror(int x, int w) +{ + if (!w) + return 0; + + while ((unsigned)x > (unsigned)w) { + x = -x; + if (x < 0) + x += 2 * w; + } + return x; +} + static void blur(uint8_t *dst, const int dst_linesize, const uint8_t *src, const int src_linesize, const int w, const int h, FilterParam *fp) @@ -253,8 +266,7 @@ static void blur(uint8_t *dst, const int dst_linesize, for (dy = 0; dy < radius*2 + 1; dy++) { int dx; int iy = y+dy - radius; - if (iy < 0) iy = -iy; - else if (iy >= h) iy = h+h-iy-1; + iy = mirror(iy, h-1); for (dx = 0; dx < radius*2 + 1; dx++) { const int ix = x+dx - radius; @@ -265,13 +277,11 @@ static void blur(uint8_t *dst, const int dst_linesize, for (dy = 0; dy < radius*2+1; dy++) { int dx; int iy = y+dy - radius; - if (iy < 0) iy = -iy; - else if (iy >= h) iy = h+h-iy-1; + iy = mirror(iy, h-1); for (dx = 0; dx < radius*2 + 1; dx++) { int ix = x+dx - radius; - if (ix < 0) ix = -ix; - else if (ix >= w) ix = w+w-ix-1; + ix = mirror(ix, w-1); UPDATE_FACTOR; } } From 0d481efb7b81ab2f0491a854a4fd5d8cfb305680 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Jan 2015 04:45:26 +0100 Subject: [PATCH 501/822] avcodec/dvdsubdec: fix out of bounds accesses The code blindly trusted buffer offsets read from the file in the RLE decoder. Explicitly check the offset. Also error out on other RLE decoding errors. Signed-off-by: Michael Niedermayer (cherry picked from commit c9151de7c42553bb145be608df8513c1287f1f24) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsubdec.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 637f3e6147..0fcf0fb450 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -105,6 +105,9 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h, int x, y, len, color; uint8_t *d; + if (start >= buf_size) + return -1; + bit_len = (buf_size - start) * 8; init_get_bits(&gb, buf + start, bit_len); @@ -356,10 +359,12 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, sub_header->rects[0] = av_mallocz(sizeof(AVSubtitleRect)); sub_header->num_rects = 1; sub_header->rects[0]->pict.data[0] = bitmap; - decode_rle(bitmap, w * 2, w, (h + 1) / 2, - buf, offset1, buf_size, is_8bit); - decode_rle(bitmap + w, w * 2, w, h / 2, - buf, offset2, buf_size, is_8bit); + if (decode_rle(bitmap, w * 2, w, (h + 1) / 2, + buf, offset1, buf_size, is_8bit) < 0) + goto fail; + if (decode_rle(bitmap + w, w * 2, w, h / 2, + buf, offset2, buf_size, is_8bit) < 0) + goto fail; sub_header->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); if (is_8bit) { if (yuv_palette == 0) From 57710c3646d4e0edb9e66ecf059d29df172a4187 Mon Sep 17 00:00:00 2001 From: Dale Curtis Date: Mon, 5 Jan 2015 16:19:09 -0800 Subject: [PATCH 502/822] mov: Avoid overflow with mov_metadata_raw() The code previously added 1 to len without checking its size, resulting in an overflow which can corrupt value[-1] -- which may be used to store unaligned ptr information for certain allocators. Found-by: Paul Mehta Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index f0d095e1a1..0d4017b5b3 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -279,6 +279,9 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) static int mov_metadata_raw(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { + // Check for overflow. + if (len >= INT_MAX) + return AVERROR(EINVAL); char *value = av_malloc(len + 1); if (!value) return AVERROR(ENOMEM); From 20a03d5c93237341e15e5279fa9190a2f79bc75f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 04:29:10 +0100 Subject: [PATCH 503/822] avformat/mov: fix integer overflow in mov_read_udta_string() Found-by: Paul Mehta Signed-off-by: Michael Niedermayer (cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 0d4017b5b3..027becfe62 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -386,7 +386,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!key) return 0; - if (atom.size < 0) + if (atom.size < 0 || str_size >= INT_MAX/2) return AVERROR_INVALIDDATA; str_size = FFMIN3(sizeof(str)-1, str_size, atom.size); From 7c270a5e3b605b92419b2d6d8aa1c5fec63a2fc4 Mon Sep 17 00:00:00 2001 From: Dale Curtis Date: Mon, 5 Jan 2015 16:34:17 -0800 Subject: [PATCH 504/822] mov: Fix negative size calculation in mov_read_default(). The previous code assumed if an atom was marked with a 64-bit size extension, it actually had that data available. The new code verfies there's enough data in the atom for this to be done. Failure to verify causes total_size > atom.size which will result in negative size calculations later on. Found-by: Paul Mehta Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer (cherry picked from commit 3ebd76a9c57558e284e94da367dd23b435e6a6d0) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 027becfe62..97ef0963b3 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3045,7 +3045,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) } } total_size += 8; - if (a.size == 1) { /* 64 bit extended size */ + if (a.size == 1 && total_size + 8 <= atom.size) { /* 64 bit extended size */ a.size = avio_rb64(pb) - 8; total_size += 8; } From bebe3d35f3620cae6aeb83f8cd795cc8dce5f0e4 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 6 Jan 2015 09:42:59 +0000 Subject: [PATCH 505/822] lavfi: check av_strdup() return value Signed-off-by: Paul B Mahol (cherry picked from commit 145a84717b62e086cdb5f26649ad9f1b51ef38d0) Signed-off-by: Michael Niedermayer --- libavfilter/af_amix.c | 2 ++ libavfilter/af_join.c | 2 ++ libavfilter/split.c | 2 ++ libavfilter/src_movie.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 7140b6c744..4d5177faa5 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -496,6 +496,8 @@ static av_cold int init(AVFilterContext *ctx) snprintf(name, sizeof(name), "input%d", i); pad.type = AVMEDIA_TYPE_AUDIO; pad.name = av_strdup(name); + if (!pad.name) + return AVERROR(ENOMEM); pad.filter_frame = filter_frame; ff_insert_inpad(ctx, i, &pad); diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 3e9ccc8d74..7d99a4c8d1 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -214,6 +214,8 @@ static av_cold int join_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "input%d", i); pad.type = AVMEDIA_TYPE_AUDIO; pad.name = av_strdup(name); + if (!pad.name) + return AVERROR(ENOMEM); pad.filter_frame = filter_frame; pad.needs_fifo = 1; diff --git a/libavfilter/split.c b/libavfilter/split.c index 6abd5ee2e0..7353810677 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -52,6 +52,8 @@ static av_cold int split_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "output%d", i); pad.type = ctx->filter->inputs[0].type; pad.name = av_strdup(name); + if (!pad.name) + return AVERROR(ENOMEM); ff_insert_outpad(ctx, i, &pad); } diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index a1bb843166..4a0a951b48 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -292,6 +292,8 @@ static av_cold int movie_common_init(AVFilterContext *ctx) snprintf(name, sizeof(name), "out%d", i); pad.type = movie->st[i].st->codec->codec_type; pad.name = av_strdup(name); + if (!pad.name) + return AVERROR(ENOMEM); pad.config_props = movie_config_output_props; pad.request_frame = movie_request_frame; ff_insert_outpad(ctx, i, &pad); From 8abe459ac6ce26654986ac9df8d933cbe462199b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 12:48:38 +0100 Subject: [PATCH 506/822] avformat/matroskadec: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 6e70e4aca50696040cc9256ec96e5c31d9641432) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index cc6450e51a..6ab51c69d5 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1051,7 +1051,7 @@ static void ebml_free(EbmlSyntax *syntax, void *data) char *ptr = list->elem; for (j=0; jnb_elem; j++, ptr+=syntax[i].list_elem_size) ebml_free(syntax[i].def.n, ptr); - av_free(list->elem); + av_freep(&list->elem); } else ebml_free(syntax[i].def.n, data_off); default: break; @@ -2033,7 +2033,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska, { if (matroska->num_packets > 0) { memcpy(pkt, matroska->packets[0], sizeof(AVPacket)); - av_free(matroska->packets[0]); + av_freep(&matroska->packets[0]); if (matroska->num_packets > 1) { void *newpackets; memmove(&matroska->packets[0], &matroska->packets[1], @@ -2063,7 +2063,7 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska) int n; for (n = 0; n < matroska->num_packets; n++) { av_free_packet(matroska->packets[n]); - av_free(matroska->packets[n]); + av_freep(&matroska->packets[n]); } av_freep(&matroska->packets); matroska->num_packets = 0; @@ -2903,7 +2903,7 @@ static int matroska_read_close(AVFormatContext *s) for (n=0; n < matroska->tracks.nb_elem; n++) if (tracks[n].type == MATROSKA_TRACK_TYPE_AUDIO) - av_free(tracks[n].audio.buf); + av_freep(&tracks[n].audio.buf); ebml_free(matroska_cluster, &matroska->current_cluster); ebml_free(matroska_segment, matroska); From 3b17c1e13e45b17ca9ec87360db6752b2f902f04 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 12:53:53 +0100 Subject: [PATCH 507/822] avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory Signed-off-by: Michael Niedermayer (cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 75f6639e6e..738355f45a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2865,6 +2865,7 @@ int ff_alloc_extradata(AVCodecContext *avctx, int size) int ret; if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) { + avctx->extradata = NULL; avctx->extradata_size = 0; return AVERROR(EINVAL); } From 3e3193f03c7d0b331c91040d7659b0248c4ec221 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 13:12:22 +0100 Subject: [PATCH 508/822] cmdutils: Use 64bit for file size/offset related variable in cmdutils_read_file() Signed-off-by: Michael Niedermayer (cherry picked from commit 369b4cd4120bf67aa5187b6bc72574970a24ca22) Signed-off-by: Michael Niedermayer --- cmdutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdutils.c b/cmdutils.c index dc9bd2cc00..2e18d1b63c 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1803,7 +1803,7 @@ int read_yesno(void) int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) { - int ret; + int64_t ret; FILE *f = av_fopen_utf8(filename, "rb"); if (!f) { From 81bdaacb6556e4c70fddfe67a828b8f29ea65ea8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 19:51:38 +0100 Subject: [PATCH 509/822] avformat/mov: Fix mixed declaration and statement warning Signed-off-by: Michael Niedermayer (cherry picked from commit db27f50e0658e91758e8a17fdcf390e6bc93c1d2) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 97ef0963b3..294a8b0cb5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -279,10 +279,11 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) static int mov_metadata_raw(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { + char *value; // Check for overflow. if (len >= INT_MAX) return AVERROR(EINVAL); - char *value = av_malloc(len + 1); + value = av_malloc(len + 1); if (!value) return AVERROR(ENOMEM); avio_read(pb, value, len); From 6e2204b1529268afff489e34ab064ede3dfe569e Mon Sep 17 00:00:00 2001 From: James Almer Date: Sat, 3 Jan 2015 01:40:02 -0300 Subject: [PATCH 510/822] configure: bump year Happy new year! (cherry picked from commit b8db25a3338b67186837c49580fe538d63dd73c7) Signed-off-by: Michael Niedermayer --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e6122e7105..f7883b4b7f 100755 --- a/configure +++ b/configure @@ -5176,7 +5176,7 @@ cat > $TMPH < Date: Wed, 7 Jan 2015 23:57:50 +0100 Subject: [PATCH 511/822] avcodec/dvdsubdec: error on bitmaps with size 0 Attemtping to decode them could lead to invalid writes with some fuzzed samples. Signed-off-by: Michael Niedermayer (cherry picked from commit bcaa9099b3648b47060e1724a97dc98b63c83702) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsubdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 0fcf0fb450..122a4c7edb 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -108,6 +108,9 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h, if (start >= buf_size) return -1; + if (w <= 0 || h <= 0) + return -1; + bit_len = (buf_size - start) * 8; init_get_bits(&gb, buf + start, bit_len); From a4a87a7efd8b72c0871491bcc85330e14beb8bd6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 8 Jan 2015 17:19:17 +0100 Subject: [PATCH 512/822] avcodec/dvdsubdec: fix accessing dangling pointers dvdsub_decode() can call append_to_cached_buf() 2 times, the second time with ctx->buf as argument. If the second append_to_cached_buf() reallocs ctx->buf, the argument will be a pointer to the previous, freed block. This can cause invalid reads at least with some fuzzed files - and possibly with valid files. Since packets can apparently not be larger than 64K (even if packets are combined), just use a fixed size buffer. It will be allocated as part of the DVDSubContext, and although some memory is "wasted", it's relatively minimal by modern standards and should be acceptable. Signed-off-by: Michael Niedermayer (cherry picked from commit 816577716bc6170bccfea3b9e865618b69a4b426) Signed-off-by: Michael Niedermayer --- libavcodec/dvdsubdec.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 122a4c7edb..ee6aaf62a8 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -37,7 +37,7 @@ typedef struct DVDSubContext int has_palette; uint8_t colormap[4]; uint8_t alpha[256]; - uint8_t *buf; + uint8_t buf[0x10000]; int buf_size; #ifdef DEBUG int sub_id; @@ -502,15 +502,11 @@ static int append_to_cached_buf(AVCodecContext *avctx, { DVDSubContext *ctx = avctx->priv_data; - if (ctx->buf_size > 0xffff - buf_size) { + if (ctx->buf_size >= sizeof(ctx->buf) - buf_size) { av_log(avctx, AV_LOG_WARNING, "Attempt to reconstruct " "too large SPU packets aborted.\n"); - av_freep(&ctx->buf); return AVERROR_INVALIDDATA; } - ctx->buf = av_realloc(ctx->buf, ctx->buf_size + buf_size); - if (!ctx->buf) - return AVERROR(ENOMEM); memcpy(ctx->buf + ctx->buf_size, buf, buf_size); ctx->buf_size += buf_size; return 0; @@ -526,7 +522,7 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub = data; int is_menu; - if (ctx->buf) { + if (ctx->buf_size) { int ret = append_to_cached_buf(avctx, buf, buf_size); if (ret < 0) { *data_size = 0; @@ -564,7 +560,6 @@ static int dvdsub_decode(AVCodecContext *avctx, } #endif - av_freep(&ctx->buf); ctx->buf_size = 0; *data_size = 1; return buf_size; @@ -646,7 +641,6 @@ static av_cold int dvdsub_init(AVCodecContext *avctx) static av_cold int dvdsub_close(AVCodecContext *avctx) { DVDSubContext *ctx = avctx->priv_data; - av_freep(&ctx->buf); ctx->buf_size = 0; return 0; } From 0684cd5d8c929e758133c68cb8dda0bf497e79e0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 8 Jan 2015 23:02:30 +0100 Subject: [PATCH 513/822] ffmpeg: Clear error message array at init. This avoids printing uninitialized bytes if no error message is set Signed-off-by: Michael Niedermayer (cherry picked from commit 6d1a2efb8ac399a003ea7d3b6f8c641d192567ee) Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index a906186b1b..d5667734e9 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2284,7 +2284,7 @@ static int transcode_init(void) AVCodecContext *codec; OutputStream *ost; InputStream *ist; - char error[1024]; + char error[1024] = {0}; int want_sdp = 1; for (i = 0; i < nb_filtergraphs; i++) { From fc1fed62d9da6f752fbfa4f27fbc1aab7f884c67 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 9 Jan 2015 02:13:36 +0100 Subject: [PATCH 514/822] vp9: fix parser return values in error case The parser must always set the out_size and out_data pointers. The API seems to require it, and the common code in parser.c also relies on it. Signed-off-by: Michael Niedermayer (cherry picked from commit b88e80589bd11ef935a5e9dab53d4edb00de16e4) Signed-off-by: Michael Niedermayer --- libavcodec/vp9_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index af033c25e6..922f36f381 100644 --- a/libavcodec/vp9_parser.c +++ b/libavcodec/vp9_parser.c @@ -77,6 +77,8 @@ static int parse(AVCodecParserContext *ctx, idx += a; \ if (sz > size) { \ s->n_frames = 0; \ + *out_size = 0; \ + *out_data = data; \ av_log(avctx, AV_LOG_ERROR, \ "Superframe packet size too big: %u > %d\n", \ sz, size); \ From 33a67961c8c65dcd158ef29e1e8152fe68b6f31a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 10 Jan 2015 03:43:54 +0100 Subject: [PATCH 515/822] avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1" Signed-off-by: Michael Niedermayer (cherry picked from commit 7824dc5150c0ea44ffa7cd4d57803f9a9697e7d7) Signed-off-by: Michael Niedermayer --- libavformat/movenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 01bc3c9535..5c72cfaf9d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2033,7 +2033,8 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) } version = max_track_len < UINT32_MAX ? 0 : 1; - (version == 1) ? avio_wb32(pb, 120) : avio_wb32(pb, 108); /* size */ + avio_wb32(pb, version == 1 ? 120 : 108); /* size */ + ffio_wfourcc(pb, "mvhd"); avio_w8(pb, version); avio_wb24(pb, 0); /* flags */ From ecae610207e35d6e7b4cb7e773414ed172c55adf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 13 Jan 2015 18:51:33 +0100 Subject: [PATCH 516/822] avcodec/hevc: Fix handling of skipped_bytes() reallocation failures Fixes CID1260704 Signed-off-by: Michael Niedermayer (cherry picked from commit e172f5e53ae4dbbcdcf81c9a3b962dc9f5a8a98d) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 5f719c8561..8ba9838d5c 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2568,17 +2568,30 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) if (s->nals_allocated < s->nb_nals + 1) { int new_size = s->nals_allocated + 1; - HEVCNAL *tmp = av_realloc_array(s->nals, new_size, sizeof(*tmp)); + void *tmp = av_realloc_array(s->nals, new_size, sizeof(*s->nals)); + ret = AVERROR(ENOMEM); if (!tmp) { - ret = AVERROR(ENOMEM); goto fail; } s->nals = tmp; memset(s->nals + s->nals_allocated, 0, - (new_size - s->nals_allocated) * sizeof(*tmp)); - av_reallocp_array(&s->skipped_bytes_nal, new_size, sizeof(*s->skipped_bytes_nal)); - av_reallocp_array(&s->skipped_bytes_pos_size_nal, new_size, sizeof(*s->skipped_bytes_pos_size_nal)); - av_reallocp_array(&s->skipped_bytes_pos_nal, new_size, sizeof(*s->skipped_bytes_pos_nal)); + (new_size - s->nals_allocated) * sizeof(*s->nals)); + + tmp = av_realloc_array(s->skipped_bytes_nal, new_size, sizeof(*s->skipped_bytes_nal)); + if (!tmp) + goto fail; + s->skipped_bytes_nal = tmp; + + tmp = av_realloc_array(s->skipped_bytes_pos_size_nal, new_size, sizeof(*s->skipped_bytes_pos_size_nal)); + if (!tmp) + goto fail; + s->skipped_bytes_pos_size_nal = tmp; + + tmp = av_realloc_array(s->skipped_bytes_pos_nal, new_size, sizeof(*s->skipped_bytes_pos_nal)); + if (!tmp) + goto fail; + s->skipped_bytes_pos_nal = tmp; + s->skipped_bytes_pos_size_nal[s->nals_allocated] = 1024; // initial buffer size s->skipped_bytes_pos_nal[s->nals_allocated] = av_malloc_array(s->skipped_bytes_pos_size_nal[s->nals_allocated], sizeof(*s->skipped_bytes_pos)); s->nals_allocated = new_size; From b1959b1719c81eb93e06fae4788200d172b7a9fd Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 13 Jan 2015 14:47:47 +0100 Subject: [PATCH 517/822] qpeg: avoid pointless invalid memcpy() If refdata was NULL, the memcpy() ended up copying the same memory block onto itself, which is not only pointless, but also undefined behavior. Signed-off-by: Michael Niedermayer (cherry picked from commit 921706691a87c3ea5f5b92afd9b423e5f8c6e9d9) Signed-off-by: Michael Niedermayer --- libavcodec/qpeg.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index d61bceafd7..71f322b828 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -120,12 +120,13 @@ static void av_noinline qpeg_decode_inter(QpegContext *qctx, uint8_t *dst, int filled = 0; int orig_height; - if(!refdata) - refdata= dst; - - /* copy prev frame */ - for(i = 0; i < height; i++) - memcpy(dst + (i * stride), refdata + (i * stride), width); + if (refdata) { + /* copy prev frame */ + for (i = 0; i < height; i++) + memcpy(dst + (i * stride), refdata + (i * stride), width); + } else { + refdata = dst; + } orig_height = height; height--; From 855ae45c5a6417b535641fcd162915dab436b521 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 16 Jan 2015 02:10:35 +0100 Subject: [PATCH 518/822] avdevice: Use av_format_get_control_message_cb() This is required as the location of this field could change and is specified in libavformat not avdevice Signed-off-by: Michael Niedermayer (cherry picked from commit ba97cf2c4562b60fbef89103b61516891e31845e) Signed-off-by: Michael Niedermayer --- libavdevice/avdevice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 9e2b7d52da..cc0597377c 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -48,9 +48,9 @@ int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToD int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type, void *data, size_t data_size) { - if (!s->control_message_cb) + if (!av_format_get_control_message_cb(s)) return AVERROR(ENOSYS); - return s->control_message_cb(s, type, data, data_size); + return av_format_get_control_message_cb(s)(s, type, data, data_size); } int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list) From e91df69cf2046b785598c0c125afb53dab26b5ea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 16 Jan 2015 21:36:26 +0100 Subject: [PATCH 519/822] avfilter/vf_framepack: Check and update frame_rate The frame_rate update was missing leaving the output frame rate wrong. Signed-off-by: Michael Niedermayer (cherry picked from commit a46a23d30fea9c8a5570e07ec4d9c9b4eaa6eb4f) Signed-off-by: Michael Niedermayer --- libavfilter/vf_framepack.c | 13 +++++++++++- tests/ref/fate/filter-framepack-frameseq | 26 ++++++++++++------------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index 8a7d4e8f32..f5215fed9d 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -82,6 +82,7 @@ static int config_output(AVFilterLink *outlink) int width = ctx->inputs[LEFT]->w; int height = ctx->inputs[LEFT]->h; AVRational time_base = ctx->inputs[LEFT]->time_base; + AVRational frame_rate = ctx->inputs[LEFT]->frame_rate; // check size and fps match on the other input if (width != ctx->inputs[RIGHT]->w || @@ -93,11 +94,18 @@ static int config_output(AVFilterLink *outlink) return AVERROR_INVALIDDATA; } else if (av_cmp_q(time_base, ctx->inputs[RIGHT]->time_base) != 0) { av_log(ctx, AV_LOG_ERROR, - "Left and right framerates differ (%d/%d vs %d/%d).\n", + "Left and right time bases differ (%d/%d vs %d/%d).\n", time_base.num, time_base.den, ctx->inputs[RIGHT]->time_base.num, ctx->inputs[RIGHT]->time_base.den); return AVERROR_INVALIDDATA; + } else if (av_cmp_q(frame_rate, ctx->inputs[RIGHT]->frame_rate) != 0) { + av_log(ctx, AV_LOG_ERROR, + "Left and right framerates differ (%d/%d vs %d/%d).\n", + frame_rate.num, frame_rate.den, + ctx->inputs[RIGHT]->frame_rate.num, + ctx->inputs[RIGHT]->frame_rate.den); + return AVERROR_INVALIDDATA; } s->pix_desc = av_pix_fmt_desc_get(outlink->format); @@ -108,6 +116,8 @@ static int config_output(AVFilterLink *outlink) switch (s->format) { case AV_STEREO3D_FRAMESEQUENCE: time_base.den *= 2; + frame_rate.num *= 2; + s->double_pts = AV_NOPTS_VALUE; break; case AV_STEREO3D_COLUMNS: @@ -126,6 +136,7 @@ static int config_output(AVFilterLink *outlink) outlink->w = width; outlink->h = height; outlink->time_base = time_base; + outlink->frame_rate= frame_rate; return 0; } diff --git a/tests/ref/fate/filter-framepack-frameseq b/tests/ref/fate/filter-framepack-frameseq index c3d2a15e8e..83c08a0324 100644 --- a/tests/ref/fate/filter-framepack-frameseq +++ b/tests/ref/fate/filter-framepack-frameseq @@ -1,16 +1,16 @@ -#tb 0: 1/25 +#tb 0: 1/50 0, 0, 0, 1, 152064, 0x05b789ef 0, 1, 1, 1, 152064, 0x05b789ef 0, 2, 2, 1, 152064, 0x4bb46551 -0, 3, 3, 1, 152064, 0x9dddf64a -0, 4, 4, 1, 152064, 0x2a8380b0 -0, 5, 5, 1, 152064, 0x4de3b652 -0, 6, 6, 1, 152064, 0xedb5a8e6 -0, 7, 7, 1, 152064, 0xe20f7c23 -0, 8, 8, 1, 152064, 0x5ab58bac -0, 9, 9, 1, 152064, 0x1f1b8026 -0, 10, 10, 1, 152064, 0x91373915 -0, 11, 11, 1, 152064, 0x02344760 -0, 12, 12, 1, 152064, 0x30f5fcd5 -0, 13, 13, 1, 152064, 0xc711ad61 -0, 14, 14, 1, 152064, 0x24eca223 +0, 3, 3, 1, 152064, 0x4bb46551 +0, 4, 4, 1, 152064, 0x9dddf64a +0, 5, 5, 1, 152064, 0x9dddf64a +0, 6, 6, 1, 152064, 0x2a8380b0 +0, 7, 7, 1, 152064, 0x2a8380b0 +0, 8, 8, 1, 152064, 0x4de3b652 +0, 9, 9, 1, 152064, 0x4de3b652 +0, 10, 10, 1, 152064, 0xedb5a8e6 +0, 11, 11, 1, 152064, 0xedb5a8e6 +0, 12, 12, 1, 152064, 0xe20f7c23 +0, 13, 13, 1, 152064, 0xe20f7c23 +0, 14, 14, 1, 152064, 0x5ab58bac From 8babbdc9b15fd7eb702ab49cd2054d0138fa59bf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 17 Jan 2015 01:56:03 +0100 Subject: [PATCH 520/822] avcodec/flac_parser: fix handling EOF if no headers are found Fixes assertion failure Fixes Ticket4269 Signed-off-by: Michael Niedermayer (cherry picked from commit c4d85fc23c100f7a27d9bad710eb153214868e27) Signed-off-by: Michael Niedermayer --- libavcodec/flac_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index ba1f060fd9..0512575d85 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -685,7 +685,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, handle_error: *poutbuf = NULL; *poutbuf_size = 0; - return read_end - buf; + return buf_size ? read_end - buf : 0; } static av_cold int flac_parse_init(AVCodecParserContext *c) From 3e8b73e65bb0f2bec1362b2a78bed7b11d31326e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 6 Dec 2014 00:18:29 +0100 Subject: [PATCH 521/822] avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata() Signed-off-by: Michael Niedermayer (cherry picked from commit 03abf55f252945c70f4a79eaf4d609cee4d98710) Signed-off-by: Michael Niedermayer --- libavformat/rmdec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 4ae5808c2f..4d812fbd85 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -397,7 +397,11 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, skip: /* skip codec info */ size = avio_tell(pb) - codec_pos; - avio_skip(pb, codec_data_size - size); + if (codec_data_size >= size) { + avio_skip(pb, codec_data_size - size); + } else { + av_log(s, AV_LOG_WARNING, "codec_data_size %u < size %d\n", codec_data_size, size); + } return 0; } From a40e6a214ec60b15e28b372739512a74bb64f79c Mon Sep 17 00:00:00 2001 From: Rob Sykes Date: Sat, 13 Dec 2014 21:12:56 +0100 Subject: [PATCH 522/822] swresample/soxr_resample: fix error handling Fixes CID1257659 Signed-off-by: Michael Niedermayer (cherry picked from commit 4b6f2253741f3023928e61ae5105ccd4b1c515fb) Signed-off-by: Michael Niedermayer --- libswresample/soxr_resample.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c index 4c000db0ca..7467f8d5cc 100644 --- a/libswresample/soxr_resample.c +++ b/libswresample/soxr_resample.c @@ -76,8 +76,12 @@ static int process( AudioData *src, int src_size, int *consumed){ size_t idone, odone; soxr_error_t error = soxr_set_error((soxr_t)c, soxr_set_num_channels((soxr_t)c, src->ch_count)); - error = soxr_process((soxr_t)c, src->ch, (size_t)src_size, - &idone, dst->ch, (size_t)dst_size, &odone); + if (!error) + error = soxr_process((soxr_t)c, src->ch, (size_t)src_size, + &idone, dst->ch, (size_t)dst_size, &odone); + else + idone = 0; + *consumed = (int)idone; return error? -1 : odone; } From f2fde86dae21f55a69a959e61e3d6466a6d5d545 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Dec 2014 17:26:11 +0100 Subject: [PATCH 523/822] avformat/aviobuf: Check that avio_seek() target is non negative Fixes out of array access Suggested-by: Andrew Scherkus Signed-off-by: Michael Niedermayer (cherry picked from commit ed86dbd05d61363dc1c0d33f3267e2177c985fdd) Signed-off-by: Michael Niedermayer --- libavformat/aviobuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 95fdf200ef..db5a0f3227 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -219,6 +219,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) return offset1; offset += offset1; } + if (offset < 0) + return AVERROR(EINVAL); + offset1 = offset - pos; if (!s->must_flush && (!s->direct || !s->seek) && offset1 >= 0 && offset1 <= buffer_size) { From 30099bf0f01486b54aeea772ed21315dab731479 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Dec 2014 19:46:31 +0100 Subject: [PATCH 524/822] avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference() Fixes Ticket3686 Signed-off-by: Michael Niedermayer (cherry picked from commit a29524bf2e197dd8d582445de0fe17f03b79f79d) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 738355f45a..80a909ae48 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -706,6 +706,8 @@ static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_in int default_stream_index = av_find_default_stream_index(s); if (s->streams[default_stream_index]->pts_wrap_reference == AV_NOPTS_VALUE) { for (i = 0; i < s->nb_streams; i++) { + if (av_find_program_from_stream(s, NULL, i)) + continue; s->streams[i]->pts_wrap_reference = pts_wrap_reference; s->streams[i]->pts_wrap_behavior = pts_wrap_behavior; } From b9510b3274cf1e37079aafdeacf020818908d989 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Dec 2014 04:32:58 +0100 Subject: [PATCH 525/822] lavu/frame: fix malloc error path in av_frame_copy_props() The error path frees all side data, but forgets to reset the side data count. This can blow up later in av_frame_unref() and free_side_data(). Signed-off-by: Michael Niedermayer (cherry picked from commit a400edbb6d00c0211de38e4f1b4f593681db91d8) Signed-off-by: Michael Niedermayer --- libavutil/frame.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index 747aa79b8f..32a41fb61b 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -487,6 +487,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) av_dict_free(&dst->side_data[i]->metadata); } av_freep(&dst->side_data); + dst->nb_side_data = 0; return AVERROR(ENOMEM); } memcpy(sd_dst->data, sd_src->data, sd_src->size); From 3b9cb8d7d8191508af624761d696f5425746cb4b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 15 Dec 2014 04:32:23 +0100 Subject: [PATCH 526/822] configure: create the tests directory like the doc directory This fixes an issue where the tests directory is not created for out of tree builds before its needed Tested-by: Dave Yeo Signed-off-by: Michael Niedermayer (cherry picked from commit e631872f13b6be0583603d45a11e53319754bc8d) Signed-off-by: Michael Niedermayer --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index f7883b4b7f..7811ac88fa 100755 --- a/configure +++ b/configure @@ -5203,6 +5203,7 @@ enabled getenv || echo "#define getenv(x) NULL" >> $TMPH mkdir -p doc +mkdir -p tests echo "@c auto-generated by configure" > doc/config.texi print_config ARCH_ "$config_files" $ARCH_LIST From de434423910efaee8c2d02a49a91ef3f0ab516ee Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 15:01:05 +0100 Subject: [PATCH 527/822] avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 16d763fa45b95783c6770edc559769d9a83d6a10) Signed-off-by: Michael Niedermayer --- libavformat/hdsenc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index fb0a94892a..cb3a3ff537 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -145,15 +145,15 @@ static void hds_free(AVFormatContext *s) if (os->ctx && os->ctx_inited) av_write_trailer(os->ctx); if (os->ctx && os->ctx->pb) - av_free(os->ctx->pb); + av_freep(&os->ctx->pb); if (os->ctx) avformat_free_context(os->ctx); - av_free(os->metadata); + av_freep(&os->metadata); for (j = 0; j < os->nb_extra_packets; j++) - av_free(os->extra_packets[j]); + av_freep(&os->extra_packets[j]); for (j = 0; j < os->nb_fragments; j++) - av_free(os->fragments[j]); - av_free(os->fragments); + av_freep(&os->fragments[j]); + av_freep(&os->fragments); } av_freep(&c->streams); } @@ -509,7 +509,7 @@ static int hds_flush(AVFormatContext *s, OutputStream *os, int final, if (remove > 0) { for (i = 0; i < remove; i++) { unlink(os->fragments[i]->file); - av_free(os->fragments[i]); + av_freep(&os->fragments[i]); } os->nb_fragments -= remove; memmove(os->fragments, os->fragments + remove, From f5fd937fc5dfb1be11d467742c77246d5188e2ea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 15:03:32 +0100 Subject: [PATCH 528/822] avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer (cherry picked from commit 91ea466551c148bd897706a1b6a168e783761a06) Signed-off-by: Michael Niedermayer --- libavformat/flvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 3b6d01af63..166ce35f6c 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -614,7 +614,7 @@ static int flv_read_close(AVFormatContext *s) static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size) { - av_free(st->codec->extradata); + av_freep(&st->codec->extradata); if (ff_get_extradata(st->codec, s->pb, size) < 0) return AVERROR(ENOMEM); return 0; From 7279be7c75c38547994466b6f95bc3cadb05238b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 16:24:55 +0100 Subject: [PATCH 529/822] avcodec/vmdvideo: Check len before using it in method 3 Fixes out of array access Fixes: asan_heap-oob_4d23ba_91_cov_3853393937_128.vmd Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3030fb7e0d41836f8add6399e9a7c7b740b48bfd) Signed-off-by: Michael Niedermayer --- libavcodec/vmdav.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index c1fb80b97d..91d245a2a9 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -352,6 +352,9 @@ static int vmd_decode(VmdVideoContext *s, AVFrame *frame) ofs += slen; bytestream2_skip(&gb, len); } else { + if (ofs + len > frame_width || + bytestream2_get_bytes_left(&gb) < len) + return AVERROR_INVALIDDATA; bytestream2_get_buffer(&gb, &dp[ofs], len); ofs += len; } From c351cd720a0c870dc09a15b6e191188978349bc7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 20:45:31 +0100 Subject: [PATCH 530/822] avcodec/utvideodec: Fix handling of slice_height=0 Fixes out of array accesses Fixes: asan_heap-oob_25bcd7e_3783_cov_3553517262_utvideo_rgba_median.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3881606240953b9275a247a1c98a567f3c44890f) Signed-off-by: Michael Niedermayer --- libavcodec/utvideodec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index ff69a25002..05db9623cf 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -212,6 +212,8 @@ static void restore_median(uint8_t *src, int step, int stride, slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; + if (!slice_height) + continue; bsrc = src + slice_start * stride; // first line - left neighbour prediction @@ -267,6 +269,8 @@ static void restore_median_il(uint8_t *src, int step, int stride, slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; slice_height >>= 1; + if (!slice_height) + continue; bsrc = src + slice_start * stride; From a0f4f12b627393a357f5abf89325b5c41d5e42b7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 21:14:40 +0100 Subject: [PATCH 531/822] avformat/mov: check atom nesting depth Fixes call stack overflow Fixes: case1_call_stack_overflow.mp4 Found-by: Michal Zalewski Signed-off-by: Michael Niedermayer (cherry picked from commit caa7a3914f499f74b3ee346f26d598ebdc0ec210) Conflicts: libavformat/isom.h Conflicts: libavformat/isom.h --- libavformat/isom.h | 1 + libavformat/mov.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index a929ebf05e..82dfb3a305 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -167,6 +167,7 @@ typedef struct MOVContext { int64_t next_root_atom; ///< offset of the next root atom int *bitrates; ///< bitrates read before streams creation int bitrates_count; + int atom_depth; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index 294a8b0cb5..92039902ed 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3026,6 +3026,12 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) MOVAtom a; int i; + if (c->atom_depth > 10) { + av_log(c->fc, AV_LOG_ERROR, "Atoms too deeply nested\n"); + return AVERROR_INVALIDDATA; + } + c->atom_depth ++; + if (atom.size < 0) atom.size = INT64_MAX; while (total_size + 8 <= atom.size && !url_feof(pb)) { @@ -3042,6 +3048,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) { av_log(c->fc, AV_LOG_ERROR, "Broken file, trak/mdat not at top-level\n"); avio_skip(pb, -8); + c->atom_depth --; return 0; } } @@ -3078,13 +3085,16 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) int64_t start_pos = avio_tell(pb); int64_t left; int err = parse(c, pb, a); - if (err < 0) + if (err < 0) { + c->atom_depth --; return err; + } if (c->found_moov && c->found_mdat && ((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) || start_pos + a.size == avio_size(pb))) { if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) c->next_root_atom = start_pos + a.size; + c->atom_depth --; return 0; } left = a.size - avio_tell(pb) + start_pos; @@ -3104,6 +3114,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (total_size < atom.size && atom.size < 0x7ffff) avio_skip(pb, atom.size - total_size); + c->atom_depth --; return 0; } From b8021620e21aaab77350f0a0d09f82116c27b9b8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 21:29:27 +0100 Subject: [PATCH 532/822] avformat/mov: fix integer overflow of size Fixes: case1_call_stack_overflow.mp4 Found-by: Michal Zalewski Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 92039902ed..9a52eb0a28 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1480,7 +1480,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, static void mov_parse_stsd_subtitle(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc, - int size) + int64_t size) { // ttxt stsd contains display flags, justification, background // color, fonts, and default styles, so fake an atom to read it @@ -1494,10 +1494,10 @@ static void mov_parse_stsd_subtitle(MOVContext *c, AVIOContext *pb, static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc, - int size) + int64_t size) { if (st->codec->codec_tag == MKTAG('t','m','c','d')) { - if (ff_get_extradata(st->codec, pb, size) < 0) + if ((int)size != size || ff_get_extradata(st->codec, pb, size) < 0) return AVERROR(ENOMEM); if (size > 16) { MOVStreamContext *tmcd_ctx = st->priv_data; From 226727f08fb06c958e17be413b97701dcadd122b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 16 Dec 2014 22:21:21 +0100 Subject: [PATCH 533/822] swscale: increase yuv2rgb table headroom Fixes out of array access Fixes: case2_bad_read_yuv2rgbx32.mp4 Found-by: Michal Zalewski Signed-off-by: Michael Niedermayer --- libswscale/swscale_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index c2c23a08e5..59bda7b873 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -37,7 +37,7 @@ #define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long -#define YUVRGB_TABLE_HEADROOM 128 +#define YUVRGB_TABLE_HEADROOM 256 #define MAX_FILTER_SIZE 256 From 50e04b3f3ca961044d088b2c7a94fe94bc4ef9c5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Dec 2014 01:31:48 +0100 Subject: [PATCH 534/822] avcodec/h264: make the first field of H264Context an AVClass Fixes use of freed memory Fixes: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit f3b5b139ad853b6f69c6a0b036815a60e7b3f261) Signed-off-by: Michael Niedermayer --- libavcodec/h264.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index e30e228bfb..66c147340b 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -286,6 +286,7 @@ typedef struct MMCO { * H264Context */ typedef struct H264Context { + AVClass *av_class; AVCodecContext *avctx; VideoDSPContext vdsp; H264DSPContext h264dsp; From 9ce4686bfef84845eb285e5732d3fa182e056391 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Dec 2014 03:14:21 +0100 Subject: [PATCH 535/822] avcodec/indeo3: use signed variables to avoid underflow Fixes out of array read Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3305acdc92fa37869f160a11a87741c8a0de0454) Signed-off-by: Michael Niedermayer --- libavcodec/indeo3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index aa9c30aca9..4659b18cfb 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -94,7 +94,7 @@ typedef struct Indeo3DecodeContext { int16_t width, height; uint32_t frame_num; ///< current frame number (zero-based) - uint32_t data_size; ///< size of the frame data in bytes + int data_size; ///< size of the frame data in bytes uint16_t frame_flags; ///< frame properties uint8_t cb_offset; ///< needed for selecting VQ tables uint8_t buf_sel; ///< active frame buffer: 0 - primary, 1 -secondary @@ -899,7 +899,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, GetByteContext gb; const uint8_t *bs_hdr; uint32_t frame_num, word2, check_sum, data_size; - uint32_t y_offset, u_offset, v_offset, starts[3], ends[3]; + int y_offset, u_offset, v_offset; + uint32_t starts[3], ends[3]; uint16_t height, width; int i, j; From 133dc77da96fe8c4ed042d7a2cce835ef5aba6c3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Dec 2014 15:33:05 +0100 Subject: [PATCH 536/822] avcodec/dcadec: Check that the added xch channel isnt already there Fixes null pointer dereference Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 7d593495e42e92693cc8f3ce9b42cf3edcea377a) Signed-off-by: Michael Niedermayer --- libavcodec/dcadec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 4392f032f9..c02d7a7f4a 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2349,6 +2349,10 @@ FF_ENABLE_DEPRECATION_WARNINGS #else if (s->xch_present && !s->xch_disable) { #endif + if (avctx->channel_layout & AV_CH_BACK_CENTER) { + avpriv_request_sample(avctx, "XCh with Back center channel"); + return AVERROR_INVALIDDATA; + } avctx->channel_layout |= AV_CH_BACK_CENTER; if (s->lfe) { avctx->channel_layout |= AV_CH_LOW_FREQUENCY; From 13838647ca63b494d5d80698e093f57a62f61e4b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Dec 2014 19:42:57 +0100 Subject: [PATCH 537/822] avcodec/hevc: clear filter_slice_edges() on allocation This avoids use of uninitialized memory Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 8aa8d12554868c32436750f881954193087219c8) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 8ba9838d5c..2d81a3a874 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -112,7 +112,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm) goto fail; - s->filter_slice_edges = av_malloc(ctb_count); + s->filter_slice_edges = av_mallocz(ctb_count); s->tab_slice_address = av_malloc_array(pic_size_in_ctb, sizeof(*s->tab_slice_address)); s->qp_y_tab = av_malloc_array(pic_size_in_ctb, From 25dc978bb1b50a94fae5e66779c87ece76bde323 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Dec 2014 21:27:37 +0100 Subject: [PATCH 538/822] avcodec/h264: Clear delayed_pic on deallocation Fixes use of freed memory Fixes: case5_av_frame_copy_props.mp4 Found-by: Michal Zalewski Signed-off-by: Michael Niedermayer (cherry picked from commit e8714f6f93d1a32f4e4655209960afcf4c185214) Conflicts: libavcodec/h264.c --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 6aa20f5375..ab4d211be6 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1233,6 +1233,7 @@ static void free_tables(H264Context *h, int free_rbsp) av_buffer_pool_uninit(&h->ref_index_pool); if (free_rbsp && h->DPB) { + memset(h->delayed_pic, 0, sizeof(h->delayed_pic)); for (i = 0; i < MAX_PICTURE_COUNT; i++) unref_picture(h, &h->DPB[i]); av_freep(&h->DPB); From 85b2396265f0be1ff3349e4bfafdf51949839910 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 18 Dec 2014 02:09:23 +0100 Subject: [PATCH 539/822] avcodec/hevc_ps: Check diff_cu_qp_delta_depth Fixes undefined behavior Fixes: asan_static-oob_17aa046_582_cov_1577759978_DBLK_G_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 3281fa892599d71b4dc298a426af8296419cd90e) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 53b27bda3b..c575fce429 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1072,6 +1072,14 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) if (pps->cu_qp_delta_enabled_flag) pps->diff_cu_qp_delta_depth = get_ue_golomb_long(gb); + if (pps->diff_cu_qp_delta_depth < 0 || + pps->diff_cu_qp_delta_depth > sps->log2_diff_max_min_coding_block_size) { + av_log(s->avctx, AV_LOG_ERROR, "diff_cu_qp_delta_depth %d is invalid\n", + pps->diff_cu_qp_delta_depth); + ret = AVERROR_INVALIDDATA; + goto err; + } + pps->cb_qp_offset = get_se_golomb(gb); if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) { av_log(s->avctx, AV_LOG_ERROR, "pps_cb_qp_offset out of range: %d\n", From f1d59a207fef0df648b0489ae54f57436fbdf45a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 18 Dec 2014 03:16:39 +0100 Subject: [PATCH 540/822] avcodec/h264: Check *log2_weight_denom Fixes undefined behavior Fixes: signal_sigsegv_14768d2_2248_cov_3629497219_h264_h264___pi_20070614T182942.h264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 61296d41e2de3b41304339e4631dd44c2e15f805) Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ab4d211be6..885de45687 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2707,6 +2707,16 @@ int ff_pred_weight_table(H264Context *h) h->luma_log2_weight_denom = get_ue_golomb(&h->gb); if (h->sps.chroma_format_idc) h->chroma_log2_weight_denom = get_ue_golomb(&h->gb); + + if (h->luma_log2_weight_denom > 7U) { + av_log(h->avctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is out of range\n", h->luma_log2_weight_denom); + h->luma_log2_weight_denom = 0; + } + if (h->chroma_log2_weight_denom > 7U) { + av_log(h->avctx, AV_LOG_ERROR, "chroma_log2_weight_denom %d is out of range\n", h->chroma_log2_weight_denom); + h->chroma_log2_weight_denom = 0; + } + luma_def = 1 << h->luma_log2_weight_denom; chroma_def = 1 << h->chroma_log2_weight_denom; From 2528468e204c906bf5f9a0a8dc25021bec14bb7c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 18 Dec 2014 18:57:27 +0100 Subject: [PATCH 541/822] avcodec/indeo3: ensure offsets are non negative Signed-off-by: Michael Niedermayer (cherry picked from commit 368642361f3a589d7b0c23ea327d988edb434e3f) Signed-off-by: Michael Niedermayer --- libavcodec/indeo3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 4659b18cfb..97ca180cce 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -982,7 +982,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, ctx->y_data_size = ends[0] - starts[0]; ctx->v_data_size = ends[1] - starts[1]; ctx->u_data_size = ends[2] - starts[2]; - if (FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 || + if (FFMIN3(y_offset, v_offset, u_offset) < 0 || + FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 || FFMIN3(y_offset, v_offset, u_offset) < gb.buffer - bs_hdr + 16 || FFMIN3(ctx->y_data_size, ctx->v_data_size, ctx->u_data_size) <= 0) { av_log(avctx, AV_LOG_ERROR, "One of the y/u/v offsets is invalid\n"); From 3769601fb6d80f974e1c800b6890391cdc0f6f06 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 19 Dec 2014 18:04:40 +0100 Subject: [PATCH 542/822] Add FFMPEG_VERSION into the binary libs This simplifies identifying from which revision a binary of a lib came from Signed-off-by: Michael Niedermayer (cherry picked from commit 649c158e8c94ac0cff7f03e97d6ea8bbf71b7f02) Conflicts: libavdevice/avdevice.c libswresample/swresample.c --- libavcodec/utils.c | 3 +++ libavdevice/avdevice.c | 3 +++ libavfilter/avfilter.c | 3 +++ libavformat/utils.c | 3 +++ libavutil/utils.c | 3 +++ libpostproc/postprocess.c | 3 +++ libswresample/swresample.c | 4 ++++ 7 files changed, 22 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 292d12b843..0872e32401 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -65,6 +65,9 @@ #include "compat/os2threads.h" #endif +#include "libavutil/ffversion.h" +const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS static int default_lockmgr_cb(void **arg, enum AVLockOp op) { diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index cc0597377c..0e70b94efe 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -20,6 +20,9 @@ #include "avdevice.h" #include "config.h" +#include "libavutil/ffversion.h" +const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + unsigned avdevice_version(void) { av_assert0(LIBAVDEVICE_VERSION_MICRO >= 100); diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 46f81f2d9e..582b28b483 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -37,6 +37,9 @@ #include "formats.h" #include "internal.h" +#include "libavutil/ffversion.h" +const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame); void ff_tlog_ref(void *ctx, AVFrame *ref, int end) diff --git a/libavformat/utils.c b/libavformat/utils.c index 80a909ae48..c3cccd7564 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -53,6 +53,9 @@ #include "riff.h" #include "url.h" +#include "libavutil/ffversion.h" +const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + /** * @file * various utility functions for use within FFmpeg diff --git a/libavutil/utils.c b/libavutil/utils.c index 4c82503d9c..10f535995f 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -27,6 +27,9 @@ * various utility functions */ +#include "libavutil/ffversion.h" +const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + unsigned avutil_version(void) { static int checks_done; diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 37206c5a48..f2757acc78 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -89,6 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks #include "postprocess_internal.h" #include "libavutil/avstring.h" +#include "libavutil/ffversion.h" +const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + unsigned postproc_version(void) { av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100); diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 6818f2b90e..ad05617506 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -146,6 +146,10 @@ static const AVClass av_class = { .category = AV_CLASS_CATEGORY_SWRESAMPLER, }; + +#include "libavutil/ffversion.h" +const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION; + unsigned swresample_version(void) { av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100); From 9789612689d71b9a5f3425596ecf8ead0058a9fd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 20 Dec 2014 04:09:01 +0100 Subject: [PATCH 543/822] Makefile: add dependencies which require ffversion.h Without this ffversion.h could sometimes be built too late Signed-off-by: Michael Niedermayer (cherry picked from commit 4ae87554f3c8bc54db572873f5049427a7e6cb31) Signed-off-by: Michael Niedermayer --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5437c0bea7..f6aa6dca4c 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ endef $(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=)))) -ffprobe.o cmdutils.o : libavutil/ffversion.h +ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF) $(CP) $< $@ From 86a01362c0e46d155fbfc1ef19f5ba17af3ee69d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 20 Jan 2015 03:39:09 +0100 Subject: [PATCH 544/822] Update for FFmpeg 2.2.12 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 0b6e43134b..98c938ec34 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.11 +2.2.12 diff --git a/doc/Doxyfile b/doc/Doxyfile index c8ef9233cd..4870ddce37 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.11 +PROJECT_NUMBER = 2.2.12 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f Mon Sep 17 00:00:00 2001 From: Xiaohan Wang Date: Thu, 6 Nov 2014 12:59:54 -0800 Subject: [PATCH 545/822] matroskadec: Fix read-after-free in matroska_read_seek() In matroska_read_seek(), |tracks| is assigned at the begining of the function. However, functions like matroska_parse_cues() could reallocate the tracks and invalidate |tracks|. This assigns |tracks| only before using it, so that it will not get invalidated elsewhere. Bug-Id: chromium/427266 --- libavformat/matroskadec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 8aae26c1c1..22902e0ef7 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2375,7 +2375,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { MatroskaDemuxContext *matroska = s->priv_data; - MatroskaTrack *tracks = matroska->tracks.elem; + MatroskaTrack *tracks = NULL; AVStream *st = s->streams[stream_index]; int i, index, index_sub, index_min; @@ -2404,6 +2404,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index, return 0; index_min = index; + tracks = matroska->tracks.elem; for (i=0; i < matroska->tracks.nb_elem; i++) { tracks[i].audio.pkt_cnt = 0; tracks[i].audio.sub_packet_cnt = 0; From d5b20daeb0e311caa62a899d41c8823c605d117a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 16 Feb 2015 17:23:34 +0100 Subject: [PATCH 546/822] avcodec/gif: fix off by one in column offsetting finding (cherry picked from commit f9240ec01abb097263fe578d2b6fb076bb7b9263) --- libavcodec/gif.c | 4 ++-- tests/ref/fate/gifenc-bgr8 | 10 +++++----- tests/ref/fate/gifenc-rgb8 | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libavcodec/gif.c b/libavcodec/gif.c index 27d054e512..def1b83e9d 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -105,7 +105,7 @@ static int gif_image_write_image(AVCodecContext *avctx, /* skip common columns */ while (x_start < x_end) { int same_column = 1; - for (y = y_start; y < y_end; y++) { + for (y = y_start; y <= y_end; y++) { if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) { same_column = 0; break; @@ -117,7 +117,7 @@ static int gif_image_write_image(AVCodecContext *avctx, } while (x_end > x_start) { int same_column = 1; - for (y = y_start; y < y_end; y++) { + for (y = y_start; y <= y_end; y++) { if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) { same_column = 0; break; diff --git a/tests/ref/fate/gifenc-bgr8 b/tests/ref/fate/gifenc-bgr8 index 49db7636ed..5b28b6a486 100644 --- a/tests/ref/fate/gifenc-bgr8 +++ b/tests/ref/fate/gifenc-bgr8 @@ -35,15 +35,15 @@ 0, 330, 330, 1, 4295, 0xf71b0b38, S=1, 1024, 0xf351799f 0, 340, 340, 1, 2044, 0x5adcb93b, S=1, 1024, 0xf351799f 0, 350, 350, 1, 3212, 0xcf79eeed, S=1, 1024, 0xf351799f -0, 360, 360, 1, 2281, 0x68464d30, S=1, 1024, 0xf351799f +0, 360, 360, 1, 2292, 0xb4386334, S=1, 1024, 0xf351799f 0, 370, 370, 1, 3633, 0x0010992f, S=1, 1024, 0xf351799f 0, 380, 380, 1, 3552, 0x23697490, S=1, 1024, 0xf351799f 0, 390, 390, 1, 3690, 0x62afdbb8, S=1, 1024, 0xf351799f -0, 400, 400, 1, 1558, 0x7a13e53b, S=1, 1024, 0xf351799f -0, 410, 410, 1, 940, 0xb1b6cba2, S=1, 1024, 0xf351799f +0, 400, 400, 1, 1559, 0x5baef54a, S=1, 1024, 0xf351799f +0, 410, 410, 1, 954, 0xca75ca79, S=1, 1024, 0xf351799f 0, 420, 420, 1, 273, 0x3687799b, S=1, 1024, 0xf351799f 0, 430, 430, 1, 930, 0x29f3b0c4, S=1, 1024, 0xf351799f -0, 440, 440, 1, 271, 0xe7af807c, S=1, 1024, 0xf351799f +0, 440, 440, 1, 271, 0x305e8094, S=1, 1024, 0xf351799f 0, 450, 450, 1, 196, 0xf5ab51ee, S=1, 1024, 0xf351799f 0, 460, 460, 1, 4299, 0x67ec0d55, S=1, 1024, 0xf351799f 0, 470, 470, 1, 4895, 0xb394406c, S=1, 1024, 0xf351799f @@ -56,7 +56,7 @@ 0, 540, 540, 1, 5179, 0x860fc6a1, S=1, 1024, 0xf351799f 0, 550, 550, 1, 5046, 0xce9183d3, S=1, 1024, 0xf351799f 0, 560, 560, 1, 5140, 0xa6d7b9af, S=1, 1024, 0xf351799f -0, 570, 570, 1, 4289, 0xb415f717, S=1, 1024, 0xf351799f +0, 570, 570, 1, 4301, 0x03b6ef3f, S=1, 1024, 0xf351799f 0, 580, 580, 1, 5079, 0xa8d59e01, S=1, 1024, 0xf351799f 0, 590, 590, 1, 5284, 0xea34e3b3, S=1, 1024, 0xf351799f 0, 600, 600, 1, 5426, 0x556a15cd, S=1, 1024, 0xf351799f diff --git a/tests/ref/fate/gifenc-rgb8 b/tests/ref/fate/gifenc-rgb8 index 226b26ee1b..6bcdf64619 100644 --- a/tests/ref/fate/gifenc-rgb8 +++ b/tests/ref/fate/gifenc-rgb8 @@ -35,15 +35,15 @@ 0, 330, 330, 1, 4295, 0xc1850a80, S=1, 1024, 0xcfc8799f 0, 340, 340, 1, 2044, 0x0440c072, S=1, 1024, 0xcfc8799f 0, 350, 350, 1, 3212, 0xe91af08f, S=1, 1024, 0xcfc8799f -0, 360, 360, 1, 2281, 0x6a414aa1, S=1, 1024, 0xcfc8799f +0, 360, 360, 1, 2292, 0x6765633e, S=1, 1024, 0xcfc8799f 0, 370, 370, 1, 3633, 0xac779aa3, S=1, 1024, 0xcfc8799f 0, 380, 380, 1, 3552, 0xed2c75b2, S=1, 1024, 0xcfc8799f 0, 390, 390, 1, 3690, 0x2020dd0d, S=1, 1024, 0xcfc8799f -0, 400, 400, 1, 1558, 0x2c14e4b2, S=1, 1024, 0xcfc8799f -0, 410, 410, 1, 940, 0x4927cd90, S=1, 1024, 0xcfc8799f +0, 400, 400, 1, 1559, 0x596ef330, S=1, 1024, 0xcfc8799f +0, 410, 410, 1, 954, 0xac12c9c5, S=1, 1024, 0xcfc8799f 0, 420, 420, 1, 273, 0x138c7831, S=1, 1024, 0xcfc8799f 0, 430, 430, 1, 930, 0xf1c3ae3f, S=1, 1024, 0xcfc8799f -0, 440, 440, 1, 271, 0x6d338044, S=1, 1024, 0xcfc8799f +0, 440, 440, 1, 271, 0x921a80af, S=1, 1024, 0xcfc8799f 0, 450, 450, 1, 196, 0xa5de5322, S=1, 1024, 0xcfc8799f 0, 460, 460, 1, 4299, 0x5bac0d86, S=1, 1024, 0xcfc8799f 0, 470, 470, 1, 4895, 0xc43639a6, S=1, 1024, 0xcfc8799f @@ -56,7 +56,7 @@ 0, 540, 540, 1, 5179, 0x97aac3a1, S=1, 1024, 0xcfc8799f 0, 550, 550, 1, 5046, 0x836a80cd, S=1, 1024, 0xcfc8799f 0, 560, 560, 1, 5140, 0xa725c1e7, S=1, 1024, 0xcfc8799f -0, 570, 570, 1, 4289, 0x7b3afbc0, S=1, 1024, 0xcfc8799f +0, 570, 570, 1, 4301, 0x0203f239, S=1, 1024, 0xcfc8799f 0, 580, 580, 1, 5079, 0xb2e7a2de, S=1, 1024, 0xcfc8799f 0, 590, 590, 1, 5284, 0xb757dfe1, S=1, 1024, 0xcfc8799f 0, 600, 600, 1, 5426, 0xf9f11e57, S=1, 1024, 0xcfc8799f From 56976346d9897b7f43d08f2d57a629f07d98ccea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:19:25 +0100 Subject: [PATCH 547/822] avformat/utils: Fix number suffixes in tb_unreliable() Signed-off-by: Michael Niedermayer (cherry picked from commit 4b15bba2aec93776bfdc69a1bca42a4795a7d191) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index c3cccd7564..b56a40f664 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2847,8 +2847,8 @@ static int get_std_framerate(int i) * And there are "variable" fps files this needs to detect as well. */ static int tb_unreliable(AVCodecContext *c) { - if (c->time_base.den >= 101L * c->time_base.num || - c->time_base.den < 5L * c->time_base.num || + if (c->time_base.den >= 101LL * c->time_base.num || + c->time_base.den < 5LL * c->time_base.num || // c->codec_tag == AV_RL32("DIVX") || // c->codec_tag == AV_RL32("XVID") || c->codec_tag == AV_RL32("mp4v") || From e61a7c9b451749dea5cb76dac1907af7bd006757 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:27:00 +0100 Subject: [PATCH 548/822] swresample/dither: Cleanup number suffixes The <<31 case needs LL Signed-off-by: Michael Niedermayer (cherry picked from commit c77cc2c1766666cdb5f14daee0f75e397bf7a194) Signed-off-by: Michael Niedermayer --- libswresample/dither.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswresample/dither.c b/libswresample/dither.c index b8b592a7ce..8121f11c2f 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -84,14 +84,14 @@ int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFo in_fmt = av_get_packed_sample_fmt( in_fmt); if(in_fmt == AV_SAMPLE_FMT_FLT || in_fmt == AV_SAMPLE_FMT_DBL){ - if(out_fmt == AV_SAMPLE_FMT_S32) scale = 1.0/(1L<<31); - if(out_fmt == AV_SAMPLE_FMT_S16) scale = 1.0/(1L<<15); - if(out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1.0/(1L<< 7); + if(out_fmt == AV_SAMPLE_FMT_S32) scale = 1.0/(1LL<<31); + if(out_fmt == AV_SAMPLE_FMT_S16) scale = 1.0/(1LL<<15); + if(out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1.0/(1LL<< 7); } if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S32 && (s->dither.output_sample_bits&31)) scale = 1; - if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S16) scale = 1L<<16; - if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1L<<24; - if(in_fmt == AV_SAMPLE_FMT_S16 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1L<<8; + if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S16) scale = 1<<16; + if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1<<24; + if(in_fmt == AV_SAMPLE_FMT_S16 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1<<8; scale *= s->dither.scale; From 56e07e4caf4842a3b20902dae7598cb47b0d0f16 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:29:20 +0100 Subject: [PATCH 549/822] avcodec/dxtory: Use LL instead of L number suffix This is probably unneeded and normal int would be fine, but its safer to use LL and this isnt speed relevant Signed-off-by: Michael Niedermayer (cherry picked from commit b4ad2853c50d055e9ba8c29f2e1c83b292f29d7a) Signed-off-by: Michael Niedermayer --- libavcodec/dxtory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c index afadcbb683..fc12ea96c8 100644 --- a/libavcodec/dxtory.c +++ b/libavcodec/dxtory.c @@ -63,7 +63,7 @@ static int dxtory_decode_v1_410(AVCodecContext *avctx, AVFrame *pic, uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V; int ret; - if (src_size < avctx->width * avctx->height * 9L / 8) { + if (src_size < avctx->width * avctx->height * 9LL / 8) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; } @@ -106,7 +106,7 @@ static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic, uint8_t *Y1, *Y2, *U, *V; int ret; - if (src_size < avctx->width * avctx->height * 3L / 2) { + if (src_size < avctx->width * avctx->height * 3LL / 2) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; } @@ -143,7 +143,7 @@ static int dxtory_decode_v1_444(AVCodecContext *avctx, AVFrame *pic, uint8_t *Y, *U, *V; int ret; - if (src_size < avctx->width * avctx->height * 3L) { + if (src_size < avctx->width * avctx->height * 3LL) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; } From d0ed336d8a4ab4d1db8f3f33f1a23eb640b5c2c7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:34:52 +0100 Subject: [PATCH 550/822] avformat/matroskadec: Fix number suffixes Signed-off-by: Michael Niedermayer (cherry picked from commit fc3cdb00d084222a107e61e7168903bf3d3d0b47) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index f0e2acb956..060e1a486e 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1907,8 +1907,8 @@ static int matroska_read_header(AVFormatContext *s) av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, 1000000000, track->default_duration, 30000); #if FF_API_R_FRAME_RATE - if ( st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L - && st->avg_frame_rate.num > st->avg_frame_rate.den * 5L) + if ( st->avg_frame_rate.num < st->avg_frame_rate.den * 1000LL + && st->avg_frame_rate.num > st->avg_frame_rate.den * 5LL) st->r_frame_rate = st->avg_frame_rate; #endif } From ab17d11310a926b78de3a24883a479fbed6cd862 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:36:13 +0100 Subject: [PATCH 551/822] avformat/smacker: Fix number suffix Signed-off-by: Michael Niedermayer (cherry picked from commit 465f3705b1ef832fd6904750d018f81f9044f3ab) Signed-off-by: Michael Niedermayer --- libavformat/smacker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 0d38588e21..6d5c074fa3 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -317,7 +317,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) int err; size = avio_rl32(s->pb) - 4; - if (!size || size + 4L > frame_size) { + if (!size || size + 4LL > frame_size) { av_log(s, AV_LOG_ERROR, "Invalid audio part size\n"); return AVERROR_INVALIDDATA; } From cd5c78c804d12a1bd29917d6149d715d2273a9a2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:36:36 +0100 Subject: [PATCH 552/822] avformat/omadec: fix number suffix Signed-off-by: Michael Niedermayer (cherry picked from commit f1f7f5903ab49b84789af5341492afbaba808a70) Signed-off-by: Michael Niedermayer --- libavformat/omadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 7542eb1fd4..3ea2ec1468 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -172,7 +172,7 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size, taglen = AV_RB32(&enc_header[pos + 32]); datalen = AV_RB32(&enc_header[pos + 36]) >> 4; - pos += 44L + taglen; + pos += 44LL + taglen; if (pos + (((uint64_t)datalen) << 4) > size) return -1; From 004cdd8b1538fd1404fcf0854c527274a8ac23f4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:39:22 +0100 Subject: [PATCH 553/822] avcodec/h264_cabac: use int instead of long for mbb_xy The mb address fits in int Signed-off-by: Michael Niedermayer (cherry picked from commit 592ba6ec106206f97133c9345313010c76361e12) Signed-off-by: Michael Niedermayer --- libavcodec/h264_cabac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 83aac22bbf..fd88fb3c0a 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1280,7 +1280,7 @@ void ff_h264_init_cabac_states(H264Context *h) { } static int decode_cabac_field_decoding_flag(H264Context *h) { - const long mbb_xy = h->mb_xy - 2L*h->mb_stride; + const int mbb_xy = h->mb_xy - 2*h->mb_stride; unsigned long ctx = 0; From 4f2299b6b55f1eb71347573614238f961fc00cb3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Feb 2015 19:40:13 +0100 Subject: [PATCH 554/822] avcodec/mpegvideo_enc: Fix number suffixes in rc_buffer_size calculation Signed-off-by: Michael Niedermayer (cherry picked from commit 4531e2c489d279bfc90d54ca26ed898c5b265a7f) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo_enc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index eaa80e2a1d..aff2b0e73d 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -348,18 +348,18 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) switch(avctx->codec_id) { case AV_CODEC_ID_MPEG1VIDEO: case AV_CODEC_ID_MPEG2VIDEO: - avctx->rc_buffer_size = FFMAX(avctx->rc_max_rate, 15000000) * 112L / 15000000 * 16384; + avctx->rc_buffer_size = FFMAX(avctx->rc_max_rate, 15000000) * 112LL / 15000000 * 16384; break; case AV_CODEC_ID_MPEG4: case AV_CODEC_ID_MSMPEG4V1: case AV_CODEC_ID_MSMPEG4V2: case AV_CODEC_ID_MSMPEG4V3: if (avctx->rc_max_rate >= 15000000) { - avctx->rc_buffer_size = 320 + (avctx->rc_max_rate - 15000000L) * (760-320) / (38400000 - 15000000); + avctx->rc_buffer_size = 320 + (avctx->rc_max_rate - 15000000LL) * (760-320) / (38400000 - 15000000); } else if(avctx->rc_max_rate >= 2000000) { - avctx->rc_buffer_size = 80 + (avctx->rc_max_rate - 2000000L) * (320- 80) / (15000000 - 2000000); + avctx->rc_buffer_size = 80 + (avctx->rc_max_rate - 2000000LL) * (320- 80) / (15000000 - 2000000); } else if(avctx->rc_max_rate >= 384000) { - avctx->rc_buffer_size = 40 + (avctx->rc_max_rate - 384000L) * ( 80- 40) / ( 2000000 - 384000); + avctx->rc_buffer_size = 40 + (avctx->rc_max_rate - 384000LL) * ( 80- 40) / ( 2000000 - 384000); } else avctx->rc_buffer_size = 40; avctx->rc_buffer_size *= 16384; From c7dc73a6c3339c525d62498964a707936ff838fc Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Feb 2015 14:41:10 +0100 Subject: [PATCH 555/822] avformat/tta: fix crash with corrupted files av_add_index_entry() can fail, for example because the parameters are invalid, or because memory allocation fails. Check this; it can actually happen with corrupted files. The second hunk is just for robustness. Just in case functions like ff_reduce_index() remove entries. (Not sure if this can actually happen.) Fixes ticket #4294. Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 6a0cd529a35190d9374b0b26504e71857cd67b83) Signed-off-by: Michael Niedermayer --- libavformat/tta.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/tta.c b/libavformat/tta.c index 7174fd5438..d3b3fb0471 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -118,8 +118,10 @@ static int tta_read_header(AVFormatContext *s) ffio_init_checksum(s->pb, tta_check_crc, UINT32_MAX); for (i = 0; i < c->totalframes; i++) { uint32_t size = avio_rl32(s->pb); - av_add_index_entry(st, framepos, i * c->frame_size, size, 0, - AVINDEX_KEYFRAME); + int r; + if ((r = av_add_index_entry(st, framepos, i * c->frame_size, size, 0, + AVINDEX_KEYFRAME)) < 0) + return r; framepos += size; } crc = ffio_get_checksum(s->pb) ^ UINT32_MAX; @@ -153,6 +155,11 @@ static int tta_read_packet(AVFormatContext *s, AVPacket *pkt) if (c->currentframe >= c->totalframes) return AVERROR_EOF; + if (st->nb_index_entries < c->totalframes) { + av_log(s, AV_LOG_ERROR, "Index entry disappeared\n"); + return AVERROR_INVALIDDATA; + } + size = st->index_entries[c->currentframe].size; ret = av_get_packet(s->pb, pkt, size); From 3d8c51d699165b63f54af309686e27d311a16a59 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Feb 2015 19:04:12 +0100 Subject: [PATCH 556/822] avformat/mpc8: fix hang with fuzzed file This can lead to an endless loop by seeking back a few bytes after each attempted chunk read. Assuming negative sizes are always invalid, this is easy to fix. Other code in this demuxer treats negative sizes as invalid as well. Fixes ticket #4262. Signed-off-by: Michael Niedermayer (cherry picked from commit 56cc024220886927350cfc26ee695062ca7ecaf4) Signed-off-by: Michael Niedermayer --- libavformat/mpc8.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index b32bc9c354..4ddee6adc1 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -223,6 +223,10 @@ static int mpc8_read_header(AVFormatContext *s) while(!url_feof(pb)){ pos = avio_tell(pb); mpc8_get_chunk_header(pb, &tag, &size); + if (size < 0) { + av_log(s, AV_LOG_ERROR, "Invalid chunk length\n"); + return AVERROR_INVALIDDATA; + } if(tag == TAG_STREAMHDR) break; mpc8_handle_chunk(s, tag, pos, size); From 79d86b844f084b884363396da4ebb561e7c42a73 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Feb 2015 19:04:11 +0100 Subject: [PATCH 557/822] avformat/mpc8: fix broken pointer math MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This could overflow and crash at least on 32 bit systems. Reviewed-by: Reimar Döffinger Signed-off-by: Michael Niedermayer (cherry picked from commit b737a2c52857b214be246ff615c6293730033cfa) Signed-off-by: Michael Niedermayer --- libavformat/mpc8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index 4ddee6adc1..589c2f79ae 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -91,7 +91,7 @@ static int mpc8_probe(AVProbeData *p) size = bs_get_v(&bs); if (size < 2) return 0; - if (bs + size - 2 >= bs_end) + if (size >= bs_end - bs + 2) return AVPROBE_SCORE_EXTENSION - 1; // seems to be valid MPC but no header yet if (header_found) { if (size < 11 || size > 28) From b902eab45a79fa656abdbde4501c1c02adaf140a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Feb 2015 14:47:41 +0100 Subject: [PATCH 558/822] avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior Signed-off-by: Michael Niedermayer (cherry picked from commit 05e161952954acf247e0fd1fdef00559675c4d4d) Signed-off-by: Michael Niedermayer --- libavformat/mpc8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index 589c2f79ae..1d78933a30 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -57,7 +57,7 @@ typedef struct { static inline int64_t bs_get_v(const uint8_t **bs) { - int64_t v = 0; + uint64_t v = 0; int br = 0; int c; @@ -108,7 +108,7 @@ static int mpc8_probe(AVProbeData *p) static inline int64_t gb_get_v(GetBitContext *gb) { - int64_t v = 0; + uint64_t v = 0; int bits = 0; while(get_bits1(gb) && bits < 64-7){ v <<= 7; From b0d3873085253f9e60afe256c3b0368c3ab7dd07 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Feb 2015 20:13:18 +0100 Subject: [PATCH 559/822] avcodec/mjpegdec: Check escape sequence validity Fixes assertion failure Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit afa92907f3c6a0c3bdad766ec8d938ee17ee1c9e) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index a867d06376..8289cc5d7c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1835,6 +1835,10 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, put_bits(&pb, 8, x); if (x == 0xFF) { x = src[b++]; + if (x & 0x80) { + av_log(s->avctx, AV_LOG_WARNING, "Invalid escape sequence\n"); + x &= 0x7f; + } put_bits(&pb, 7, x); bit_count--; } From 4c246c65bfa221c45452923cf148f7b11245b6d5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Feb 2015 20:48:30 +0100 Subject: [PATCH 560/822] avcodec/mjpegdec: Check number of components for JPEG-LS Fixes out of array accesses Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit fabbfaa095660982cc0bc63242c459561fa37037) Conflicts: libavcodec/mjpegdec.c --- libavcodec/mjpegdec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 8289cc5d7c..bd12c7bb9b 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -495,9 +495,12 @@ unk_pixfmt: } if (s->ls) { s->upscale_h = s->upscale_v = 0; - if (s->nb_components > 1) + if (s->nb_components == 3) { s->avctx->pix_fmt = AV_PIX_FMT_RGB24; - else if (s->bits <= 8) + } else if (s->nb_components != 1) { + av_log(s->avctx, AV_LOG_ERROR, "Unsupported number of components %d\n", s->nb_components); + return AVERROR_PATCHWELCOME; + } else if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; else s->avctx->pix_fmt = AV_PIX_FMT_GRAY16; From bd9c755b22ff84a5d08dd065cdfd3faeceea690a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Feb 2015 00:12:08 +0100 Subject: [PATCH 561/822] swscale/utils: Limit filter shifting so as not to read from prior the array Fixes out of array read Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 692b22626ec9a9585f667c124a186b1a9796e432) Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index fb4576a626..9db6af6e4f 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -618,14 +618,15 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, } if ((*filterPos)[i] + filterSize > srcW) { - int shift = (*filterPos)[i] + filterSize - srcW; + int shift = (*filterPos)[i] + FFMIN(filterSize - srcW, 0); + // move filter coefficients right to compensate for filterPos for (j = filterSize - 2; j >= 0; j--) { int right = FFMIN(j + shift, filterSize - 1); filter[i * filterSize + right] += filter[i * filterSize + j]; filter[i * filterSize + j] = 0; } - (*filterPos)[i]= srcW - filterSize; + (*filterPos)[i]-= shift; } } From 7c3a3d47cf7f5d45a7f794b9509a907161d27f64 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Feb 2015 03:45:21 +0100 Subject: [PATCH 562/822] avformat/thp: Check av_get_packet() for failure not only for partial output Fixes null pointer dereference Fixes: signal_sigsegv_db2c1f_3108_cov_163322880_pikmin2_opening1_partial.thp Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit f2579dbb4b31e6ae731e7f5555680528ef3020ab) Signed-off-by: Michael Niedermayer --- libavformat/thp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/thp.c b/libavformat/thp.c index bc4f0dafe5..0d7a38b074 100644 --- a/libavformat/thp.c +++ b/libavformat/thp.c @@ -184,6 +184,8 @@ static int thp_read_packet(AVFormatContext *s, pkt->stream_index = thp->video_stream_index; } else { ret = av_get_packet(pb, pkt, thp->audiosize); + if (ret < 0) + return ret; if (ret != thp->audiosize) { av_free_packet(pkt); return AVERROR(EIO); From eca1e3dcc8473bc6b51e91d2a80c8bc13fbaa5b3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Feb 2015 04:11:56 +0100 Subject: [PATCH 563/822] avcodec/h264_ps: More completely check the bit depths Fixes out of array read Fixes: asan_static-oob_30328b6_719_cov_3325483287_H264_artifacts_motion.h264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 69aa79365c1e8e1cb597d33e77bf1062c2ef47d4) Signed-off-by: Michael Niedermayer --- libavcodec/h264_ps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 603f1681e3..81ace9f52d 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -383,7 +383,8 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) "Different chroma and luma bit depth"); goto fail; } - if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U) { + if (sps->bit_depth_luma < 8 || sps->bit_depth_luma > 14 || + sps->bit_depth_chroma < 8 || sps->bit_depth_chroma > 14) { av_log(h->avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n", sps->bit_depth_luma, sps->bit_depth_chroma); goto fail; From a3dca10470ec4a219974ceb53f2f9a40b87f9267 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Feb 2015 15:01:17 +0100 Subject: [PATCH 564/822] avcodec/h264: Be more strict on rejecting pps_id changes Fixes race condition Signed-off-by: Michael Niedermayer (cherry picked from commit 31cc9c04ca386dce289864021982da62190982ab) Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 885de45687..c1fa344db7 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4945,8 +4945,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, continue; again: - if ( !(avctx->active_thread_type & FF_THREAD_FRAME) - || nals_needed >= nal_index) + if ( (!(avctx->active_thread_type & FF_THREAD_FRAME) || nals_needed >= nal_index) + && !h->current_slice) h->au_pps_id = -1; /* Ignore per frame NAL unit type during extradata * parsing. Decoding slices is not possible in codec init From 0c9d465e98c72a527ff5c6a2f78d537c03810112 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Feb 2015 15:09:54 +0100 Subject: [PATCH 565/822] avcodec/h264: Be more strict on rejecting pps/sps changes Fixes race condition Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 6fafc62b0bd0e206deb77a7aabbf3a370ad80789) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c1fa344db7..08010c70e3 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3506,6 +3506,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0) int must_reinit; int needs_reinit = 0; int field_pic_flag, bottom_field_flag; + int first_slice = h == h0 && !h0->current_slice; + PPS *pps; h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab; h->me.qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab; @@ -3570,18 +3572,27 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h0->au_pps_id, pps_id); return AVERROR_INVALIDDATA; } - h->pps = *h0->pps_buffers[pps_id]; - if (!h0->sps_buffers[h->pps.sps_id]) { + pps = h0->pps_buffers[pps_id]; + + if (!h0->sps_buffers[pps->sps_id]) { av_log(h->avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id); return AVERROR_INVALIDDATA; } + if (first_slice) + h->pps = *h0->pps_buffers[pps_id]; - if (h->pps.sps_id != h->sps.sps_id || - h->pps.sps_id != h->current_sps_id || - h0->sps_buffers[h->pps.sps_id]->new) { + if (pps->sps_id != h->sps.sps_id || + pps->sps_id != h->current_sps_id || + h0->sps_buffers[pps->sps_id]->new) { + + if (!first_slice) { + av_log(h->avctx, AV_LOG_ERROR, + "SPS changed in the middle of the frame\n"); + return AVERROR_INVALIDDATA; + } h->sps = *h0->sps_buffers[h->pps.sps_id]; From 68d83bc3a69232e630f28fed6d3d6a03f888d7c9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Feb 2015 22:14:15 +0100 Subject: [PATCH 566/822] avutil/opt: Fix types used to access AV_OPT_TYPE_PIXEL_FMT Signed-off-by: Michael Niedermayer (cherry picked from commit a0640e63463e6428b80422c89e1bfc96147ecfc6) Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 8c58237d5a..781a8c2c89 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -75,7 +75,7 @@ static int read_number(const AVOption *o, void *dst, double *num, int *den, int6 { switch (o->type) { case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0; - case AV_OPT_TYPE_PIXEL_FMT: + case AV_OPT_TYPE_PIXEL_FMT: *intnum = *(enum AVPixelFormat *)dst;return 0; case AV_OPT_TYPE_SAMPLE_FMT: case AV_OPT_TYPE_INT: *intnum = *(int *)dst;return 0; case AV_OPT_TYPE_CHANNEL_LAYOUT: @@ -110,8 +110,8 @@ static int write_number(void *obj, const AVOption *o, void *dst, double num, int } switch (o->type) { + case AV_OPT_TYPE_PIXEL_FMT: *(enum AVPixelFormat *)dst = llrint(num/den) * intnum; break; case AV_OPT_TYPE_FLAGS: - case AV_OPT_TYPE_PIXEL_FMT: case AV_OPT_TYPE_SAMPLE_FMT: case AV_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break; case AV_OPT_TYPE_DURATION: From 8323f09442830f62f9dc5f5d2f56a6a55d86b897 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 6 Feb 2015 22:16:08 +0100 Subject: [PATCH 567/822] avutil/opt: Fix type used to access AV_OPT_TYPE_SAMPLE_FMT Signed-off-by: Michael Niedermayer (cherry picked from commit 1750b45cdf7498d0a05bea29cafcb26aa576d595) Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 781a8c2c89..1fbe457b58 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -76,7 +76,7 @@ static int read_number(const AVOption *o, void *dst, double *num, int *den, int6 switch (o->type) { case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0; case AV_OPT_TYPE_PIXEL_FMT: *intnum = *(enum AVPixelFormat *)dst;return 0; - case AV_OPT_TYPE_SAMPLE_FMT: + case AV_OPT_TYPE_SAMPLE_FMT:*intnum = *(enum AVSampleFormat*)dst;return 0; case AV_OPT_TYPE_INT: *intnum = *(int *)dst;return 0; case AV_OPT_TYPE_CHANNEL_LAYOUT: case AV_OPT_TYPE_DURATION: @@ -111,8 +111,8 @@ static int write_number(void *obj, const AVOption *o, void *dst, double num, int switch (o->type) { case AV_OPT_TYPE_PIXEL_FMT: *(enum AVPixelFormat *)dst = llrint(num/den) * intnum; break; + case AV_OPT_TYPE_SAMPLE_FMT:*(enum AVSampleFormat*)dst = llrint(num/den) * intnum; break; case AV_OPT_TYPE_FLAGS: - case AV_OPT_TYPE_SAMPLE_FMT: case AV_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break; case AV_OPT_TYPE_DURATION: case AV_OPT_TYPE_CHANNEL_LAYOUT: From e6093f5b85b3b938576d284a54833ecc0b7ebe96 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Feb 2015 02:06:20 +0100 Subject: [PATCH 568/822] avcodec/h264_slice: Do not change frame_num after the first slice Fixes potential race condition Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit f906982c9411f3062e3ce68013309b37c213c4dd) Signed-off-by: Michael Niedermayer Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 08010c70e3..230f90795a 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3507,6 +3507,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) int needs_reinit = 0; int field_pic_flag, bottom_field_flag; int first_slice = h == h0 && !h0->current_slice; + int frame_num; PPS *pps; h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab; @@ -3710,7 +3711,15 @@ static int decode_slice_header(H264Context *h, H264Context *h0) init_dequant_tables(h); } - h->frame_num = get_bits(&h->gb, h->sps.log2_max_frame_num); + frame_num = get_bits(&h->gb, h->sps.log2_max_frame_num); + if (!first_slice) { + if (h0->frame_num != frame_num) { + av_log(h->avctx, AV_LOG_ERROR, "Frame num change from %d to %d\n", + h0->frame_num, frame_num); + return AVERROR_INVALIDDATA; + } + } + h->frame_num = frame_num; h->mb_mbaff = 0; h->mb_aff_frame = 0; From 0afe061f2877d35482faf9079a3c74000791b998 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Feb 2015 02:22:44 +0100 Subject: [PATCH 569/822] avcodec/h264_slice: Check picture structure before setting the related fields This might fix a hypothetical race condition Signed-off-by: Michael Niedermayer (cherry picked from commit f111831ed61103f9fa8fdda41473a23da016bdaa) Signed-off-by: Michael Niedermayer Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 230f90795a..91aeaf1b76 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3507,7 +3507,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) int needs_reinit = 0; int field_pic_flag, bottom_field_flag; int first_slice = h == h0 && !h0->current_slice; - int frame_num; + int frame_num, picture_structure, droppable; PPS *pps; h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab; @@ -3719,39 +3719,35 @@ static int decode_slice_header(H264Context *h, H264Context *h0) return AVERROR_INVALIDDATA; } } - h->frame_num = frame_num; h->mb_mbaff = 0; h->mb_aff_frame = 0; last_pic_structure = h0->picture_structure; last_pic_droppable = h0->droppable; - h->droppable = h->nal_ref_idc == 0; + droppable = h->nal_ref_idc == 0; if (h->sps.frame_mbs_only_flag) { - h->picture_structure = PICT_FRAME; + picture_structure = PICT_FRAME; } else { if (!h->sps.direct_8x8_inference_flag && slice_type == AV_PICTURE_TYPE_B) { av_log(h->avctx, AV_LOG_ERROR, "This stream was generated by a broken encoder, invalid 8x8 inference\n"); return -1; } field_pic_flag = get_bits1(&h->gb); + if (field_pic_flag) { bottom_field_flag = get_bits1(&h->gb); - h->picture_structure = PICT_TOP_FIELD + bottom_field_flag; + picture_structure = PICT_TOP_FIELD + bottom_field_flag; } else { - h->picture_structure = PICT_FRAME; + picture_structure = PICT_FRAME; h->mb_aff_frame = h->sps.mb_aff; } } - h->mb_field_decoding_flag = h->picture_structure != PICT_FRAME; - - if (h0->current_slice != 0) { - if (last_pic_structure != h->picture_structure || - last_pic_droppable != h->droppable) { + if (h0->current_slice) { + if (last_pic_structure != picture_structure || + last_pic_droppable != droppable) { av_log(h->avctx, AV_LOG_ERROR, "Changing field mode (%d -> %d) between slices is not allowed\n", last_pic_structure, h->picture_structure); - h->picture_structure = last_pic_structure; - h->droppable = last_pic_droppable; return AVERROR_INVALIDDATA; } else if (!h0->cur_pic_ptr) { av_log(h->avctx, AV_LOG_ERROR, @@ -3759,7 +3755,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h0->current_slice + 1); return AVERROR_INVALIDDATA; } - } else { + } + + h->picture_structure = picture_structure; + h->droppable = droppable; + h->frame_num = frame_num; + h->mb_field_decoding_flag = picture_structure != PICT_FRAME; + + if (h0->current_slice == 0) { /* Shorten frame num gaps so we don't have to allocate reference * frames just to throw them away */ if (h->frame_num != h->prev_frame_num) { From f0526bc21eb4f75ab39f59d4de3f9a5690640ca8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Feb 2015 03:34:48 +0100 Subject: [PATCH 570/822] avcodec/h264_slice: ignore SAR changes in slices after the first Fixes race condition and null pointer dereference Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 38d5241b7f36c1571a88517a0650caade16dd5f4) Signed-off-by: Michael Niedermayer Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 91aeaf1b76..ab86fac06d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3623,13 +3623,15 @@ static int decode_slice_header(H264Context *h, H264Context *h0) || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != h->avctx->coded_height || h->avctx->bits_per_raw_sample != h->sps.bit_depth_luma || h->cur_chroma_format_idc != h->sps.chroma_format_idc - || av_cmp_q(h->sps.sar, h->avctx->sample_aspect_ratio) || h->mb_width != h->sps.mb_width || h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) )); if (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0))) must_reinit = 1; + if (first_slice && av_cmp_q(h->sps.sar, h->avctx->sample_aspect_ratio)) + must_reinit = 1; + h->mb_width = h->sps.mb_width; h->mb_height = h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag); h->mb_num = h->mb_width * h->mb_height; From b1b69baa0110ab28dcd7f5646d4a8eddc3038ce9 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 31 Jan 2015 10:01:37 +0100 Subject: [PATCH 571/822] lavc/aarch64: Do not use the neon horizontal chroma loop filter for H.264 4:2:2. (cherry picked from commit 4faea46bd906b3897018736208123aa36c3f45d5) Signed-off-by: Michael Niedermayer --- libavcodec/aarch64/h264dsp_init_aarch64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c index ed5e4bdd9b..e0f378f5ab 100644 --- a/libavcodec/aarch64/h264dsp_init_aarch64.c +++ b/libavcodec/aarch64/h264dsp_init_aarch64.c @@ -78,6 +78,7 @@ av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth, c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon; c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon; c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon; + if (chroma_format_idc <= 1) c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon; c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon; From 0ee5f46fd1d1d25c0a98d8da8dd338a90db4a603 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 11 Feb 2015 03:33:53 +0100 Subject: [PATCH 572/822] avcodec/mjpegdec: Skip blocks which are outside the visible area Fixes out of array accesses Fixes: ffmpeg_mjpeg_crash.avi Found-by: Thomas Lindroth Signed-off-by: Michael Niedermayer (cherry picked from commit 08509c8f86626815a3e9e68d600d1aacbb8df4bf) Conflicts: libavcodec/mjpegdec.c --- libavcodec/mjpegdec.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index bd12c7bb9b..64c6fce669 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1183,13 +1183,18 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, if (s->interlaced && s->bottom_field) block_offset += linesize[c] >> 1; - ptr = data[c] + block_offset; + if ( 8*(h * mb_x + x) < s->width + && 8*(v * mb_y + y) < s->height) { + ptr = data[c] + block_offset; + } else + ptr = NULL; if (!s->progressive) { - if (copy_mb) - mjpeg_copy_block(s, ptr, reference_data[c] + block_offset, - linesize[c], s->avctx->lowres); + if (copy_mb) { + if (ptr) + mjpeg_copy_block(s, ptr, reference_data[c] + block_offset, + linesize[c], s->avctx->lowres); - else { + } else { s->dsp.clear_block(s->block); if (decode_block(s, s->block, i, s->dc_index[i], s->ac_index[i], @@ -1198,9 +1203,11 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, "error y=%d x=%d\n", mb_y, mb_x); return AVERROR_INVALIDDATA; } - s->dsp.idct_put(ptr, linesize[c], s->block); - if (s->bits & 7) - shift_output(s, ptr, linesize[c]); + if (ptr) { + s->dsp.idct_put(ptr, linesize[c], s->block); + if (s->bits & 7) + shift_output(s, ptr, linesize[c]); + } } } else { int block_idx = s->block_stride[c] * (v * mb_y + y) + From 2dca276dcb9ce6af4eb8a7d23fc234e944f015d8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 12 Feb 2015 16:35:29 +0100 Subject: [PATCH 573/822] avcodec/arm/videodsp_armv5te: Fix linking failure with "g++ -shared -D__STDC_CONSTANT_MACROS -o test.so ... libavcodec.a" Tested-by: Andreas Haupt Signed-off-by: Michael Niedermayer (cherry picked from commit cab6302534962331753fb69c674df86a458b098d) Signed-off-by: Michael Niedermayer --- libavcodec/arm/videodsp_armv5te.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/arm/videodsp_armv5te.S b/libavcodec/arm/videodsp_armv5te.S index 4bd365a332..24bdc3ee15 100644 --- a/libavcodec/arm/videodsp_armv5te.S +++ b/libavcodec/arm/videodsp_armv5te.S @@ -23,9 +23,10 @@ #include "libavutil/arm/asm.S" function ff_prefetch_arm, export=1 +1: subs r2, r2, #1 pld [r0] add r0, r0, r1 - bne X(ff_prefetch_arm) + bne 1b bx lr endfunc From 36cfee3adc70c6a78a07df4bb16349c4b0893ef4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 17 Feb 2015 19:50:54 +0100 Subject: [PATCH 574/822] Update for 2.2.13 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 98c938ec34..f2b42fc715 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.12 +2.2.13 diff --git a/doc/Doxyfile b/doc/Doxyfile index 4870ddce37..b25ee35231 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.12 +PROJECT_NUMBER = 2.2.13 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 03fbb6ff3d28f639ea5a35aba3c6dca09c17225d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 12 Feb 2015 12:26:58 +0100 Subject: [PATCH 575/822] h264: only ref cur_pic in update_thread_context if it is initialized It may be empty if the previous thread's decode call did not contain a valid frame. (cherry picked from commit 0dea4c77ccf5956561bb8991311b3d834bb5fa40) Signed-off-by: Anton Khirnov (cherry picked from commit 1dbfaa34e615606cb3f1a3ecabb117e354459edc) Signed-off-by: Anton Khirnov Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 7e62881740..3c07477d39 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1776,8 +1776,11 @@ static int decode_update_thread_context(AVCodecContext *dst, h->cur_pic_ptr = REBASE_PICTURE(h1->cur_pic_ptr, h, h1); unref_picture(h, &h->cur_pic); - if ((ret = ref_picture(h, &h->cur_pic, &h1->cur_pic)) < 0) - return ret; + if (h1->cur_pic.f.buf[0]) { + ret = ref_picture(h, &h->cur_pic, &h1->cur_pic); + if (ret < 0) + return ret; + } h->workaround_bugs = h1->workaround_bugs; h->low_delay = h1->low_delay; From fa4604d80580dde45bfce32ebe04a5c13c233895 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 Aug 2013 03:01:19 +0200 Subject: [PATCH 576/822] h264: Do not share rbsp_buffer across threads Signed-off-by: Luca Barbato CC: libav-stable@libav.org (cherry picked from commit 61928b68dc28e080b8c8191afe5541123c682bbd) Signed-off-by: Anton Khirnov (cherry picked from commit 06d433366c02ab81a1aaad33d32934b4180d354b) Signed-off-by: Anton Khirnov --- libavcodec/h264.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3c07477d39..b2785de240 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1642,6 +1642,10 @@ static int decode_init_thread_copy(AVCodecContext *avctx) memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); + h->rbsp_buffer[0] = NULL; + h->rbsp_buffer[1] = NULL; + h->rbsp_buffer_size[0] = 0; + h->rbsp_buffer_size[1] = 0; h->context_initialized = 0; return 0; From 3670942fae7beb2bfde52557ee95eab5f536e624 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 12 Feb 2015 13:06:49 +0100 Subject: [PATCH 577/822] h264: initialize H264Context.avctx in init_thread_copy This prevents using a wrong (first thread's) AVCodecContext if decoding a frame in the first pass over all threads fails. (cherry picked from commit a06b0b1295c51d100101e0ca0434e199ad6de6b5) Signed-off-by: Anton Khirnov (cherry picked from commit 2686dab45eec54f99866413153aa0b36381e48be) Signed-off-by: Anton Khirnov --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index b2785de240..857a949e98 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1642,6 +1642,7 @@ static int decode_init_thread_copy(AVCodecContext *avctx) memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); + h->avctx = avctx; h->rbsp_buffer[0] = NULL; h->rbsp_buffer[1] = NULL; h->rbsp_buffer_size[0] = 0; From 91ef250713d04d675a16e5b030d7226baafe3f82 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 31 Jan 2013 04:20:24 +0100 Subject: [PATCH 578/822] h264_cabac: Break infinite loops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes out of array reads and/or infinite loops. 30 is the maximum number of bits that can be read into coeff_abs below. CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Martin Storsjö --- libavcodec/h264_cabac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 654eab7fcf..6b15c4a540 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1710,7 +1710,7 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block, \ if( coeff_abs >= 15 ) { \ int j = 0; \ - while( get_cabac_bypass( CC ) ) { \ + while (get_cabac_bypass(CC) && j < 30) { \ j++; \ } \ \ From c47cdf837c1b52681a84f434443e1f993757a5e9 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 6 Jan 2015 16:47:18 +0100 Subject: [PATCH 579/822] img2dec: correctly use the parsed value from -start_number Previously the image sequence was always starting from the minimum number rather than the requested one. CC: libav-stable@libav.org --- libavformat/img2dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 9acb6f6927..9307808b17 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -194,7 +194,7 @@ static int img_read_header(AVFormatContext *s1) return AVERROR(ENOENT); s->img_first = first_index; s->img_last = last_index; - s->img_number = first_index; + s->img_number = s->start_number != 1 ? s->start_number : first_index; /* compute duration */ st->start_time = 0; st->duration = last_index - first_index + 1; From f74f4a540151aacb38306f2e41a160c326be3d51 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 8 Mar 2015 11:16:33 -0400 Subject: [PATCH 580/822] Prepare for 10.6 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index 9a62de225f..12c0281acb 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.5 +10.6 From 470fd8e64e292d2336b2b860437dcbc053ba9eec Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 8 Mar 2015 11:20:46 -0400 Subject: [PATCH 581/822] Update Changelog for v10.6 --- Changelog | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Changelog b/Changelog index 670db5c000..a468706fe1 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,32 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.6: +- img2dec: correctly use the parsed value from -start_number +- h264_cabac: Break infinite loops +- h264: initialize H264Context.avctx in init_thread_copy +- h264: Do not share rbsp_buffer across threads +- h264: only ref cur_pic in update_thread_context if it is initialized +- matroskadec: Fix read-after-free in matroska_read_seek() (chromium/427266) +- smc: fix the bounds check (CVE-2014-8548) +- gifdec: refactor interleave end handling (CVE-2014-8547) +- mmvideo: check frame dimensions (CVE-2014-8543) +- jvdec: check frame dimensions (CVE-2014-8542) +- mjpegdec: check for pixel format changes (CVE-2014-8541) +- mov: avoid a memleak when multiple stss boxes are present +- avconv: Use the mpeg12 private option scan_offset (debian/773055) +- Replace lena.pnm (debian/771126) +- Treat all '*.pnm' files as non-text file +- lavu: fix memory leaks by using a mutex instead of atomics +- lavu: add wrappers for the pthreads mutex API +- mp3enc: fix a triggerable assert +- resample: Avoid off-by-1 errors in PTS calcs. (libav/753) +- imc: fix order of operations in coefficients read +- mpeg12: Always invoke the get_format() callback +- h264: Always invoke the get_format() callback +- Add some bug references to the changelog +- apetag: Fix APE tag size check + version 10.5: - proresenc: Remove unneeded parameters from encode_alpha_plane() - proresenc: Report buffer overflow From 7fd11fbeeb41990427b475dc0d8800d2cf15a8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 5 Mar 2015 23:38:00 +0200 Subject: [PATCH 582/822] arm: Suppress tags about used cpu arch and extensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When all the codepaths using manually set .arch/.fpu code is behind runtime detection, the elf attributes should be suppressed. This allows tools to know that the final built binary doesn't strictly require these extensions. Signed-off-by: Martin Storsjö (cherry picked from commit dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73 and b77e335e441040a40fc6156b8e4a134745d10233) Signed-off-by: Martin Storsjö --- configure | 6 ++++++ libavutil/arm/asm.S | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/configure b/configure index 05acff576b..58e7f8b49b 100755 --- a/configure +++ b/configure @@ -1321,6 +1321,7 @@ HAVE_LIST=" alsa_asoundlib_h altivec_h arpa_inet_h + as_object_arch asm_mod_q asm_mod_y atomic_cas_ptr @@ -3650,6 +3651,11 @@ EOF check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)' check_inline_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)' + # llvm's integrated assembler supports .object_arch from llvm 3.5 + [ "$objformat" = elf ] && check_as < Date: Sun, 22 Feb 2015 19:49:52 +0000 Subject: [PATCH 583/822] configure: Properly fail when libcdio/cdparanoia is not found --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 58e7f8b49b..35f9d5cdc8 100755 --- a/configure +++ b/configure @@ -4031,7 +4031,8 @@ enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio if enabled libcdio; then check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || - check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio + check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || + die "ERROR: No usable libcdio/cdparanoia found" fi check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib From b2b359f12465c8445484be24278b324da8ebb0e1 Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Wed, 18 Feb 2015 12:11:43 +0000 Subject: [PATCH 584/822] mdec: check for out of bounds read Bug-Id: CID 1257501 CC: libav-stable@libav.org Signed-off-by: Luca Barbato --- libavcodec/mdec.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index b9ffca6a34..b0d8518c61 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -83,7 +83,12 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) if (level == 127) { break; } else if (level != 0) { - i += run; + i += run; + if (i > 63) { + av_log(a->avctx, AV_LOG_ERROR, + "ac-tex damaged at %d %d\n", a->mb_x, a->mb_y); + return AVERROR_INVALIDDATA; + } j = scantable[i]; level = (level * qscale * quant_matrix[j]) >> 3; level = (level ^ SHOW_SBITS(re, &a->gb, 1)) - SHOW_SBITS(re, &a->gb, 1); @@ -93,8 +98,13 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) run = SHOW_UBITS(re, &a->gb, 6)+1; LAST_SKIP_BITS(re, &a->gb, 6); UPDATE_CACHE(re, &a->gb); level = SHOW_SBITS(re, &a->gb, 10); SKIP_BITS(re, &a->gb, 10); - i += run; - j = scantable[i]; + i += run; + if (i > 63) { + av_log(a->avctx, AV_LOG_ERROR, + "ac-tex damaged at %d %d\n", a->mb_x, a->mb_y); + return AVERROR_INVALIDDATA; + } + j = scantable[i]; if (level < 0) { level = -level; level = (level * qscale * quant_matrix[j]) >> 3; @@ -105,10 +115,6 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) level = (level - 1) | 1; } } - if (i > 63) { - av_log(a->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", a->mb_x, a->mb_y); - return AVERROR_INVALIDDATA; - } block[j] = level; } From 0eb8786eac1f4a2132ad80dc49f90d5f81665c5c Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Wed, 18 Feb 2015 12:11:44 +0000 Subject: [PATCH 585/822] eamad: check for out of bounds read Bug-Id: CID 1257500 CC: libav-stable@libav.org Signed-off-by: Luca Barbato --- libavcodec/eamad.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 99a4e77335..0edf5d00f3 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -139,6 +139,11 @@ static inline void decode_block_intra(MadContext *s, int16_t * block) break; } else if (level != 0) { i += run; + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, + "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + return; + } j = scantable[i]; level = (level*quant_matrix[j]) >> 4; level = (level-1)|1; @@ -153,6 +158,11 @@ static inline void decode_block_intra(MadContext *s, int16_t * block) run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); i += run; + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, + "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + return; + } j = scantable[i]; if (level < 0) { level = -level; @@ -164,10 +174,6 @@ static inline void decode_block_intra(MadContext *s, int16_t * block) level = (level-1)|1; } } - if (i > 63) { - av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); - return; - } block[j] = level; } From 772f50c1f3e4a50ce3f35e31a6f0cd64e7cbe818 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 3 Mar 2015 21:31:15 +0100 Subject: [PATCH 586/822] rv10: check size of s->mb_width * s->mb_height If it doesn't fit into 12 bits it triggers an assertion. Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov --- libavcodec/mpegvideo.h | 2 +- libavcodec/mpegvideo_enc.c | 7 +++++-- libavcodec/rv10enc.c | 8 +++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index f88870052f..c858e074b4 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -892,7 +892,7 @@ extern const uint8_t ff_aic_dc_scale_table[32]; extern const uint8_t ff_h263_chroma_qscale_table[32]; /* rv10.c */ -void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); +int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); int ff_rv_decode_dc(MpegEncContext *s, int n); void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index dcc399f8dd..0cfd04e611 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3376,8 +3376,11 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_msmpeg4_encode_picture_header(s, picture_number); else if (CONFIG_MPEG4_ENCODER && s->h263_pred) ff_mpeg4_encode_picture_header(s, picture_number); - else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) - ff_rv10_encode_picture_header(s, picture_number); + else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) { + ret = ff_rv10_encode_picture_header(s, picture_number); + if (ret < 0) + return ret; + } else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20) ff_rv20_encode_picture_header(s, picture_number); else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1) diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index 9b23d7d92a..b94181e884 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -28,7 +28,7 @@ #include "mpegvideo.h" #include "put_bits.h" -void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) +int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) { int full_frame= 0; @@ -48,12 +48,18 @@ void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) /* if multiple packets per frame are sent, the position at which to display the macroblocks is coded here */ if(!full_frame){ + if (s->mb_width * s->mb_height >= (1U << 12)) { + avpriv_report_missing_feature(s->avctx, "Encoding frames with %d (>= 4096) macroblocks", + s->mb_width * s->mb_height); + return AVERROR(ENOSYS); + } put_bits(&s->pb, 6, 0); /* mb_x */ put_bits(&s->pb, 6, 0); /* mb_y */ put_bits(&s->pb, 12, s->mb_width * s->mb_height); } put_bits(&s->pb, 3, 0); /* ignored */ + return 0; } FF_MPV_GENERIC_CLASS(rv10) From 61c966ef30129a0e4dba485242c039a895914d33 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 2 Mar 2015 20:47:57 +0100 Subject: [PATCH 587/822] webp: validate the distance prefix code According to the WebP Lossless Bitstream Specification the highest allowed value for a prefix code is 39. If prefix_code is too large, the calculated extra_bits has an invalid value and triggers an assertion in get_bits. Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov --- libavcodec/webp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index f9f8bfcbff..7153c75c7a 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -684,6 +684,11 @@ static int decode_entropy_coded_image(WebPContext *s, enum ImageRole role, length = offset + get_bits(&s->gb, extra_bits) + 1; } prefix_code = huff_reader_get_symbol(&hg[HUFF_IDX_DIST], &s->gb); + if (prefix_code > 39) { + av_log(s->avctx, AV_LOG_ERROR, + "distance prefix code too large: %d\n", prefix_code); + return AVERROR_INVALIDDATA; + } if (prefix_code < 4) { distance = prefix_code + 1; } else { From 0051174c70810b66378cf8ea093eab01302f6049 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 2 Mar 2015 16:52:26 +0100 Subject: [PATCH 588/822] rmenc: limit packet size The chunk size is limited to UINT16_MAX (written by avio_wb16), so make sure that the packet size is not too large. Such large frames need to be split into slices smaller than 64 kB, but that is currently supported neither by the rv10/rv20 encoders nor the rm muxer. Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov --- libavformat/rmenc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index fba8feb802..3d9c866ace 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -44,6 +44,10 @@ typedef struct { /* in ms */ #define BUFFER_DURATION 0 +/* the header needs at most 7 + 4 + 12 B */ +#define MAX_HEADER_SIZE (7 + 4 + 12) +/* UINT16_MAX is the maximal chunk size */ +#define MAX_PACKET_SIZE (UINT16_MAX - MAX_HEADER_SIZE) static void put_str(AVIOContext *s, const char *tag) @@ -386,6 +390,10 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int /* Well, I spent some time finding the meaning of these bits. I am not sure I understood everything, but it works !! */ #if 1 + if (size > MAX_PACKET_SIZE) { + avpriv_report_missing_feature(s, "Muxing packets larger than 64 kB"); + return AVERROR(ENOSYS); + } write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame); /* bit 7: '1' if final packet of a frame converted in several packets */ avio_w8(pb, 0x81); From eb9041403d820634c45ed4ee98570246a252507a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 7 Mar 2015 22:06:59 +0100 Subject: [PATCH 589/822] tiff: Check that there is no aliasing in pixel format selection Fixes possible issues with unexpected bpp/bppcount values. CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Bug-Id: CVE-2014-8544 (cherry picked from commit ae5e1f3d663a8c9a532d89e588cbc61f171c9186) Signed-off-by: Luca Barbato --- libavcodec/tiff.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 7fb0e7a3a6..164cfce49c 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -270,6 +270,14 @@ static int init_image(TiffContext *s, AVFrame *frame) int i, ret; uint32_t *pal; + // make sure there is no aliasing in the following switch + if (s->bpp >= 100 || s->bppcount >= 10) { + av_log(s->avctx, AV_LOG_ERROR, + "Unsupported image parameters: bpp=%d, bppcount=%d\n", + s->bpp, s->bppcount); + return AVERROR_INVALIDDATA; + } + switch (s->bpp * 10 + s->bppcount) { case 11: s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; From e032e647dd79e7748145792dfee0358eccb1982e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Mar 2015 17:36:14 +0000 Subject: [PATCH 590/822] utvideodec: Handle slice_height being zero Fixes out of array accesses. CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Bug-Id: CVE-2014-9604 Signed-off-by: Vittorio Giovara Signed-off-by: Luca Barbato (cherry picked from commit 0ce3a0f9d9523a9bcad4c6d451ca5bbd7a4f420d) (cherry picked from commit 3a417a86b330b7c1acf9db4f729be7d619caaded) Signed-off-by: Reinhard Tartler --- libavcodec/utvideodec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 349259577b..c4a75c9a79 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -211,6 +211,8 @@ static void restore_median(uint8_t *src, int step, int stride, slice_start = ((slice * height) / slices) & cmask; slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; + if (!slice_height) + continue; bsrc = src + slice_start * stride; @@ -267,6 +269,8 @@ static void restore_median_il(uint8_t *src, int step, int stride, slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; slice_height >>= 1; + if (!slice_height) + continue; bsrc = src + slice_start * stride; From 8ae0d702a1ba1c3c8d88a29c181f8434f25bf53c Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 8 Mar 2015 21:57:59 -0400 Subject: [PATCH 591/822] doc: More changelog updates for v10.6 --- Changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Changelog b/Changelog index a468706fe1..adaf30e824 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,15 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 10.6: +- utvideodec: Handle slice_height being zero (CVE-2014-9604) +- tiff: Check that there is no aliasing in pixel format selection (CVE-2014-8544) +- rmenc: limit packet size +- webp: validate the distance prefix code +- rv10: check size of s->mb_width * s->mb_height +- eamad: check for out of bounds read (CID/1257500) +- mdec: check for out of bounds read (CID/1257501) +- configure: Properly fail when libcdio/cdparanoia is not found +- arm: Suppress tags about used cpu arch and extensions - img2dec: correctly use the parsed value from -start_number - h264_cabac: Break infinite loops - h264: initialize H264Context.avctx in init_thread_copy From c0dc649e81bf65e8bb6b773cefc243ef53d02924 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 5 Mar 2015 22:48:28 +0100 Subject: [PATCH 592/822] webp: ensure that each transform is only used once According to the WebP Lossless Bitstream Specification "each transform is allowed to be used only once". If a transform is more than once this can lead to memory corruption. Signed-off-by: Michael Niedermayer (cherry picked from commit c089e720c1b753790c746a13053636d7facf6bf0) Signed-off-by: Michael Niedermayer --- libavcodec/webp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index f14213ffa8..0355cb6eab 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1078,7 +1078,7 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, unsigned int data_size, int is_alpha_chunk) { WebPContext *s = avctx->priv_data; - int w, h, ret, i; + int w, h, ret, i, used; if (!is_alpha_chunk) { s->lossless = 1; @@ -1128,8 +1128,16 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, /* parse transformations */ s->nb_transforms = 0; s->reduced_width = 0; + used = 0; while (get_bits1(&s->gb)) { enum TransformType transform = get_bits(&s->gb, 2); + if (used & (1 << transform)) { + av_log(avctx, AV_LOG_ERROR, "Transform %d used more than once\n", + transform); + ret = AVERROR_INVALIDDATA; + goto free_and_return; + } + used |= (1 << transform); s->transforms[s->nb_transforms++] = transform; switch (transform) { case PREDICTOR_TRANSFORM: From fc6a00d20d025a1c71ebcd4953b064f37156afaa Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 2 Mar 2015 20:27:26 +0100 Subject: [PATCH 593/822] avcodec/rv10: check size of s->mb_width * s->mb_height If it doesn't fit into 12 bits it triggers an assertion. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 2578a546183da09d49d5bba8ab5e982dece1dede) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo.h | 2 +- libavcodec/mpegvideo_enc.c | 7 +++++-- libavcodec/rv10enc.c | 7 ++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 0811e62afb..22097f76b6 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -925,7 +925,7 @@ extern const uint8_t ff_aic_dc_scale_table[32]; extern const uint8_t ff_h263_chroma_qscale_table[32]; /* rv10.c */ -void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); +int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); int ff_rv_decode_dc(MpegEncContext *s, int n); void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index aff2b0e73d..b7bb786337 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3583,8 +3583,11 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_msmpeg4_encode_picture_header(s, picture_number); else if (CONFIG_MPEG4_ENCODER && s->h263_pred) ff_mpeg4_encode_picture_header(s, picture_number); - else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) - ff_rv10_encode_picture_header(s, picture_number); + else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) { + ret = ff_rv10_encode_picture_header(s, picture_number); + if (ret < 0) + return ret; + } else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20) ff_rv20_encode_picture_header(s, picture_number); else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1) diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index 1f85743b7b..ae4993c81b 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -28,7 +28,7 @@ #include "mpegvideo.h" #include "put_bits.h" -void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) +int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) { int full_frame= 0; @@ -48,12 +48,17 @@ void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) /* if multiple packets per frame are sent, the position at which to display the macroblocks is coded here */ if(!full_frame){ + if (s->mb_width * s->mb_height >= (1U << 12)) { + avpriv_report_missing_feature(s, "Encoding frames with 4096 or more macroblocks"); + return AVERROR(ENOSYS); + } put_bits(&s->pb, 6, 0); /* mb_x */ put_bits(&s->pb, 6, 0); /* mb_y */ put_bits(&s->pb, 12, s->mb_width * s->mb_height); } put_bits(&s->pb, 3, 0); /* ignored */ + return 0; } FF_MPV_GENERIC_CLASS(rv10) From b55be8b266761bbef6d39195ad7bb3bfd953c4f0 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 2 Mar 2015 20:47:57 +0100 Subject: [PATCH 594/822] avcodec/webp: validate the distance prefix code According to the WebP Lossless Bitstream Specification the highest allowed value for a prefix code is 39. If prefix_code is too large, the calculated extra_bits has an invalid value and triggers an assertion in get_bits. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 5de2dab12b951b2fe121eb18503accfc91cd1565) Signed-off-by: Michael Niedermayer --- libavcodec/webp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 0355cb6eab..e06680cbeb 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -690,6 +690,11 @@ static int decode_entropy_coded_image(WebPContext *s, enum ImageRole role, length = offset + get_bits(&s->gb, extra_bits) + 1; } prefix_code = huff_reader_get_symbol(&hg[HUFF_IDX_DIST], &s->gb); + if (prefix_code > 39) { + av_log(s->avctx, AV_LOG_ERROR, + "distance prefix code too large: %d\n", prefix_code); + return AVERROR_INVALIDDATA; + } if (prefix_code < 4) { distance = prefix_code + 1; } else { From 25b73ae265fd8988110dbc1ebfa14f6d4609f262 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 2 Mar 2015 15:46:44 +0100 Subject: [PATCH 595/822] avformat/rm: limit packet size The chunk size is limited to 0xFFFF (written by avio_wb16), so make sure that the packet size is not too large. Such large frames need to be split into slices smaller than 64 kB, but that is currently supported neither by the rv10/rv20 encoders nor the rm muxer. Signed-off-by: Andreas Cadhalpun See Ticket244 Signed-off-by: Michael Niedermayer (cherry picked from commit 08728f400b8367dc8c983036cb2eff3a2891322b) Signed-off-by: Michael Niedermayer --- libavformat/rmenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 17192ff275..a4e97a02e9 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -391,6 +391,11 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int /* Well, I spent some time finding the meaning of these bits. I am not sure I understood everything, but it works !! */ #if 1 + /* 0xFFFF is the maximal chunk size; header needs at most 7 + 4 + 12 B */ + if (size > 0xFFFF - 7 - 4 - 12) { + av_log(s, AV_LOG_ERROR, "large packet size %d not supported\n", size); + return AVERROR_PATCHWELCOME; + } write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame); /* bit 7: '1' if final packet of a frame converted in several packets */ avio_w8(pb, 0x81); From 4f53eaaafa2dffa587ec6a3f0cd7048419297eca Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 9 Mar 2015 14:59:44 +0100 Subject: [PATCH 596/822] ffmdec: limit the backward seek to the last resync position If resyncing leads to the same position as previously, it will again lead to a resync attempt, resulting in an infinite loop. Thus don't seek back beyond the last syncpoint. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 6b8263b03ab3d16d70525ae1893cb106be7852f1) Signed-off-by: Michael Niedermayer --- libavformat/ffmdec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 9d89b16643..2f02c7a28d 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -79,6 +79,7 @@ static int ffm_read_data(AVFormatContext *s, FFMContext *ffm = s->priv_data; AVIOContext *pb = s->pb; int len, fill_size, size1, frame_offset, id; + int64_t last_pos = -1; size1 = size; while (size > 0) { @@ -98,9 +99,11 @@ static int ffm_read_data(AVFormatContext *s, avio_seek(pb, tell, SEEK_SET); } id = avio_rb16(pb); /* PACKET_ID */ - if (id != PACKET_ID) + if (id != PACKET_ID) { if (ffm_resync(s, id) < 0) return -1; + last_pos = avio_tell(pb); + } fill_size = avio_rb16(pb); ffm->dts = avio_rb64(pb); frame_offset = avio_rb16(pb); @@ -114,7 +117,9 @@ static int ffm_read_data(AVFormatContext *s, if (!frame_offset) { /* This packet has no frame headers in it */ if (avio_tell(pb) >= ffm->packet_size * 3LL) { - avio_seek(pb, -ffm->packet_size * 2LL, SEEK_CUR); + int64_t seekback = FFMIN(ffm->packet_size * 2LL, avio_tell(pb) - last_pos); + seekback = FFMAX(seekback, 0); + avio_seek(pb, -seekback, SEEK_CUR); goto retry_read; } /* This is bad, we cannot find a valid frame header */ From 313492c0bd6999c18d98913a0da876f762ea3bff Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 9 Mar 2015 03:42:00 +0100 Subject: [PATCH 597/822] avcodec/options_table: remove extradata_size from the AVOptions table allowing access to the size but not the extradata itself is not useful and could lead to potential problems if writing happens through this field Reviewed-by: Andreas Cadhalpun Reviewed-by: Lukasz Marek Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer (cherry picked from commit 1f4088b28540080ce1d42345c5614be3e1a6a197) Signed-off-by: Michael Niedermayer --- libavcodec/options_table.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 1873a926fc..85af2e1492 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -91,7 +91,6 @@ static const AVOption avcodec_options[] = { {"hex", "hex motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_HEX }, INT_MIN, INT_MAX, V|E, "me_method" }, {"umh", "umh motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_UMH }, INT_MIN, INT_MAX, V|E, "me_method" }, {"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX}, {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, From e407615129a58d21d2a7b4660432a67e5741f89f Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 9 Mar 2015 19:24:09 +0100 Subject: [PATCH 598/822] roqvideoenc: set enc->avctx in roq_encode_init So far it is only set in roq_encode_frame, but it is used in roq_encode_end to free the coded_frame. This currently segfaults if roq_encode_frame is not called between roq_encode_init and roq_encode_end. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit cf82c426fadf90105e1fb9d5ecd267cc3aa2b288) Signed-off-by: Michael Niedermayer --- libavcodec/roqvideoenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index 4b96934a65..f682579d1c 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -960,6 +960,8 @@ static av_cold int roq_encode_init(AVCodecContext *avctx) av_lfg_init(&enc->randctx, 1); + enc->avctx = avctx; + enc->framesSinceKeyframe = 0; if ((avctx->width & 0xf) || (avctx->height & 0xf)) { av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n"); From f8bb156fa1f85f9a800ceae137403d83e5347ac4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 10 Mar 2015 20:21:14 +0100 Subject: [PATCH 599/822] avcodec/012v: Check dimensions more completely Fixes division by 0 Found-by: Thomas Lindroth Signed-off-by: Michael Niedermayer (cherry picked from commit d3b25383daffac154846daeb4e4fb46569e728db) Signed-off-by: Michael Niedermayer --- libavcodec/012v.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/012v.c b/libavcodec/012v.c index c2b6a35041..7526e8fcba 100644 --- a/libavcodec/012v.c +++ b/libavcodec/012v.c @@ -45,8 +45,8 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, const uint8_t *line_end, *src = avpkt->data; int stride = avctx->width * 8 / 3; - if (width == 1) { - av_log(avctx, AV_LOG_ERROR, "Width 1 not supported.\n"); + if (width <= 1 || avctx->height <= 0) { + av_log(avctx, AV_LOG_ERROR, "Dimensions %dx%d not supported.\n", width, avctx->height); return AVERROR_INVALIDDATA; } From e75bb490ca39cc1282a286b3beebb681f43fe1f5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 10 Mar 2015 19:18:34 +0100 Subject: [PATCH 600/822] avcodec/012v: redesign main loop Fixes out of array accesses Fixes: ffmpeg_012v_crash.ts Found-by: Thomas Lindroth Reviewed-by: Thomas Lindroth Signed-off-by: Michael Niedermayer (cherry picked from commit 48df30d36c3ca360c407d84f96749888d1fbe853) Signed-off-by: Michael Niedermayer --- libavcodec/012v.c | 82 ++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/libavcodec/012v.c b/libavcodec/012v.c index 7526e8fcba..b87551e0a5 100644 --- a/libavcodec/012v.c +++ b/libavcodec/012v.c @@ -38,7 +38,7 @@ static av_cold int zero12v_decode_init(AVCodecContext *avctx) static int zero12v_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { - int line = 0, ret; + int line, ret; const int width = avctx->width; AVFrame *pic = data; uint16_t *y, *u, *v; @@ -67,45 +67,45 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, pic->pict_type = AV_PICTURE_TYPE_I; pic->key_frame = 1; - y = (uint16_t *)pic->data[0]; - u = (uint16_t *)pic->data[1]; - v = (uint16_t *)pic->data[2]; line_end = avpkt->data + stride; + for (line = 0; line < avctx->height; line++) { + uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000}; + uint16_t u_temp[3] = {0x8000, 0x8000, 0x8000}; + uint16_t v_temp[3] = {0x8000, 0x8000, 0x8000}; + int x; + y = (uint16_t *)(pic->data[0] + line * pic->linesize[0]); + u = (uint16_t *)(pic->data[1] + line * pic->linesize[1]); + v = (uint16_t *)(pic->data[2] + line * pic->linesize[2]); - while (line++ < avctx->height) { - while (1) { - uint32_t t = AV_RL32(src); + for (x = 0; x < width; x += 6) { + uint32_t t; + + if (width - x < 6 || line_end - src < 16) { + y = y_temp; + u = u_temp; + v = v_temp; + } + + if (line_end - src < 4) + break; + + t = AV_RL32(src); src += 4; *u++ = t << 6 & 0xFFC0; *y++ = t >> 4 & 0xFFC0; *v++ = t >> 14 & 0xFFC0; - if (src >= line_end - 1) { - *y = 0x80; - src++; - line_end += stride; - y = (uint16_t *)(pic->data[0] + line * pic->linesize[0]); - u = (uint16_t *)(pic->data[1] + line * pic->linesize[1]); - v = (uint16_t *)(pic->data[2] + line * pic->linesize[2]); + if (line_end - src < 4) break; - } t = AV_RL32(src); src += 4; *y++ = t << 6 & 0xFFC0; *u++ = t >> 4 & 0xFFC0; *y++ = t >> 14 & 0xFFC0; - if (src >= line_end - 2) { - if (!(width & 1)) { - *y = 0x80; - src += 2; - } - line_end += stride; - y = (uint16_t *)(pic->data[0] + line * pic->linesize[0]); - u = (uint16_t *)(pic->data[1] + line * pic->linesize[1]); - v = (uint16_t *)(pic->data[2] + line * pic->linesize[2]); + + if (line_end - src < 4) break; - } t = AV_RL32(src); src += 4; @@ -113,15 +113,8 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, *y++ = t >> 4 & 0xFFC0; *u++ = t >> 14 & 0xFFC0; - if (src >= line_end - 1) { - *y = 0x80; - src++; - line_end += stride; - y = (uint16_t *)(pic->data[0] + line * pic->linesize[0]); - u = (uint16_t *)(pic->data[1] + line * pic->linesize[1]); - v = (uint16_t *)(pic->data[2] + line * pic->linesize[2]); + if (line_end - src < 4) break; - } t = AV_RL32(src); src += 4; @@ -129,18 +122,21 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, *v++ = t >> 4 & 0xFFC0; *y++ = t >> 14 & 0xFFC0; - if (src >= line_end - 2) { - if (width & 1) { - *y = 0x80; - src += 2; - } - line_end += stride; - y = (uint16_t *)(pic->data[0] + line * pic->linesize[0]); - u = (uint16_t *)(pic->data[1] + line * pic->linesize[1]); - v = (uint16_t *)(pic->data[2] + line * pic->linesize[2]); + if (width - x < 6) break; - } } + + if (x < width) { + y = x + (uint16_t *)(pic->data[0] + line * pic->linesize[0]); + u = x/2 + (uint16_t *)(pic->data[1] + line * pic->linesize[1]); + v = x/2 + (uint16_t *)(pic->data[2] + line * pic->linesize[2]); + memcpy(y, y_temp, sizeof(*y) * (width - x)); + memcpy(u, u_temp, sizeof(*u) * (width - x + 1) / 2); + memcpy(v, v_temp, sizeof(*v) * (width - x + 1) / 2); + } + + line_end += stride; + src = line_end - stride; } *got_frame = 1; From 7a3ff7fb814bfecd4395427b52391c7ccb9561e0 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 8 Mar 2015 23:12:59 +0100 Subject: [PATCH 601/822] ffmdec: make sure the time base is valid A negative time base can trigger assertions. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 4c91d81be23ffacfa3897b2bcfa77445bb0c2f89) Conflicts: libavformat/ffmdec.c (cherry picked from commit 9678ceb6976ca8194848b24535785a298521211f) Signed-off-by: Michael Niedermayer --- libavformat/ffmdec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 2f02c7a28d..91882b2a72 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -296,6 +296,11 @@ static int ffm2_read_header(AVFormatContext *s) case MKBETAG('S', 'T', 'V', 'I'): codec->time_base.num = avio_rb32(pb); codec->time_base.den = avio_rb32(pb); + if (codec->time_base.num <= 0 || codec->time_base.den <= 0) { + av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n", + codec->time_base.num, codec->time_base.den); + goto fail; + } codec->width = avio_rb16(pb); codec->height = avio_rb16(pb); codec->gop_size = avio_rb16(pb); @@ -420,6 +425,11 @@ static int ffm_read_header(AVFormatContext *s) case AVMEDIA_TYPE_VIDEO: codec->time_base.num = avio_rb32(pb); codec->time_base.den = avio_rb32(pb); + if (codec->time_base.num <= 0 || codec->time_base.den <= 0) { + av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n", + codec->time_base.num, codec->time_base.den); + goto fail; + } codec->width = avio_rb16(pb); codec->height = avio_rb16(pb); codec->gop_size = avio_rb16(pb); From a15ceebb6f2a7b6b8731793d9b8a1f565740ba50 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 19:29:12 +0100 Subject: [PATCH 602/822] avformat/asfdec: Use 64bit ret to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit d4936d28a11fac6c9c4b4df9625185f93b086986) Signed-off-by: Michael Niedermayer --- libavformat/asfdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 9bbc70467d..51ff96b769 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -1472,7 +1472,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index) ff_asf_guid g; ASFContext *asf = s->priv_data; int64_t current_pos = avio_tell(s->pb); - int ret = 0; + int64_t ret; if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) { return ret; @@ -1542,7 +1542,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, /* Try using the protocol's read_seek if available */ if (s->pb) { - int ret = avio_seek_time(s->pb, stream_index, pts, flags); + int64_t ret = avio_seek_time(s->pb, stream_index, pts, flags); if (ret >= 0) asf_reset_header(s); if (ret != AVERROR(ENOSYS)) From 107738051393b1f91d4624909113e156ea910b08 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 20:13:06 +0100 Subject: [PATCH 603/822] avformat/idcin: Use 64bit for ret to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit d1923d15a3544cbb94563a59e7169291db76b312) Signed-off-by: Michael Niedermayer --- libavformat/idcin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/idcin.c b/libavformat/idcin.c index cc25fb0e38..0f0b97eccf 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -359,7 +359,7 @@ static int idcin_read_seek(AVFormatContext *s, int stream_index, IdcinDemuxContext *idcin = s->priv_data; if (idcin->first_pkt_pos > 0) { - int ret = avio_seek(s->pb, idcin->first_pkt_pos, SEEK_SET); + int64_t ret = avio_seek(s->pb, idcin->first_pkt_pos, SEEK_SET); if (ret < 0) return ret; ff_update_cur_dts(s, s->streams[idcin->video_stream_index], 0); From 2ee4b48c9b72867ceae99151a0c69d3f7be1660e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 20:14:56 +0100 Subject: [PATCH 604/822] avformat/gxf: Use 64bit for res to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit 12987f89007ee82b9d3a6090085dfaef8461ab8b) Signed-off-by: Michael Niedermayer --- libavformat/gxf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/gxf.c b/libavformat/gxf.c index c36479a821..f8053a08cb 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -556,7 +556,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { } static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { - int res = 0; + int64_t res = 0; uint64_t pos; uint64_t maxlen = 100 * 1024 * 1024; AVStream *st = s->streams[0]; From c4b5b3309ca97bbb45ab9437a8deaab1299f82e1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 20:41:35 +0100 Subject: [PATCH 605/822] avformat/mvdec: Use 64bit for ret to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit 26c0cc154e06cb0064b3a3da49447ac44d82444f) Signed-off-by: Michael Niedermayer --- libavformat/mvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 5525233db5..8d6a26cd6c 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -371,7 +371,7 @@ static int mv_read_packet(AVFormatContext *avctx, AVPacket *pkt) AVStream *st = avctx->streams[mv->stream_index]; const AVIndexEntry *index; int frame = mv->frame[mv->stream_index]; - int ret; + int64_t ret; uint64_t pos; if (frame < st->nb_index_entries) { From c5c39132b4a3ef7f72dda8ea3d389eb3ba04860b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 21:00:57 +0100 Subject: [PATCH 606/822] avformat/vqf: Use 64bit for ret to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit cb08687180683a755d0fe9d425280d0e4d1e6db2) Signed-off-by: Michael Niedermayer --- libavformat/vqf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/vqf.c b/libavformat/vqf.c index 74c7f5fc17..a4703662cb 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -265,7 +265,7 @@ static int vqf_read_seek(AVFormatContext *s, { VqfContext *c = s->priv_data; AVStream *st; - int ret; + int64_t ret; int64_t pos; st = s->streams[stream_index]; From 2bb09b714ab6978d88de33eab601ef2b315f92b4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 20 Feb 2015 21:01:54 +0100 Subject: [PATCH 607/822] avformat/omadec: Use 64bit for ret to avoid overflow Signed-off-by: Michael Niedermayer (cherry picked from commit 0f55bc29d41585d110b126cb4ed4b395fd46d7ac) Signed-off-by: Michael Niedermayer --- libavformat/omadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 3ea2ec1468..afd483c4c3 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -462,7 +462,7 @@ static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { OMAContext *oc = s->priv_data; - int err = ff_pcm_read_seek(s, stream_index, timestamp, flags); + int64_t err = ff_pcm_read_seek(s, stream_index, timestamp, flags); if (!oc->encrypted) return err; From 1a396d1ee0d6114af4397c6335877fb28f897d37 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 19 Feb 2015 16:25:29 +0100 Subject: [PATCH 608/822] avcodec/x86/mlpdsp_init: Simplify mlp_filter_channel_x86() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on patch by Francisco Blas Izquierdo Riera Commit message partly taken from carl fixes a compilation error in mlpdsp_init.c with -fstack-check and some gcc compilers (I reproduced the issue with gcc 4.7.3) by simplifying the code. See also https://bugs.gentoo.org/show_bug.cgi?id=471756 $ make libavcodec/x86/mlpdsp_init.o libavcodec/x86/mlpdsp_init.c: In function ‘mlp_filter_channel_x86’: libavcodec/x86/mlpdsp_init.c:142:5: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’ libavcodec/x86/mlpdsp_init.c:142:5: error: ‘asm’ operand has impossible constraints 4551 -> 4509 dezicycles Reviewed-by: Ramiro Polla Signed-off-by: Michael Niedermayer (cherry picked from commit 03f39fbb2a558153a3c464edec1378d637a755fe) Signed-off-by: Michael Niedermayer --- libavcodec/x86/mlpdsp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/mlpdsp.c b/libavcodec/x86/mlpdsp.c index 94849b7e79..a3ac207a60 100644 --- a/libavcodec/x86/mlpdsp.c +++ b/libavcodec/x86/mlpdsp.c @@ -132,8 +132,8 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff, FIRMUL (ff_mlp_firorder_6, 0x14 ) FIRMUL (ff_mlp_firorder_5, 0x10 ) FIRMUL (ff_mlp_firorder_4, 0x0c ) - FIRMULREG(ff_mlp_firorder_3, 0x08,10) - FIRMULREG(ff_mlp_firorder_2, 0x04, 9) + FIRMUL (ff_mlp_firorder_3, 0x08 ) + FIRMUL (ff_mlp_firorder_2, 0x04 ) FIRMULREG(ff_mlp_firorder_1, 0x00, 8) LABEL_MANGLE(ff_mlp_firorder_0)":\n\t" "jmp *%6 \n\t" @@ -162,8 +162,6 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff, : /* 4*/"r"((x86_reg)mask), /* 5*/"r"(firjump), /* 6*/"r"(iirjump) , /* 7*/"c"(filter_shift) , /* 8*/"r"((int64_t)coeff[0]) - , /* 9*/"r"((int64_t)coeff[1]) - , /*10*/"r"((int64_t)coeff[2]) : "rax", "rdx", "rsi" #else /* ARCH_X86_32 */ /* 3*/"+m"(blocksize) From baa1738f99187fc2c6ce16e5e79d45d1eb555d63 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 22 Feb 2015 20:43:30 +0100 Subject: [PATCH 609/822] avcodec/a64multienc: use av_frame_ref instead of copying the frame This fixes freeing the frame buffer twice on cleanup leading to a crash. Signed-off-by: Michael Niedermayer (cherry picked from commit 39e4ed7c1d8d840be47f6d604704d47a59a9ae5d) Signed-off-by: Michael Niedermayer --- libavcodec/a64multienc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index af3f965213..89cd2f5571 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -317,7 +317,9 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } else { /* fill up mc_meta_charset with data until lifetime exceeds */ if (c->mc_frame_counter < c->mc_lifetime) { - *p = *pict; + ret = av_frame_ref(p, pict); + if (ret < 0) + return ret; p->pict_type = AV_PICTURE_TYPE_I; p->key_frame = 1; to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter); From 5c4dc00c3a6d8403a881fc810dc38ae861a1eef4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 23 Feb 2015 01:21:30 +0100 Subject: [PATCH 610/822] avcodec/a64multienc: don't set incorrect packet size This fixes invalid reads of the packet buffer in av_dup_packet Based on patch by Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit d96142e9af92ded84f2580620c571ab96c4bb657) Conflicts: libavcodec/a64multienc.c --- libavcodec/a64multienc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 89cd2f5571..0cdec2ec62 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -336,8 +336,8 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, req_size = 0; /* any frames to encode? */ if (c->mc_lifetime) { - req_size = charset_size + c->mc_lifetime*(screen_size + colram_size); - if ((ret = ff_alloc_packet2(avctx, pkt, req_size)) < 0) + int alloc_size = charset_size + c->mc_lifetime*(screen_size + colram_size); + if ((ret = ff_alloc_packet2(avctx, pkt, alloc_size)) < 0) return ret; buf = pkt->data; @@ -354,6 +354,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, /* advance pointers */ buf += charset_size; charset += charset_size; + req_size += charset_size; } /* write x frames to buf */ From e29761b1c850513b19f435cf59903ee63991a30c Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 22 Feb 2015 20:48:38 +0100 Subject: [PATCH 611/822] avcodec/a64multienc: fix use of uninitialized values in to_meta_with_crop Averaging over 2 pixels doesn't work correctly for the last pixel, because the rest of the buffer is not initialized. Signed-off-by: Michael Niedermayer (cherry picked from commit 87513d654546a99f8ddb045ca4fa5d33778a617e) Signed-off-by: Michael Niedermayer --- libavcodec/a64multienc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 0cdec2ec62..be68cd538d 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -78,9 +78,13 @@ static void to_meta_with_crop(AVCodecContext *avctx, AVFrame *p, int *dest) for (y = blocky; y < blocky + 8 && y < C64YRES; y++) { for (x = blockx; x < blockx + 8 && x < C64XRES; x += 2) { if(x < width && y < height) { - /* build average over 2 pixels */ - luma = (src[(x + 0 + y * p->linesize[0])] + - src[(x + 1 + y * p->linesize[0])]) / 2; + if (x + 1 < width) { + /* build average over 2 pixels */ + luma = (src[(x + 0 + y * p->linesize[0])] + + src[(x + 1 + y * p->linesize[0])]) / 2; + } else { + luma = src[(x + y * p->linesize[0])]; + } /* write blocks as linear data now so they are suitable for elbg */ dest[0] = luma; } From d125abfa748797e80fa6458e86260f5ddb1ef2cc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 24 Feb 2015 00:32:39 +0100 Subject: [PATCH 612/822] swscale/utils: More carefully merge and clear coefficients outside the input Fixes out of array read Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 1895d414aaacece3b57d7bf19502305e9a064fae) Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 9db6af6e4f..975a780316 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -619,14 +619,24 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, if ((*filterPos)[i] + filterSize > srcW) { int shift = (*filterPos)[i] + FFMIN(filterSize - srcW, 0); + int64_t acc = 0; - // move filter coefficients right to compensate for filterPos - for (j = filterSize - 2; j >= 0; j--) { - int right = FFMIN(j + shift, filterSize - 1); - filter[i * filterSize + right] += filter[i * filterSize + j]; - filter[i * filterSize + j] = 0; + for (j = filterSize - 1; j >= 0; j--) { + if ((*filterPos)[i] + j >= srcW) { + acc += filter[i * filterSize + j]; + filter[i * filterSize + j] = 0; + } } + for (j = filterSize - 1; j >= 0; j--) { + if (j < shift) { + filter[i * filterSize + j] = 0; + } else { + filter[i * filterSize + j] = filter[i * filterSize + j - shift]; + } + } + (*filterPos)[i]-= shift; + filter[i * filterSize + srcW - 1 - (*filterPos)[i]] += acc; } } From c4d250abcaf72f57c2937043dc6bdb502bfb9c69 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 24 Feb 2015 03:12:22 +0100 Subject: [PATCH 613/822] avcodec/snowdec: Fix ref value check Fixes integer overflow and out of array read. Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 8f4cbf940212079a34753c7f4d6c6b5a43586d30) Signed-off-by: Michael Niedermayer --- libavcodec/snowdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 79cf5a1853..7651373c2a 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -153,7 +153,7 @@ static int decode_q_branch(SnowContext *s, int level, int x, int y){ int l = left->color[0]; int cb= left->color[1]; int cr= left->color[2]; - int ref = 0; + unsigned ref = 0; int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx)); int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my)); From ec7c1cd73319bbe75924f77363e710217f0878da Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 24 Feb 2015 20:49:07 +0100 Subject: [PATCH 614/822] avcodec/h264: Only reinit quant tables if a new PPS is allowed Fixes null pointer dereference Fixes: signal_sigsegv_3042097_3007_cov_1741463594_non_monotone_timestamps1.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit c23a0e77dd492d6c794f89dbff3a438c95745e70) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 00f9e0738e..56858f4f46 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3712,7 +3712,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) } } - if (h == h0 && h->dequant_coeff_pps != pps_id) { + if (first_slice && h->dequant_coeff_pps != pps_id) { h->dequant_coeff_pps = pps_id; init_dequant_tables(h); } From c803985132042edfa2b2c11223e1ac39d38a66db Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Feb 2015 12:29:10 +0100 Subject: [PATCH 615/822] avcodec/zmbv: Check len before reading in decode_frame() Fixes out of array read Fixes: asan_heap-oob_4d4eb0_3994_cov_3169972261_zmbv_15bit.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 1f5c7781e63d6519192ada59c1e36bcecc92791d) Signed-off-by: Michael Niedermayer --- libavcodec/zmbv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 71e828771a..048cbb5eed 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -410,11 +410,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac int hi_ver, lo_ver, ret; /* parse header */ + if (len < 1) + return AVERROR_INVALIDDATA; c->flags = buf[0]; buf++; len--; if (c->flags & ZMBV_KEYFRAME) { void *decode_intra = NULL; c->decode_intra= NULL; + + if (len < 6) + return AVERROR_INVALIDDATA; hi_ver = buf[0]; lo_ver = buf[1]; c->comp = buf[2]; From a3cd26aa33eda9f333f4024bab48717c38c78a90 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Feb 2015 15:51:28 +0100 Subject: [PATCH 616/822] avcodec/hevc_ps: Sanity checks for some log2_* values log2 values which imply numeric overflow are not supported Signed-off-by: Michael Niedermayer (cherry picked from commit 205b2ba3d677330e023aac2f4bd3f624039256b9) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index c575fce429..be1adb1111 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -787,11 +787,30 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) sps->log2_max_trafo_size = log2_diff_max_min_transform_block_size + sps->log2_min_tb_size; - if (sps->log2_min_tb_size >= sps->log2_min_cb_size) { + if (sps->log2_min_cb_size < 3 || sps->log2_min_cb_size > 30) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid value %d for log2_min_cb_size", sps->log2_min_cb_size); + ret = AVERROR_INVALIDDATA; + goto err; + } + + if (sps->log2_diff_max_min_coding_block_size > 30) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid value %d for log2_diff_max_min_coding_block_size", sps->log2_diff_max_min_coding_block_size); + ret = AVERROR_INVALIDDATA; + goto err; + } + + if (sps->log2_min_tb_size >= sps->log2_min_cb_size || sps->log2_min_tb_size < 2) { av_log(s->avctx, AV_LOG_ERROR, "Invalid value for log2_min_tb_size"); ret = AVERROR_INVALIDDATA; goto err; } + + if (log2_diff_max_min_transform_block_size < 0 || log2_diff_max_min_transform_block_size > 30) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid value %d for log2_diff_max_min_transform_block_size", log2_diff_max_min_transform_block_size); + ret = AVERROR_INVALIDDATA; + goto err; + } + sps->max_transform_hierarchy_depth_inter = get_ue_golomb_long(gb); sps->max_transform_hierarchy_depth_intra = get_ue_golomb_long(gb); From b9d09fb8c9998a533289c2fd9db8792570c9ff8f Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Thu, 26 Feb 2015 13:42:52 +0000 Subject: [PATCH 617/822] mips/acelp_filters: fix incorrect register constraint Change register constraint on the v variable from = to +. This was causing GCC to think that the v variable was never read and therefore not initialize it. This fixes about 20 fate failures on mips64el. Signed-off-by: James Cowgill Signed-off-by: Michael Niedermayer (cherry picked from commit b9de1303a6414174ab2f3bccefa801bfabcf0f88) Signed-off-by: Michael Niedermayer --- libavcodec/mips/acelp_filters_mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mips/acelp_filters_mips.c b/libavcodec/mips/acelp_filters_mips.c index c8d980aa00..ffc0fe6250 100644 --- a/libavcodec/mips/acelp_filters_mips.c +++ b/libavcodec/mips/acelp_filters_mips.c @@ -89,7 +89,7 @@ static void ff_acelp_interpolatef_mips(float *out, const float *in, "addu %[p_filter_coeffs_m], %[p_filter_coeffs_m], %[prec] \n\t" "madd.s %[v],%[v],%[in_val_m], %[fc_val_m] \n\t" - : [v] "=&f" (v),[p_in_p] "+r" (p_in_p), [p_in_m] "+r" (p_in_m), + : [v] "+&f" (v),[p_in_p] "+r" (p_in_p), [p_in_m] "+r" (p_in_m), [p_filter_coeffs_p] "+r" (p_filter_coeffs_p), [in_val_p] "=&f" (in_val_p), [in_val_m] "=&f" (in_val_m), [fc_val_p] "=&f" (fc_val_p), [fc_val_m] "=&f" (fc_val_m), From 265ad094a8cbf071f24a32370a7ed3e2e7539e5a Mon Sep 17 00:00:00 2001 From: Dyami Caliri Date: Thu, 26 Feb 2015 10:17:01 -0800 Subject: [PATCH 618/822] Fix buffer_size argument to init_put_bits() in multiple encoders. Several encoders were multiplying the buffer size by 8, in order to get a bit size. However, the buffer_size argument is for the byte size of the buffer. We had experienced crashes encoding prores (Anatoliy) at size 4096x4096. (cherry picked from commit 50833c9f7b4e1922197a8955669f8ab3589c8cef) Conflicts: libavcodec/proresenc_kostya.c --- libavcodec/aacenc.c | 2 +- libavcodec/adpcmenc.c | 4 ++-- libavcodec/faxcompr.c | 2 +- libavcodec/flashsv2enc.c | 2 +- libavcodec/flashsvenc.c | 2 +- libavcodec/nellymoserenc.c | 2 +- libavcodec/proresenc_anatoliy.c | 2 +- libavcodec/proresenc_kostya.c | 2 +- libavcodec/s302menc.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 5596b4bfad..24de94f327 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -165,7 +165,7 @@ static void put_audio_specific_config(AVCodecContext *avctx) PutBitContext pb; AACEncContext *s = avctx->priv_data; - init_put_bits(&pb, avctx->extradata, avctx->extradata_size*8); + init_put_bits(&pb, avctx->extradata, avctx->extradata_size); put_bits(&pb, 5, 2); //object type - AAC-LC put_bits(&pb, 4, s->samplerate_index); //sample rate index put_bits(&pb, 4, s->channels); diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index da149a3962..e0737e221f 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -541,7 +541,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, case AV_CODEC_ID_ADPCM_IMA_QT: { PutBitContext pb; - init_put_bits(&pb, dst, pkt_size * 8); + init_put_bits(&pb, dst, pkt_size); for (ch = 0; ch < avctx->channels; ch++) { ADPCMChannelStatus *status = &c->status[ch]; @@ -571,7 +571,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, case AV_CODEC_ID_ADPCM_SWF: { PutBitContext pb; - init_put_bits(&pb, dst, pkt_size * 8); + init_put_bits(&pb, dst, pkt_size); n = frame->nb_samples - 1; diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c index 900851b3f1..d2ba7068ca 100644 --- a/libavcodec/faxcompr.c +++ b/libavcodec/faxcompr.c @@ -251,7 +251,7 @@ static void put_line(uint8_t *dst, int size, int width, const int *runs) PutBitContext pb; int run, mode = ~0, pix_left = width, run_idx = 0; - init_put_bits(&pb, dst, size * 8); + init_put_bits(&pb, dst, size); while (pix_left > 0) { run = runs[run_idx++]; mode = ~mode; diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index 436daa4be2..5fff04cb00 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c @@ -287,7 +287,7 @@ static int write_header(FlashSV2Context * s, uint8_t * buf, int buf_size) if (buf_size < 5) return -1; - init_put_bits(&pb, buf, buf_size * 8); + init_put_bits(&pb, buf, buf_size); put_bits(&pb, 4, (s->block_width >> 4) - 1); put_bits(&pb, 12, s->image_width); diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 7ad15f118f..6d406e9fa6 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -151,7 +151,7 @@ static int encode_bitstream(FlashSVContext *s, const AVFrame *p, uint8_t *buf, int buf_pos, res; int pred_blocks = 0; - init_put_bits(&pb, buf, buf_size * 8); + init_put_bits(&pb, buf, buf_size); put_bits(&pb, 4, block_width / 16 - 1); put_bits(&pb, 12, s->image_width); diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index f9d1389a78..8f15757888 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -301,7 +301,7 @@ static void encode_block(NellyMoserEncodeContext *s, unsigned char *output, int apply_mdct(s); - init_put_bits(&pb, output, output_size * 8); + init_put_bits(&pb, output, output_size); i = 0; for (band = 0; band < NELLY_BANDS; band++) { diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 80ce1359c5..da25b6b9a5 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -304,7 +304,7 @@ static int encode_slice_plane(AVCodecContext *avctx, int mb_count, } blocks_per_slice = mb_count << (2 - chroma); - init_put_bits(&pb, buf, buf_size << 3); + init_put_bits(&pb, buf, buf_size); encode_dc_coeffs(&pb, blocks, blocks_per_slice, qmat); encode_ac_coeffs(avctx, &pb, blocks, blocks_per_slice, qmat); diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index e263bb9f31..6b084a53de 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1058,7 +1058,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, slice_hdr = pkt->data + (slice_hdr - start); tmp = pkt->data + (tmp - start); } - init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); + init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf))); ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); if (ret < 0) diff --git a/libavcodec/s302menc.c b/libavcodec/s302menc.c index a7e5b1d26b..a196e23299 100644 --- a/libavcodec/s302menc.c +++ b/libavcodec/s302menc.c @@ -81,7 +81,7 @@ static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt, return ret; o = avpkt->data; - init_put_bits(&pb, o, buf_size * 8); + init_put_bits(&pb, o, buf_size); put_bits(&pb, 16, buf_size - AES3_HEADER_LEN); put_bits(&pb, 2, (avctx->channels - 2) >> 1); // number of channels put_bits(&pb, 8, 0); // channel ID From 3193f4d3f2a6ad982d4fdbb4dc226ea8d81572b7 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 25 Feb 2015 22:55:44 +0100 Subject: [PATCH 619/822] avformat/adxdec: check avctx->channels for invalid values This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 7faa40af982960608b117e20fec999b48011e5e0) Signed-off-by: Michael Niedermayer --- libavformat/adxdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c index fe22c3ae69..b577b89cb9 100644 --- a/libavformat/adxdec.c +++ b/libavformat/adxdec.c @@ -41,6 +41,11 @@ static int adx_read_packet(AVFormatContext *s, AVPacket *pkt) AVCodecContext *avctx = s->streams[0]->codec; int ret, size; + if (avctx->channels <= 0) { + av_log(s, AV_LOG_ERROR, "invalid number of channels %d\n", avctx->channels); + return AVERROR_INVALIDDATA; + } + size = BLOCK_SIZE * avctx->channels; pkt->pos = avio_tell(s->pb); From 3183c2078105c3f9c9cd40227cdd8cc585ac720b Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 26 Feb 2015 21:38:50 +0100 Subject: [PATCH 620/822] avformat/bit: check that pkt->size is 10 in write_packet Ohter packet sizes are not supported by this muxer. This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit eeda2c3de8a8484d9e7d1e47ac836bec850b31fc) Signed-off-by: Michael Niedermayer --- libavformat/bit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/bit.c b/libavformat/bit.c index 0be471ac4f..42df0c2fae 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -133,6 +133,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) GetBitContext gb; int i; + if (pkt->size != 10) + return AVERROR(EINVAL); + avio_wl16(pb, SYNC_WORD); avio_wl16(pb, 8 * 10); From 4e11780b85f8454de90cd3f7acf828a8e470fd7f Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 26 Feb 2015 21:42:02 +0100 Subject: [PATCH 621/822] avformat/bit: only accept the g729 codec and 1 channel Other codecs/channel numbers are not supported by this muxer. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit d0b8640f75ff7569c98d6fdb03d83451104e088c) Signed-off-by: Michael Niedermayer --- libavformat/bit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/bit.c b/libavformat/bit.c index 42df0c2fae..f5112c2fea 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -119,8 +119,12 @@ static int write_header(AVFormatContext *s) { AVCodecContext *enc = s->streams[0]->codec; - enc->codec_id = AV_CODEC_ID_G729; - enc->channels = 1; + if ((enc->codec_id != AV_CODEC_ID_G729) || enc->channels != 1) { + av_log(s, AV_LOG_ERROR, + "only codec g729 with 1 channel is supported by this format\n"); + return AVERROR(EINVAL); + } + enc->bits_per_coded_sample = 16; enc->block_align = (enc->bits_per_coded_sample * enc->channels) >> 3; From e32e1e3a4fe084d76104285baa58ebb34868d912 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 27 Feb 2015 03:12:23 +0100 Subject: [PATCH 622/822] swscale/utils: clear formatConvBuffer on allocation Fixes use of uninitialized memory Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 007498fc1a639ecee2cda1892cbcff66c7c8c951) Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 975a780316..f82cc36b77 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1339,7 +1339,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, c->chrDstW = FF_CEIL_RSHIFT(dstW, c->chrDstHSubSample); c->chrDstH = FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample); - FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail); + FF_ALLOCZ_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail); /* unscaled special cases */ if (unscaled && !usesHFilter && !usesVFilter && From 97fb0b2109312bdbe3075d2d5c8c73d1c1750729 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 28 Feb 2015 20:58:31 +0100 Subject: [PATCH 623/822] avformat/flvenc: check that the codec_tag fits in the available bits flags is later written with avio_w8 and if it doesn't fit in one byte it triggers an av_assert2. Signed-off-by: Michael Niedermayer (cherry picked from commit e8565d21c276ab9ac5ce785549420321fbd0b093) Signed-off-by: Michael Niedermayer --- libavformat/flvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 9778719a39..553304e020 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -488,7 +488,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) avio_w8(pb, FLV_TAG_TYPE_VIDEO); flags = enc->codec_tag; - if (flags == 0) { + if (flags <= 0 || flags > 15) { av_log(s, AV_LOG_ERROR, "Video codec '%s' is not compatible with FLV\n", avcodec_get_name(enc->codec_id)); From 7ed19bd337ead0c9bf125432d5fa56ca8415d8be Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 3 Mar 2015 12:06:40 +0100 Subject: [PATCH 624/822] fix VP9 packet decoder returning 0 instead of the used data size See https://trac.videolan.org/vlc/ticket/14022#comment:6 Signed-off-by: Michael Niedermayer (cherry picked from commit 4851db80a4f80ddade1d50d2ec741375c763f001) Signed-off-by: Michael Niedermayer --- libavcodec/vp9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index cbc885b77d..66dddd942c 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3742,7 +3742,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, if ((res = av_frame_ref(frame, s->refs[ref].f)) < 0) return res; *got_frame = 1; - return 0; + return pkt->size; } data += res; size -= res; @@ -3952,7 +3952,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, *got_frame = 1; } - return 0; + return pkt->size; } static void vp9_decode_flush(AVCodecContext *ctx) From 6155d5d98b1b4fe76c8b1d072c39969068b9ed66 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Thu, 5 Mar 2015 12:05:17 +0100 Subject: [PATCH 625/822] doc/protocols/tcp: fix units of listen_timeout option value, from microseconds to milliseconds s->listen_timeout is passed to ff_listen_bind(), which accepts a timeout value expressed in milliseconds. The unit was incorrectly set in 1b4da43ce02452843a1e9bb976da1a39e18a945c. (cherry picked from commit 6db20926c32ea297418f1f819585007c6b7b6160) Signed-off-by: Michael Niedermayer --- doc/protocols.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 91b8244306..851b3c52d0 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -982,8 +982,8 @@ Set raise error timeout, expressed in microseconds. This option is only relevant in read mode: if no data arrived in more than this time interval, raise error. -@item listen_timeout=@var{microseconds} -Set listen timeout, expressed in microseconds. +@item listen_timeout=@var{milliseconds} +Set listen timeout, expressed in milliseconds. @end table The following example shows how to setup a listening TCP connection From 77e8bd8ce62a968b5ba318635f94de3dd8cce7eb Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 12 Aug 2014 18:11:05 -0400 Subject: [PATCH 626/822] vp9: ignore reference segmentation map if error_resilience flag is set. Fixes ffvp9_fails_where_libvpx.succeeds.webm from ticket 3849. Signed-off-by: Michael Niedermayer (cherry picked from commit 14e3025518124f99cb0f5885feb603a9f217d25d) Signed-off-by: Michael Niedermayer --- libavcodec/vp9.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 66dddd942c..3306c57f55 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -278,7 +278,7 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f) // retain segmentation map if it doesn't update if (s->segmentation.enabled && !s->segmentation.update_map && - !s->intraonly && !s->keyframe) { + !s->intraonly && !s->keyframe && !s->errorres) { memcpy(f->segmentation_map, s->frames[LAST_FRAME].segmentation_map, sz); } @@ -1344,16 +1344,20 @@ static void decode_mode(AVCodecContext *ctx) vp56_rac_get_prob_branchy(&s->c, s->prob.segpred[s->above_segpred_ctx[col] + s->left_segpred_ctx[row7]]))) { - int pred = 8, x; - uint8_t *refsegmap = s->frames[LAST_FRAME].segmentation_map; + if (!s->errorres) { + int pred = 8, x; + uint8_t *refsegmap = s->frames[LAST_FRAME].segmentation_map; - if (!s->last_uses_2pass) - ff_thread_await_progress(&s->frames[LAST_FRAME].tf, row >> 3, 0); - for (y = 0; y < h4; y++) - for (x = 0; x < w4; x++) - pred = FFMIN(pred, refsegmap[(y + row) * 8 * s->sb_cols + x + col]); - av_assert1(pred < 8); - b->seg_id = pred; + if (!s->last_uses_2pass) + ff_thread_await_progress(&s->frames[LAST_FRAME].tf, row >> 3, 0); + for (y = 0; y < h4; y++) + for (x = 0; x < w4; x++) + pred = FFMIN(pred, refsegmap[(y + row) * 8 * s->sb_cols + x + col]); + av_assert1(pred < 8); + b->seg_id = pred; + } else { + b->seg_id = 0; + } memset(&s->above_segpred_ctx[col], 1, w4); memset(&s->left_segpred_ctx[row7], 1, h4); From 2cde388aeabcbeb69fd899c4171729ddd824be7f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 6 Mar 2015 21:07:54 -0500 Subject: [PATCH 627/822] vp9: fix segmentation map retention with threading enabled. Fixes ticket 4359. Signed-off-by: Michael Niedermayer (cherry picked from commit efff3854f05d171f5ad3e4f4206533b255a6d267) Signed-off-by: Michael Niedermayer --- libavcodec/vp9.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 3306c57f55..07d149732b 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -278,7 +278,8 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f) // retain segmentation map if it doesn't update if (s->segmentation.enabled && !s->segmentation.update_map && - !s->intraonly && !s->keyframe && !s->errorres) { + !s->intraonly && !s->keyframe && !s->errorres && + ctx->active_thread_type != FF_THREAD_FRAME) { memcpy(f->segmentation_map, s->frames[LAST_FRAME].segmentation_map, sz); } @@ -1350,9 +1351,18 @@ static void decode_mode(AVCodecContext *ctx) if (!s->last_uses_2pass) ff_thread_await_progress(&s->frames[LAST_FRAME].tf, row >> 3, 0); - for (y = 0; y < h4; y++) + for (y = 0; y < h4; y++) { + int idx_base = (y + row) * 8 * s->sb_cols + col; for (x = 0; x < w4; x++) - pred = FFMIN(pred, refsegmap[(y + row) * 8 * s->sb_cols + x + col]); + pred = FFMIN(pred, refsegmap[idx_base + x]); + if (!s->segmentation.update_map && ctx->active_thread_type == FF_THREAD_FRAME) { + // FIXME maybe retain reference to previous frame as + // segmap reference instead of copying the whole map + // into a new buffer + memcpy(&s->frames[CUR_FRAME].segmentation_map[idx_base], + &refsegmap[idx_base], w4); + } + } av_assert1(pred < 8); b->seg_id = pred; } else { From 2e5579bbb4f84fbaecfba57166506801603303e2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Mar 2015 14:30:34 +0100 Subject: [PATCH 628/822] avcodec/utils: Align YUV411 by as much as the other YUV variants Fixes out of array accesses Fixes: ffmpeg_mjpeg_crash2.avi Found-by: Thomas Lindroth Tested-by: Thomas Lindroth Signed-off-by: Michael Niedermayer (cherry picked from commit e3201c38d53d2b8b24d0bc95d726b2cb1752dc12) Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0872e32401..8eb450c845 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -375,7 +375,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, case AV_PIX_FMT_YUVJ411P: case AV_PIX_FMT_UYYVYY411: w_align = 32; - h_align = 8; + h_align = 16 * 2; break; case AV_PIX_FMT_YUV410P: if (s->codec_id == AV_CODEC_ID_SVQ1) { From 917ce36a2067c3c1a02a54bb0aeb6eff39673dd5 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 7 Mar 2015 19:36:07 +0100 Subject: [PATCH 629/822] doc: avoid the incorrect phrase 'allow to' Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 10fd7ff814f2a35b5b49a9c3b0d426ead6c7e83f) Signed-off-by: Michael Niedermayer --- doc/faq.texi | 2 +- doc/ffserver.texi | 2 +- doc/filters.texi | 2 +- doc/formats.texi | 4 ++-- doc/indevs.texi | 2 +- doc/utils.texi | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/faq.texi b/doc/faq.texi index 74c259f2bb..a9e779be7f 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -298,7 +298,7 @@ FFmpeg has a @url{http://ffmpeg.org/ffmpeg-protocols.html#concat, @code{concat}} protocol designed specifically for that, with examples in the documentation. -A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to concatenate +A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow one to concatenate video by merely concatenating the files containing them. Hence you may concatenate your multimedia files by first transcoding them to diff --git a/doc/ffserver.texi b/doc/ffserver.texi index fb90dd650d..d45a0ee8dd 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -71,7 +71,7 @@ the HTTP server (configured through the @option{Port} option), and configuration file. Each feed is associated to a file which is stored on disk. This stored -file is used to allow to send pre-recorded data to a player as fast as +file is used to send pre-recorded data to a player as fast as possible when new content is added in real-time to the stream. A "live-stream" or "stream" is a resource published by diff --git a/doc/filters.texi b/doc/filters.texi index b7a1b34d57..ec1449acfd 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3143,7 +3143,7 @@ Set number overlapping pixels for each block. Each block is of size @code{16x16}. Since the filter can be slow, you may want to reduce this value, at the cost of a less effective filter and the risk of various artefacts. -If the overlapping value doesn't allow to process the whole input width or +If the overlapping value doesn't permit processing the whole input width or height, a warning will be displayed and according borders won't be denoised. Default value is @code{15}. diff --git a/doc/formats.texi b/doc/formats.texi index 027510eb6d..910ffd2374 100644 --- a/doc/formats.texi +++ b/doc/formats.texi @@ -23,7 +23,7 @@ Reduce buffering. @item probesize @var{integer} (@emph{input}) Set probing size in bytes, i.e. the size of the data to analyze to get -stream information. A higher value will allow to detect more +stream information. A higher value will enable detecting more information in case it is dispersed into the stream, but will increase latency. Must be an integer not lesser than 32. It is 5000000 by default. @@ -63,7 +63,7 @@ Default is 0. @item analyzeduration @var{integer} (@emph{input}) Specify how many microseconds are analyzed to probe the input. A -higher value will allow to detect more accurate information, but will +higher value will enable detecting more accurate information, but will increase latency. It defaults to 5,000,000 microseconds = 5 seconds. @item cryptokey @var{hexadecimal string} (@emph{input}) diff --git a/doc/indevs.texi b/doc/indevs.texi index 93fbbe822f..e63d71bfcc 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -1,7 +1,7 @@ @chapter Input Devices @c man begin INPUT DEVICES -Input devices are configured elements in FFmpeg which allow to access +Input devices are configured elements in FFmpeg which enable accessing the data coming from a multimedia device attached to your system. When you configure your FFmpeg build, all the supported input devices diff --git a/doc/utils.texi b/doc/utils.texi index 5abfb0ccc6..05fbcedc8b 100644 --- a/doc/utils.texi +++ b/doc/utils.texi @@ -841,7 +841,7 @@ Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise. Return 1.0 if @var{x} is NAN, 0.0 otherwise. @item ld(var) -Allow to load the value of the internal variable with number +Load the value of the internal variable with number @var{var}, which was previously stored with st(@var{var}, @var{expr}). The function returns the loaded value. @@ -909,7 +909,7 @@ Compute the square root of @var{expr}. This is equivalent to Compute expression @code{1/(1 + exp(4*x))}. @item st(var, expr) -Allow to store the value of the expression @var{expr} in an internal +Store the value of the expression @var{expr} in an internal variable. @var{var} specifies the number of the variable where to store the value, and it is a value ranging from 0 to 9. The function returns the value stored in the internal variable. From d8a8b3948c2996d97958284cb780ead19165da96 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Mar 2015 23:27:43 +0100 Subject: [PATCH 630/822] avcodec/tiff: move bpp check to after "end:" This ensures that all current and future code-pathes get bpp checked Signed-off-by: Michael Niedermayer (cherry picked from commit d5e9fc782150d4596c72440a0aa02b7f4f1254b1) Signed-off-by: Michael Niedermayer --- libavcodec/tiff.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 998b836e90..a0b1836866 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -636,13 +636,6 @@ 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) { @@ -934,6 +927,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) } } end: + 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; + } bytestream2_seek(&s->gb, start, SEEK_SET); return 0; } From 5537faaf19d36a4e89b10d832c0dc2aca6171629 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 27 Feb 2015 19:00:25 +0000 Subject: [PATCH 631/822] aic: Fix decoding files with odd dimensions Normally the aic decoder finds the proper slice combination (multiple of some number less than 32) but in case of odd width, it resorts to the default values, which were actually swapped. The number of slices is modified to account for such odd width cases. CC: libav-stable@libav.org (cherry picked from commit e878ec0d47cd6228c367b2f3128b76d7523f7255) Signed-off-by: Michael Niedermayer --- libavcodec/aic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aic.c b/libavcodec/aic.c index 3963642194..674f230875 100644 --- a/libavcodec/aic.c +++ b/libavcodec/aic.c @@ -437,8 +437,8 @@ static av_cold int aic_decode_init(AVCodecContext *avctx) ctx->mb_width = FFALIGN(avctx->width, 16) >> 4; ctx->mb_height = FFALIGN(avctx->height, 16) >> 4; - ctx->num_x_slices = 16; - ctx->slice_width = ctx->mb_width / 16; + ctx->num_x_slices = (ctx->mb_width + 15) >> 4; + ctx->slice_width = 16; for (i = 1; i < 32; i++) { if (!(ctx->mb_width % i) && (ctx->mb_width / i < 32)) { ctx->slice_width = ctx->mb_width / i; From 88cc4a405a4602edf49832cccb6a4c7ffd266b2d Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 8 Mar 2015 23:31:48 +0100 Subject: [PATCH 632/822] ffmdec: fix infinite loop at EOF If EOF is reached, while skipping bytes, avio_tell(pb) won't change anymore, resulting in an infinite loop. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 6fa98822eba501a4898fdec5b75acd3026201005) Signed-off-by: Michael Niedermayer --- libavformat/ffmdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 91882b2a72..338a8502e7 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -356,7 +356,7 @@ static int ffm2_read_header(AVFormatContext *s) } /* get until end of block reached */ - while ((avio_tell(pb) % ffm->packet_size) != 0) + while ((avio_tell(pb) % ffm->packet_size) != 0 && !pb->eof_reached) avio_r8(pb); /* init packet demux */ @@ -488,7 +488,7 @@ static int ffm_read_header(AVFormatContext *s) } /* get until end of block reached */ - while ((avio_tell(pb) % ffm->packet_size) != 0) + while ((avio_tell(pb) % ffm->packet_size) != 0 && !pb->eof_reached) avio_r8(pb); /* init packet demux */ From 0746f5035e7ba5573add8bcf8c51e3307cf913f0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Mar 2015 14:41:10 +0100 Subject: [PATCH 633/822] Update for FFmpeg 2.2.14 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index f2b42fc715..42a4ee5b9e 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.13 +2.2.14 diff --git a/doc/Doxyfile b/doc/Doxyfile index b25ee35231..92ec9d190c 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.13 +PROJECT_NUMBER = 2.2.14 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 53239e50ed366f9c12ef7531e63c5c0693fed328 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Mar 2015 21:23:32 +0100 Subject: [PATCH 634/822] avformat/mov: Use sizeof(filename) instead of a literal number Signed-off-by: Michael Niedermayer (cherry picked from commit 21a53dd08dce7cc5b3fdf9c4826b4b74d8300ea0) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9a52eb0a28..d0d28bd081 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2342,9 +2342,9 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, filename[src_path - src] = 0; for (i = 1; i < ref->nlvl_from; i++) - av_strlcat(filename, "../", 1024); + av_strlcat(filename, "../", sizeof(filename)); - av_strlcat(filename, ref->path + l + 1, 1024); + av_strlcat(filename, ref->path + l + 1, sizeof(filename)); if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL)) return 0; From bf0d2ee92c33d802907e829f99c26a46578ed679 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Mar 2015 21:24:54 +0100 Subject: [PATCH 635/822] avformat/mov: Check for string truncation in mov_open_dref() Signed-off-by: Michael Niedermayer (cherry picked from commit 8003816e1619e77d8de051883264aa090e0d78cc) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index d0d28bd081..1243c354d6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2316,7 +2316,7 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, /* try relative path, we do not try the absolute because it can leak information about our system to an attacker */ if (ref->nlvl_to > 0 && ref->nlvl_from > 0) { - char filename[1024]; + char filename[1025]; const char *src_path; int i, l; @@ -2346,6 +2346,8 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, av_strlcat(filename, ref->path + l + 1, sizeof(filename)); + if (strlen(filename) + 1 == sizeof(filename)) + return AVERROR(ENOENT); if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL)) return 0; } From 0b51e0baea31213038d2e908be4ae0203140240f Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 26 Mar 2015 02:11:55 -0300 Subject: [PATCH 636/822] avutil/cpu: add missing check for mmxext to av_force_cpu_flags Reviewed-by: Michael Niedermayer Signed-off-by: James Almer (cherry picked from commit 1f5d1eed78fad63f1c80a3766d3dc2421b99104d) --- libavutil/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index f4d3d14e6c..14c28ffad3 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -49,6 +49,7 @@ static int flags, checked; void av_force_cpu_flags(int arg){ if ( (arg & ( AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_3DNOWEXT | + AV_CPU_FLAG_MMXEXT | AV_CPU_FLAG_SSE | AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_SSE2SLOW | From 0bcb669eccba63433f5e7fa0a2ca4b7bddab15ef Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Mar 2015 21:32:35 +0100 Subject: [PATCH 637/822] avformat/mov: Disallow ".." in dref unless use_absolute_path is set as this kind of allows to circumvent it to some extend. We also could add a separate parameter or value to choose this Found-by: ramiro Signed-off-by: Michael Niedermayer (cherry picked from commit 1e4d0498df6621143da1a550006ddc3526ad51cb) Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1243c354d6..5b4986cbc2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2345,6 +2345,9 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, av_strlcat(filename, "../", sizeof(filename)); av_strlcat(filename, ref->path + l + 1, sizeof(filename)); + if (!use_absolute_path) + if(strstr(ref->path + l + 1, "..") || ref->nlvl_from > 1) + return AVERROR(ENOENT); if (strlen(filename) + 1 == sizeof(filename)) return AVERROR(ENOENT); From 3ce32f640115547909e062736885d1062233a67a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 19 Mar 2015 23:28:39 +0100 Subject: [PATCH 638/822] avcodec/dnxhddec: Check that the frame is interlaced before using cur_field Fixes Ticket4227 Signed-off-by: Michael Niedermayer (cherry picked from commit 2c660e34cf3c2b77cd2bef6f292920334dfd9192) Signed-off-by: Michael Niedermayer --- libavcodec/dnxhddec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index f00d866e16..8999240c5e 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -349,7 +349,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame, int x, int dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); - if (ctx->cur_field) { + if (frame->interlaced_frame && ctx->cur_field) { dest_y += frame->linesize[0]; dest_u += frame->linesize[1]; dest_v += frame->linesize[2]; From fdb8a35b0267ada917edd56e424acacd9511cff6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 20 Mar 2015 21:28:34 +0100 Subject: [PATCH 639/822] hevc: make the crop sizes unsigned (cherry picked from commit c929659bdd7d2d5848ea52e685a3164c7b901bb0) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index 3d71871891..faedeb2790 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -283,10 +283,10 @@ typedef struct RefPicListTab { } RefPicListTab; typedef struct HEVCWindow { - int left_offset; - int right_offset; - int top_offset; - int bottom_offset; + unsigned int left_offset; + unsigned int right_offset; + unsigned int top_offset; + unsigned int bottom_offset; } HEVCWindow; typedef struct VUI { From 58e055cb262e7259a6a0c5a231ed7bfeacc8ad58 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 27 Nov 2014 15:03:35 +0100 Subject: [PATCH 640/822] avcodec/hevc_ps: More complete window reset Fixes out of array read Fixes: signal_sigsegv_35bcf26_471_cov_2806540268_CAINIT_A_SHARP_4.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 57e5812198aada016e9ba4149123c541f8c8a7ec) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index be1adb1111..aa9153f72f 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -907,10 +907,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) } av_log(s->avctx, AV_LOG_WARNING, "Displaying the whole video surface.\n"); - sps->pic_conf_win.left_offset = - sps->pic_conf_win.right_offset = - sps->pic_conf_win.top_offset = - sps->pic_conf_win.bottom_offset = 0; + memset(&sps->pic_conf_win, 0, sizeof(sps->pic_conf_win)); + memset(&sps->output_window, 0, sizeof(sps->output_window)); sps->output_width = sps->width; sps->output_height = sps->height; } From 691dbc628a43dca2f610ee8dfd448766e435c107 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 21 Mar 2015 12:54:16 +0100 Subject: [PATCH 641/822] avcodec/hevc_ps: Check cropping parameters more correctly Signed-off-by: Michael Niedermayer (cherry picked from commit 06c70d45373dedc600f28e345685b130b60203c1) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index aa9153f72f..2dad58d5c0 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -898,7 +898,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) (sps->output_window.left_offset + sps->output_window.right_offset); sps->output_height = sps->height - (sps->output_window.top_offset + sps->output_window.bottom_offset); - if (sps->output_width <= 0 || sps->output_height <= 0) { + if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset || + sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) { av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n", sps->output_width, sps->output_height); if (s->avctx->err_recognition & AV_EF_EXPLODE) { From 33877cd276f99fc234b5269d9d158ce71e50d363 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 24 Mar 2015 15:50:12 +0100 Subject: [PATCH 642/822] avcodec/msrledec: restructure msrle_decode_pal4() based on the line number instead of the pixel pointer Fixes out of array access Fixes: da14e86d8462be6493eab16bc2d40f88/asan_heap-oob_204cfd2_528_cov_340150052_COMPRESS.BMP Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit f7e1367f58263593e6cee3c282f7277d7ee9d553) Signed-off-by: Michael Niedermayer --- libavcodec/msrledec.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index 4d3da5ba17..deb6f86523 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -37,16 +37,14 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, unsigned char extra_byte, odd_pixel; unsigned char stream_byte; unsigned int pixel_ptr = 0; - int row_dec = pic->linesize[0]; - int row_ptr = (avctx->height - 1) * row_dec; - int frame_size = row_dec * avctx->height; + int line = avctx->height - 1; int i; - while (row_ptr >= 0) { + while (line >= 0 && pixel_ptr <= avctx->width) { if (bytestream2_get_bytes_left(gb) <= 0) { av_log(avctx, AV_LOG_ERROR, - "MS RLE: bytestream overrun, %d rows left\n", - row_ptr); + "MS RLE: bytestream overrun, %dx%d left\n", + avctx->width - pixel_ptr, line); return AVERROR_INVALIDDATA; } rle_code = stream_byte = bytestream2_get_byteu(gb); @@ -55,7 +53,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, stream_byte = bytestream2_get_byte(gb); if (stream_byte == 0) { /* line is done, goto the next one */ - row_ptr -= row_dec; + line--; pixel_ptr = 0; } else if (stream_byte == 1) { /* decode is done */ @@ -65,13 +63,12 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, stream_byte = bytestream2_get_byte(gb); pixel_ptr += stream_byte; stream_byte = bytestream2_get_byte(gb); - row_ptr -= stream_byte * row_dec; } else { // copy pixels from encoded stream odd_pixel = stream_byte & 1; rle_code = (stream_byte + 1) / 2; extra_byte = rle_code & 0x01; - if (row_ptr + pixel_ptr + stream_byte > frame_size || + if (pixel_ptr + 2*rle_code - odd_pixel > avctx->width || bytestream2_get_bytes_left(gb) < rle_code) { av_log(avctx, AV_LOG_ERROR, "MS RLE: frame/stream ptr just went out of bounds (copy)\n"); @@ -82,13 +79,13 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, if (pixel_ptr >= avctx->width) break; stream_byte = bytestream2_get_byteu(gb); - pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4; + pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4; pixel_ptr++; if (i + 1 == rle_code && odd_pixel) break; if (pixel_ptr >= avctx->width) break; - pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F; + pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F; pixel_ptr++; } @@ -98,7 +95,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, } } else { // decode a run of data - if (row_ptr + pixel_ptr + stream_byte > frame_size) { + if (pixel_ptr + rle_code > avctx->width + 1) { av_log(avctx, AV_LOG_ERROR, "MS RLE: frame ptr just went out of bounds (run)\n"); return AVERROR_INVALIDDATA; @@ -108,9 +105,9 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, if (pixel_ptr >= avctx->width) break; if ((i & 1) == 0) - pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4; + pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4; else - pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F; + pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F; pixel_ptr++; } } From c701506525b3e5585567303270a12d844f38c264 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 30 Mar 2015 04:37:42 +0200 Subject: [PATCH 643/822] avutil/pca: Check for av_malloc* failures Signed-off-by: Michael Niedermayer (cherry picked from commit dadc43eee4d9036aa532665a04720238cc15e922) Signed-off-by: Michael Niedermayer --- libavutil/pca.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavutil/pca.c b/libavutil/pca.c index 311b6bc9cb..a745136e1d 100644 --- a/libavutil/pca.c +++ b/libavutil/pca.c @@ -41,12 +41,20 @@ PCA *ff_pca_init(int n){ return NULL; pca= av_mallocz(sizeof(*pca)); + if (!pca) + return NULL; + pca->n= n; pca->z = av_malloc(sizeof(*pca->z) * n); pca->count=0; pca->covariance= av_calloc(n*n, sizeof(double)); pca->mean= av_calloc(n, sizeof(double)); + if (!pca->z || !pca->covariance || !pca->mean) { + ff_pca_free(pca); + return NULL; + } + return pca; } From 5b4e58ed4c3641a934b46b6e3063b4b2d5fc8bed Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Apr 2015 19:28:33 +0200 Subject: [PATCH 644/822] avcodec/h264: Fail for invalid mixed IDR / non IDR frames in slice threading mode Fixes Ticket4408 Signed-off-by: Michael Niedermayer (cherry picked from commit fc58d5c43b4c7396fc69081eb0dfe5b6a21cb10d) Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 56858f4f46..155877bf8c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5006,8 +5006,14 @@ again: ret = -1; goto end; } - if(!idr_cleared) + if(!idr_cleared) { + if (h->current_slice && (avctx->active_thread_type & FF_THREAD_SLICE)) { + av_log(h, AV_LOG_ERROR, "invalid mixed IDR / non IDR frames cannot be decoded in slice multithreading mode\n"); + ret = AVERROR_INVALIDDATA; + goto end; + } idr(h); // FIXME ensure we don't lose some frames if there is reordering + } idr_cleared = 1; h->has_recovery_point = 1; case NAL_SLICE: From 6496cbee695bbe834bcaffc0e9375d93ff77eeda Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 4 Apr 2015 18:08:23 +0200 Subject: [PATCH 645/822] avcodec/h264_refs: Do not set reference to things which dont exist Fixes deadlock Fixes Ticket4428 Fixes Ticket4429 Signed-off-by: Michael Niedermayer (cherry picked from commit 429de043202286a2b5bcc082cc02de860b734db2) Signed-off-by: Michael Niedermayer --- libavcodec/h264_refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 1cd8a6dfda..b08828c232 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -703,7 +703,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count) */ if (h->short_ref_count && h->short_ref[0] == h->cur_pic_ptr) { /* Just mark the second field valid */ - h->cur_pic_ptr->reference = PICT_FRAME; + h->cur_pic_ptr->reference |= h->picture_structure; } else if (h->cur_pic_ptr->long_ref) { av_log(h->avctx, AV_LOG_ERROR, "illegal short term reference " "assignment for second field " From e63f330a1c3c0644aaec4a66c14cdacd6bf28141 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Apr 2015 23:44:38 +0200 Subject: [PATCH 646/822] ffmpeg: Fix extradata allocation Signed-off-by: Michael Niedermayer (cherry picked from commit 4d02dfbde475d249916eb19c360e890059aa6aa5) Conflicts: ffmpeg.c --- ffmpeg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index d5667734e9..0fab24aa78 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2382,11 +2382,13 @@ static int transcode_init(void) codec->rc_max_rate = icodec->rc_max_rate; codec->rc_buffer_size = icodec->rc_buffer_size; codec->field_order = icodec->field_order; - codec->extradata = av_mallocz(extra_size); - if (!codec->extradata) { - return AVERROR(ENOMEM); + if (icodec->extradata_size) { + codec->extradata = av_mallocz(extra_size); + if (!codec->extradata) { + return AVERROR(ENOMEM); + } + memcpy(codec->extradata, icodec->extradata, icodec->extradata_size); } - memcpy(codec->extradata, icodec->extradata, icodec->extradata_size); codec->extradata_size= icodec->extradata_size; codec->bits_per_coded_sample = icodec->bits_per_coded_sample; From 3852b172e7de8fee4b78ff3f5026a9a13c7329d5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 7 Apr 2015 00:40:21 +0200 Subject: [PATCH 647/822] avcodec/h264: Fix race between slices where one overwrites data from the next Fixes non deterministic crash in ticket4408/fuzz2.264 Likely fixes other samples as well Signed-off-by: Michael Niedermayer (cherry picked from commit 43b434210e597d484aef57c4139c3126d22b7e2b) Conflicts: libavcodec/h264.h libavcodec/h264_slice.c (cherry picked from commit dbbc42858e87cdd04e6c3b7694f8b394d4bfcdc6) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 43 ++++++++++++++++++++++++++++++++++++++----- libavcodec/h264.h | 1 + 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 155877bf8c..30b20c95d2 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4635,8 +4635,17 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) for (;;) { // START_TIMER - int ret = ff_h264_decode_mb_cabac(h); - int eos; + int ret, eos; + + if (h->mb_x + h->mb_y * h->mb_width >= h->mb_index_end) { + av_log(h->avctx, AV_LOG_ERROR, "Slice overlaps next at %d\n", + h->mb_index_end); + er_add_slice(h, h->resync_mb_x, h->resync_mb_y, h->mb_x, + h->mb_y, ER_MB_ERROR); + return AVERROR_INVALIDDATA; + } + + ret = ff_h264_decode_mb_cabac(h); // STOP_TIMER("decode_mb_cabac") if (ret >= 0) @@ -4698,7 +4707,17 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) } } else { for (;;) { - int ret = ff_h264_decode_mb_cavlc(h); + int ret; + + if (h->mb_x + h->mb_y * h->mb_width >= h->mb_index_end) { + av_log(h->avctx, AV_LOG_ERROR, "Slice overlaps next at %d\n", + h->mb_index_end); + er_add_slice(h, h->resync_mb_x, h->resync_mb_y, h->mb_x, + h->mb_y, ER_MB_ERROR); + return AVERROR_INVALIDDATA; + } + + ret = ff_h264_decode_mb_cavlc(h); if (ret >= 0) ff_h264_hl_decode_mb(h); @@ -4789,19 +4808,33 @@ static int execute_decode_slices(H264Context *h, unsigned context_count) av_assert0(h->mb_y < h->mb_height); + h->mb_index_end = INT_MAX; + if (h->avctx->hwaccel || h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) return 0; if (context_count == 1) { return decode_slice(avctx, &h); } else { + int j, mb_index; av_assert0(context_count > 0); - for (i = 1; i < context_count; i++) { + for (i = 0; i < context_count; i++) { + int mb_index_end = h->mb_width * h->mb_height; hx = h->thread_context[i]; - if (CONFIG_ERROR_RESILIENCE) { + mb_index = hx->resync_mb_x + hx->resync_mb_y * h->mb_width; + if (CONFIG_ERROR_RESILIENCE && i) { hx->er.error_count = 0; } hx->x264_build = h->x264_build; + for (j = 0; j < context_count; j++) { + H264Context *sl2 = h->thread_context[j]; + int mb_index2 = sl2->resync_mb_x + sl2->resync_mb_y * h->mb_width; + + if (i==j || mb_index > mb_index2) + continue; + mb_index_end = FFMIN(mb_index_end, mb_index2); + } + hx->mb_index_end = mb_index_end; } avctx->execute(avctx, decode_slice, h->thread_context, diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 66c147340b..6a3e570b92 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -488,6 +488,7 @@ typedef struct H264Context { int mb_x, mb_y; int resync_mb_x; int resync_mb_y; + int mb_index_end; int mb_skip_run; int mb_height, mb_width; int mb_stride; From 8f026e2b388a9638c8d4ae13c44e583626c71d5c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 7 Apr 2015 02:47:36 +0200 Subject: [PATCH 648/822] avcodec/h264: finish previous slices before switching to single thread mode Fixes null pointer dereference Fixes Ticket4438 Signed-off-by: Michael Niedermayer (cherry picked from commit c4b2017ba66e1623da9f527704c61c86a6e74844) Conflicts: libavcodec/h264.c (cherry picked from commit 09cc7aee3f4d1bd1d7107d38520f782c62c14036) Conflicts: libavcodec/h264.c --- libavcodec/h264.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 30b20c95d2..61fd02fd96 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5221,6 +5221,12 @@ again: av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n"); h->ref_count[0] = h->ref_count[1] = h->list_count = 0; } else if (err == 1) { + if (context_count > 1) { + ret = execute_decode_slices(h, context_count - 1); + if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE)) + goto end; + context_count = 0; + } /* Slice could not be decoded in parallel mode, copy down * NAL unit stuff to context 0 and restart. Note that * rbsp_buffer is not transferred, but since we no longer From 83ac312c3cbfdddea25b84e5b7ea595ef073a029 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 9 Jun 2014 21:46:37 -0700 Subject: [PATCH 649/822] tests/fate.sh: report different status for different errors The order of error codes will be useful in my future fateserver patches. Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer (cherry picked from commit cc0057a31c7097839f9c4e4da61e2933b5b0e055) Signed-off-by: Timothy Gu --- tests/fate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate.sh b/tests/fate.sh index f3712911eb..38458c748c 100755 --- a/tests/fate.sh +++ b/tests/fate.sh @@ -111,8 +111,8 @@ echo ${version} >version-$slot rm -rf "${build}" *.log mkdir -p ${build} -configure >configure.log 2>&1 || fail $? "error configuring" -compile >compile.log 2>&1 || fail $? "error compiling" -fate >test.log 2>&1 || fail $? "error testing" +configure >configure.log 2>&1 || fail 3 "error configuring" +compile >compile.log 2>&1 || fail 2 "error compiling" +fate >test.log 2>&1 || fail 1 "error testing" report 0 success clean From 57f271ce4149c350e57357dadcda913164377eb5 Mon Sep 17 00:00:00 2001 From: James Almer Date: Fri, 10 Apr 2015 20:51:11 -0300 Subject: [PATCH 650/822] doc: add missing x86 cpuflags to fftools documentation Signed-off-by: James Almer (cherry picked from commit 410c93cfd5ab509d8c9f907f88ae09a87fb743e6) --- doc/fftools-common-opts.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index dcfe9b5a35..7c8ab7062c 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -225,10 +225,14 @@ Possible flags for this option are: @item sse4.1 @item sse4.2 @item avx +@item avx2 @item xop +@item fma3 @item fma4 @item 3dnow @item 3dnowext +@item bmi1 +@item bmi2 @item cmov @end table @item ARM From 733cb1c6c59d291c3a831b95bf0346d2785e8bcf Mon Sep 17 00:00:00 2001 From: James Almer Date: Sat, 11 Apr 2015 19:54:05 -0300 Subject: [PATCH 651/822] doc: add aarch64 cpuflags to fftools documentation Signed-off-by: James Almer --- doc/fftools-common-opts.texi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index 7c8ab7062c..93fbb7ccbc 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -244,6 +244,11 @@ Possible flags for this option are: @item vfpv3 @item neon @end table +@item AArch64 +@table @samp +@item vfp +@item neon +@end table @item PowerPC @table @samp @item altivec From 67a4811c88c4eaa5503cf6abea27a0e64afb6a65 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 9 Nov 2014 21:37:18 -0800 Subject: [PATCH 652/822] tests: Fix test name for pixfmts tests(cherry picked from commit e1ee0521a698809ed216e9e5c11bd2bbb466ed04) Signed-off-by: Michael Niedermayer --- tests/fate-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 48e9dd0bdc..7f88dff246 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -200,12 +200,14 @@ pixfmts(){ $showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$in_fmts pix_fmts=$(comm -12 $scale_exclude_fmts $in_fmts) + outertest=$test for pix_fmt in $pix_fmts; do test=$pix_fmt video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt done rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts + test=$outertest } mkdir -p "$outdir" From 0df90898f5a3cbbb8c664a05d69c29655ccf0a80 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 8 Apr 2015 12:29:47 +0200 Subject: [PATCH 653/822] avcodec/h264_slice: Dont reset mb_aff_frame per slice Fixes null pointer dereference Fixes Ticket4440 Signed-off-by: Michael Niedermayer (cherry picked from commit 386601286fed2dff5e1955bc21a0256f6f35ab19) Conflicts: libavcodec/h264_slice.c (cherry picked from commit ce6d38e9ed0842870f3cd5414937bb6d1f2417d9) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 61fd02fd96..f17304eaeb 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3512,6 +3512,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) int field_pic_flag, bottom_field_flag; int first_slice = h == h0 && !h0->current_slice; int frame_num, picture_structure, droppable; + int mb_aff_frame, last_mb_aff_frame; PPS *pps; h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab; @@ -3727,7 +3728,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0) } h->mb_mbaff = 0; - h->mb_aff_frame = 0; + mb_aff_frame = 0; + last_mb_aff_frame = h0->mb_aff_frame; last_pic_structure = h0->picture_structure; last_pic_droppable = h0->droppable; droppable = h->nal_ref_idc == 0; @@ -3745,12 +3747,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0) picture_structure = PICT_TOP_FIELD + bottom_field_flag; } else { picture_structure = PICT_FRAME; - h->mb_aff_frame = h->sps.mb_aff; + mb_aff_frame = h->sps.mb_aff; } } if (h0->current_slice) { if (last_pic_structure != picture_structure || - last_pic_droppable != droppable) { + last_pic_droppable != droppable || + last_mb_aff_frame != mb_aff_frame) { av_log(h->avctx, AV_LOG_ERROR, "Changing field mode (%d -> %d) between slices is not allowed\n", last_pic_structure, h->picture_structure); @@ -3766,6 +3769,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->picture_structure = picture_structure; h->droppable = droppable; h->frame_num = frame_num; + h->mb_aff_frame = mb_aff_frame; h->mb_field_decoding_flag = picture_structure != PICT_FRAME; if (h0->current_slice == 0) { From 2b69da7b5ac3b6f96847f350f3f03c30b82832e9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 8 Apr 2015 13:38:55 +0200 Subject: [PATCH 654/822] avcodec/h264: reset the counts in the correct context Fixes null pointer dereference Signed-off-by: Michael Niedermayer (cherry picked from commit 8f8d632220100bfde26587b27da73901b05cb774) Conflicts: libavcodec/h264.c --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f17304eaeb..92c9fbc9e6 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5223,7 +5223,7 @@ again: if (err < 0) { av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n"); - h->ref_count[0] = h->ref_count[1] = h->list_count = 0; + hx->ref_count[0] = hx->ref_count[1] = hx->list_count = 0; } else if (err == 1) { if (context_count > 1) { ret = execute_decode_slices(h, context_count - 1); From 684f86391d3d014790a981eb1531ae25f2f6d6a2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 9 Apr 2015 00:04:44 +0200 Subject: [PATCH 655/822] avcodec/aacdec: Fix storing state before PCE decode Fixes Ticket4460 Signed-off-by: Michael Niedermayer (cherry picked from commit e88b3852aefaa39b2170ef185ad03dda18732821) Signed-off-by: Michael Niedermayer --- libavcodec/aacdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 3586aabbe7..e6405f0f10 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -425,7 +425,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) * Save current output configuration if and only if it has been locked. */ static void push_output_configuration(AACContext *ac) { - if (ac->oc[1].status == OC_LOCKED) { + if (ac->oc[1].status == OC_LOCKED || ac->oc[0].status == OC_NONE) { ac->oc[0] = ac->oc[1]; } ac->oc[1].status = OC_NONE; From 82d3dd44aad41a12b37f8bbd01b893c7fa3e13c2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 9 Apr 2015 13:50:07 +0200 Subject: [PATCH 656/822] avcodec/h264: Be more tolerant to changing pps id between slices Fixes Ticket4446 Signed-off-by: Michael Niedermayer (cherry picked from commit 98d0c4236c7542c87f012228d3bc88aea67bddc2) Conflicts: libavcodec/h264.c (cherry picked from commit 0cd0fa9d0baabd2dc0442ed8b53ba65282733b61) Conflicts: libavcodec/h264.c --- libavcodec/h264.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 92c9fbc9e6..d2b88d1d42 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5011,9 +5011,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, continue; again: - if ( (!(avctx->active_thread_type & FF_THREAD_FRAME) || nals_needed >= nal_index) - && !h->current_slice) - h->au_pps_id = -1; /* Ignore per frame NAL unit type during extradata * parsing. Decoding slices is not possible in codec init * with frame-mt */ @@ -5059,6 +5056,10 @@ again: hx->inter_gb_ptr = &hx->gb; hx->data_partitioning = 0; + if ( nals_needed >= nal_index + || (!(avctx->active_thread_type & FF_THREAD_FRAME) && !context_count)) + h->au_pps_id = -1; + if ((err = decode_slice_header(hx, h))) break; From 800d974cc41fce40b69a6386b3ad0fd618835698 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 14:49:08 +0200 Subject: [PATCH 657/822] msrledec: use signed pixel_ptr in msrle_decode_pal4 This fixes segmentation faults, when pic->linesize[0] is negative. In that case 'line * pic->linesize[0] + pixel_ptr' is treated as unsigned and wraps around. This reverts commit 7d78a964. The problem was introduced in commit f7e1367f, which should obsolete that commit. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit ae6fd7300b4e9f81d3b5ba201096ffe7cccf26fb) Signed-off-by: Michael Niedermayer --- libavcodec/msrledec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index deb6f86523..200221a0ee 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -36,7 +36,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, unsigned char rle_code; unsigned char extra_byte, odd_pixel; unsigned char stream_byte; - unsigned int pixel_ptr = 0; + int pixel_ptr = 0; int line = avctx->height - 1; int i; From ef1d4873a058e98448b8212d95728a2fe3b7f554 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 16 Apr 2015 16:17:18 +0200 Subject: [PATCH 658/822] Update for 2.2.15 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 42a4ee5b9e..5bd8c5430c 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.14 +2.2.15 diff --git a/doc/Doxyfile b/doc/Doxyfile index 92ec9d190c..2ca490c1bf 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.14 +PROJECT_NUMBER = 2.2.15 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 3757ef017c3401c369d447324d1fce366c9c8507 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 16:58:32 +0200 Subject: [PATCH 659/822] aacdec: consistently use avctx for logging in decode_eld_specific_config ac may be NULL and then accessing ac->avctx results in a segmentation fault. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 5b75689b987e4c4dd4f34d5c8be389547e9cc701) Signed-off-by: Michael Niedermayer --- libavcodec/aacdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index e6405f0f10..47282a1731 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -881,7 +881,7 @@ static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx, if (len == 15 + 255) len += get_bits(gb, 16); if (get_bits_left(gb) < len * 8 + 4) { - av_log(ac->avctx, AV_LOG_ERROR, overread_err); + av_log(avctx, AV_LOG_ERROR, overread_err); return AVERROR_INVALIDDATA; } skip_bits_long(gb, 8 * len); From e863d17e6278248b1da991090fd5f2000b4d962b Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 19:12:02 +0200 Subject: [PATCH 660/822] aasc: return correct buffer size from aasc_decode_frame Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 0be54ad280cf114c02306b7063147e8379f8ed1e) Signed-off-by: Michael Niedermayer --- libavcodec/aasc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index 38658f86c4..a23f9b3ec3 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -137,7 +137,7 @@ static int aasc_decode_frame(AVCodecContext *avctx, return ret; /* report that the buffer was completely consumed */ - return buf_size; + return avpkt->size; } static av_cold int aasc_decode_end(AVCodecContext *avctx) From fc9514bf4dd73c85ee4b7f4dc7ca0fb4fb7ea3e1 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 20:04:54 +0200 Subject: [PATCH 661/822] aacpsy: avoid psy_band->threshold becoming NaN If band->thr is 0.0f, the division is undefined, making norm_fac not a number or infinity, which causes psy_band->threshold to become NaN. This is passed on to other variables until it finally reaches sce->sf_idx and is converted to an integer (-2147483648). This causes a segmentation fault when it is used as array index. Signed-off-by: Andreas Cadhalpun Reviewed-by: Claudio Freire Signed-off-by: Michael Niedermayer (cherry picked from commit e224aa41917454e7b5c23d9f2541425743ce595a) Signed-off-by: Michael Niedermayer --- libavcodec/aacpsy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index d2a782e8dd..a1183bea3f 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -727,7 +727,10 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel, if (active_lines > 0.0f) band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction); pe += calc_pe_3gpp(band); - band->norm_fac = band->active_lines / band->thr; + if (band->thr > 0.0f) + band->norm_fac = band->active_lines / band->thr; + else + band->norm_fac = 0.0f; norm_fac += band->norm_fac; } } From a2908d49d1e1373264d4605cbc2e62a3ab53710b Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 21:25:26 +0200 Subject: [PATCH 662/822] ac3: validate end in ff_ac3_bit_alloc_calc_mask This fixes an invalid read if end is 0: band_end = ff_ac3_bin_to_band_tab[end-1] + 1; Depending on what is before the array, this can cause stack smashing, when band_end becomes too large. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit bc4fee7f2a51635fa3c0f61d1e5164da1efeded3) Signed-off-by: Michael Niedermayer --- libavcodec/ac3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index 29e132f5d1..8d39bbe83b 100644 --- a/libavcodec/ac3.c +++ b/libavcodec/ac3.c @@ -131,6 +131,9 @@ int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, int band_start, band_end, begin, end1; int lowcomp, fastleak, slowleak; + if (end <= 0) + return AVERROR_INVALIDDATA; + /* excitation function */ band_start = ff_ac3_bin_to_band_tab[start]; band_end = ff_ac3_bin_to_band_tab[end-1] + 1; From 1c14b09caf903f2e776dcd661085db49511bf531 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 17 Apr 2015 11:58:41 +0200 Subject: [PATCH 663/822] avcodec/atrac3plusdsp: fix on stack alignment Fixes fate failure on ARM (cherry picked from commit 38f67260684aec8a02d87ab4056b1a1fbf964c03) Signed-off-by: Michael Niedermayer --- libavcodec/atrac3plusdsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c index 3522af1e5a..3c68f74d25 100644 --- a/libavcodec/atrac3plusdsp.c +++ b/libavcodec/atrac3plusdsp.c @@ -599,8 +599,8 @@ void ff_atrac3p_ipqf(FFTContext *dct_ctx, Atrac3pIPQFChannelCtx *hist, const float *in, float *out) { int i, s, sb, t, pos_now, pos_next; - DECLARE_ALIGNED(32, float, idct_in)[ATRAC3P_SUBBANDS]; - DECLARE_ALIGNED(32, float, idct_out)[ATRAC3P_SUBBANDS]; + LOCAL_ALIGNED(32, float, idct_in, [ATRAC3P_SUBBANDS]); + LOCAL_ALIGNED(32, float, idct_out, [ATRAC3P_SUBBANDS]); memset(out, 0, ATRAC3P_FRAME_SAMPLES * sizeof(*out)); From bac0850fbf870d4354d0f68840c0b1c9c1425c4a Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Fri, 10 Apr 2015 19:04:51 +0200 Subject: [PATCH 664/822] matroskadec: fix crash when parsing invalid mkv CC: libav-stable@libav.org Signed-off-by: Anton Khirnov (cherry picked from commit b8d7f3186e86234f6255f5e8ee9e98573b4d9a6e) Signed-off-by: Anton Khirnov (cherry picked from commit 3e1c9da38b849ce2982b516004370081fdd89ed0) Signed-off-by: Anton Khirnov Conflicts: libavformat/matroskadec.c --- libavformat/matroskadec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 22902e0ef7..ad83af4b11 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1412,8 +1412,12 @@ static int matroska_read_header(AVFormatContext *s) matroska->ctx = s; /* First read the EBML header. */ - if (ebml_parse(matroska, ebml_syntax, &ebml) - || ebml.version > EBML_VERSION || ebml.max_size > sizeof(uint64_t) + if (ebml_parse(matroska, ebml_syntax, &ebml) || !ebml.doctype) { + av_log(matroska->ctx, AV_LOG_ERROR, "EBML header parsing failed\n"); + ebml_free(ebml_syntax, &ebml); + return AVERROR_INVALIDDATA; + } + if (ebml.version > EBML_VERSION || ebml.max_size > sizeof(uint64_t) || ebml.id_length > sizeof(uint32_t) || ebml.doctype_version > 2) { av_log(matroska->ctx, AV_LOG_ERROR, "EBML header using unsupported features\n" From 941972d9e9806e30f978e8fd033671fd30a80a07 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Thu, 16 Apr 2015 19:12:02 +0200 Subject: [PATCH 665/822] aasc: return correct buffer size from aasc_decode_frame CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit 8fc8024ea56e814cd257d5fe27b21a865080782f) Signed-off-by: Anton Khirnov (cherry picked from commit 0d3a7dd26490156b607541dd2e1faeaa0fc61a88) Signed-off-by: Anton Khirnov --- libavcodec/aasc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index 468e39440a..1e457ce962 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -97,7 +97,7 @@ static int aasc_decode_frame(AVCodecContext *avctx, return ret; /* report that the buffer was completely consumed */ - return buf_size; + return avpkt->size; } static av_cold int aasc_decode_end(AVCodecContext *avctx) From d0e66cb1c7cf2a9ef12963cdc6fd49a35599a9dd Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 18 Apr 2015 20:29:13 +0200 Subject: [PATCH 666/822] alsdec: limit avctx->bits_per_raw_sample to 32 avctx->bits_per_raw_sample is used in get_sbits_long, which only supports up to 32 bits. CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit e191aaca44b986816695e3b7ecfae64697fd6631) Signed-off-by: Anton Khirnov (cherry picked from commit 97010c74cbff177b58daf9a092b4e37a7da26f85) Signed-off-by: Anton Khirnov --- libavcodec/alsdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f7dee7de12..31636df522 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1636,6 +1636,12 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->sample_fmt = sconf->resolution > 1 ? AV_SAMPLE_FMT_S32 : AV_SAMPLE_FMT_S16; avctx->bits_per_raw_sample = (sconf->resolution + 1) * 8; + if (avctx->bits_per_raw_sample > 32) { + av_log(avctx, AV_LOG_ERROR, "Bits per raw sample %d larger than 32.\n", + avctx->bits_per_raw_sample); + ret = AVERROR_INVALIDDATA; + goto fail; + } } // set maximum Rice parameter for progressive decoding based on resolution From b0b92ee04d1ee49a5d8b1aca718ea7d7d44932aa Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 21 Apr 2015 18:43:55 +0200 Subject: [PATCH 667/822] aacpsy: correct calculation of minath in psy_3gpp_init The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD. This patch uses the first order approximation to determine it. For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638) not the one at 3410 (-5.24237967). CC: libav-stabl@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit 110f7f35fb615b97d983b1c6c6a714fddd28bcbe) Signed-off-by: Anton Khirnov (cherry picked from commit 7b66cf5ce7fdb8b3fa13459aab3f4d6ab559f1ea) Signed-off-by: Anton Khirnov --- libavcodec/aacpsy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index 66cf6d5f40..ee465a6c45 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -307,7 +307,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) { ctx->bitres.size = 6144 - pctx->frame_bits; ctx->bitres.size -= ctx->bitres.size % 8; pctx->fill_level = ctx->bitres.size; - minath = ath(3410, ATH_ADD); + minath = ath(3410 - 0.733 * ATH_ADD, ATH_ADD); for (j = 0; j < 2; j++) { AacPsyCoeffs *coeffs = pctx->psy_coef[j]; const uint8_t *band_sizes = ctx->bands[j]; From d36d3ae02ca7d535de2b26fa0b3ab44387d19b6a Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 21 Apr 2015 19:28:30 +0200 Subject: [PATCH 668/822] alsdec: check sample pointer range in revert_channel_correlation Also change the type of begin, end and smp to ptrdiff_t to make the comparison well-defined. CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit 94bb1ce882a12b6d7a1fa32715a68121b39ee838) Signed-off-by: Anton Khirnov (cherry picked from commit 41a89cba6086de2bd24f9ec7e21200fa162505e9) Signed-off-by: Anton Khirnov --- libavcodec/alsdec.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 31636df522..6b0eb22cd0 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1219,6 +1219,7 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, ALSChannelData *ch = cd[c]; unsigned int dep = 0; unsigned int channels = ctx->avctx->channels; + unsigned int channel_size = ctx->sconf.frame_length + ctx->sconf.max_order; if (reverted[c]) return 0; @@ -1250,9 +1251,9 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, dep = 0; while (!ch[dep].stop_flag) { - unsigned int smp; - unsigned int begin = 1; - unsigned int end = bd->block_length - 1; + ptrdiff_t smp; + ptrdiff_t begin = 1; + ptrdiff_t end = bd->block_length - 1; int64_t y; int32_t *master = ctx->raw_samples[ch[dep].master_channel] + offset; @@ -1266,6 +1267,15 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, end -= t; } + if (FFMIN(begin - 1, begin - 1 + t) < ctx->raw_buffer - master || + FFMAX(end + 1, end + 1 + t) > ctx->raw_buffer + channels * channel_size - master) { + av_log(ctx->avctx, AV_LOG_ERROR, + "sample pointer range [%p, %p] not contained in raw_buffer [%p, %p].\n", + master + FFMIN(begin - 1, begin - 1 + t), master + FFMAX(end + 1, end + 1 + t), + ctx->raw_buffer, ctx->raw_buffer + channels * channel_size); + return AVERROR_INVALIDDATA; + } + for (smp = begin; smp < end; smp++) { y = (1 << 6) + MUL64(ch[dep].weighting[0], master[smp - 1 ]) + @@ -1278,6 +1288,16 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, bd->raw_samples[smp] += y >> 7; } } else { + + if (begin - 1 < ctx->raw_buffer - master || + end + 1 > ctx->raw_buffer + channels * channel_size - master) { + av_log(ctx->avctx, AV_LOG_ERROR, + "sample pointer range [%p, %p] not contained in raw_buffer [%p, %p].\n", + master + begin - 1, master + end + 1, + ctx->raw_buffer, ctx->raw_buffer + channels * channel_size); + return AVERROR_INVALIDDATA; + } + for (smp = begin; smp < end; smp++) { y = (1 << 6) + MUL64(ch[dep].weighting[0], master[smp - 1]) + From eaa9693fed36c29dfbac896946de31eb186ac5d0 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 22 Apr 2015 16:03:41 +0200 Subject: [PATCH 669/822] alsdec: only adapt order for positive max_order For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1) CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit 60f1cc4a1ffcbf24acbb543988ceeaec76b70818) Signed-off-by: Anton Khirnov (cherry picked from commit 378ee3bad5b99e8f90864af9bc851590e0f64825) Signed-off-by: Anton Khirnov --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 6b0eb22cd0..92c3b16929 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -661,7 +661,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) if (!sconf->rlslms) { - if (sconf->adapt_order) { + if (sconf->adapt_order && sconf->max_order) { int opt_order_length = av_ceil_log2(av_clip((bd->block_length >> 3) - 1, 2, sconf->max_order + 1)); *bd->opt_order = get_bits(gb, opt_order_length); From 645bc997722e5d29a5b874a29fbf857082e09c0a Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 18 Apr 2015 20:29:13 +0200 Subject: [PATCH 670/822] alsdec: limit avctx->bits_per_raw_sample to 32 avctx->bits_per_raw_sample is used in get_sbits_long, which only supports up to 32 bits. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 4c2b88678b436f59132386d9be2fc143e3ee480d) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 89cc8a6230..f4715477e4 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1660,6 +1660,12 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->sample_fmt = sconf->resolution > 1 ? AV_SAMPLE_FMT_S32 : AV_SAMPLE_FMT_S16; avctx->bits_per_raw_sample = (sconf->resolution + 1) * 8; + if (avctx->bits_per_raw_sample > 32) { + av_log(avctx, AV_LOG_ERROR, "Bits per raw sample %d larger than 32.\n", + avctx->bits_per_raw_sample); + ret = AVERROR_INVALIDDATA; + goto fail; + } } // set maximum Rice parameter for progressive decoding based on resolution From f0bf5c538a855ba92a5fc90a364411d892493dec Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 18 Apr 2015 18:31:36 +0200 Subject: [PATCH 671/822] alsdec: ensure channel reordering is reversible If the same idx is used for more than one i, at least one entry in sconf->chan_pos remains uninitialized. This can cause segmentation faults. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit ef16501aebed43e34a3721336e8bee732eca2877) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f4715477e4..c56c4c502f 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -355,11 +355,15 @@ static av_cold int read_specific_config(ALSDecContext *ctx) ctx->cs_switch = 1; + for (i = 0; i < avctx->channels; i++) { + sconf->chan_pos[i] = -1; + } + for (i = 0; i < avctx->channels; i++) { int idx; idx = get_bits(&gb, chan_pos_bits); - if (idx >= avctx->channels) { + if (idx >= avctx->channels || sconf->chan_pos[idx] != -1) { av_log(avctx, AV_LOG_WARNING, "Invalid channel reordering.\n"); ctx->cs_switch = 0; break; From f0cfa5d98a69931155b44269e56a7a330f33d7a8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 18 Apr 2015 20:50:23 +0200 Subject: [PATCH 672/822] avcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays never contain random data Signed-off-by: Michael Niedermayer (cherry picked from commit 7e104647a3556fc61a139483cee1cb7dfa2dc5bd) Conflicts: libavcodec/alsdec.c --- libavcodec/alsdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index c56c4c502f..abced6126d 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1732,9 +1732,9 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate and assign channel data buffer for mcc mode if (sconf->mc_coding) { - ctx->chan_data_buffer = av_malloc(sizeof(*ctx->chan_data_buffer) * + ctx->chan_data_buffer = av_mallocz(sizeof(*ctx->chan_data_buffer) * num_buffers * num_buffers); - ctx->chan_data = av_malloc(sizeof(*ctx->chan_data) * + ctx->chan_data = av_mallocz(sizeof(*ctx->chan_data) * num_buffers); ctx->reverted_channels = av_malloc(sizeof(*ctx->reverted_channels) * num_buffers); From deb0f487bdd7f989a68a286d7ac1e33045a6eda0 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 18 Apr 2015 20:09:28 +0200 Subject: [PATCH 673/822] alsdec: validate time diff index If begin is smaller than t, the subtraction 'begin -= t' wraps around, because begin is unsigned. The same applies for end < t. This causes segmentation faults. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit faf9fe2c224ea81a98afd53e2f0be0a2e13aeca9) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index abced6126d..d557759142 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1286,8 +1286,16 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, if (ch[dep].time_diff_sign) { t = -t; + if (t > 0 && begin < t) { + av_log(ctx->avctx, AV_LOG_ERROR, "begin %u smaller than time diff index %d.\n", begin, t); + return AVERROR_INVALIDDATA; + } begin -= t; } else { + if (t > 0 && end < t) { + av_log(ctx->avctx, AV_LOG_ERROR, "end %u smaller than time diff index %d.\n", end, t); + return AVERROR_INVALIDDATA; + } end -= t; } From 3a0a2c2586cdd2dc986a52ba2b668ccce805b901 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 21 Apr 2015 19:25:50 +0200 Subject: [PATCH 674/822] alsdec: check sample pointer range in revert_channel_correlation Also change the type of begin, end and smp to ptrdiff_t to make the comparison well-defined. Signed-off-by: Andreas Cadhalpun Reviewed-by: Thilo Borgmann Signed-off-by: Michael Niedermayer (cherry picked from commit afc7748d1f6abc4b3b1cc957b0fa6941837db3d0) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index d557759142..1cd55ea923 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1242,6 +1242,7 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, ALSChannelData *ch = cd[c]; unsigned int dep = 0; unsigned int channels = ctx->avctx->channels; + unsigned int channel_size = ctx->sconf.frame_length + ctx->sconf.max_order; if (reverted[c]) return 0; @@ -1272,9 +1273,9 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, bd->raw_samples = ctx->raw_samples[c] + offset; for (dep = 0; !ch[dep].stop_flag; dep++) { - unsigned int smp; - unsigned int begin = 1; - unsigned int end = bd->block_length - 1; + ptrdiff_t smp; + ptrdiff_t begin = 1; + ptrdiff_t end = bd->block_length - 1; int64_t y; int32_t *master = ctx->raw_samples[ch[dep].master_channel] + offset; @@ -1286,19 +1287,28 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, if (ch[dep].time_diff_sign) { t = -t; - if (t > 0 && begin < t) { - av_log(ctx->avctx, AV_LOG_ERROR, "begin %u smaller than time diff index %d.\n", begin, t); + if (begin < t) { + av_log(ctx->avctx, AV_LOG_ERROR, "begin %td smaller than time diff index %d.\n", begin, t); return AVERROR_INVALIDDATA; } begin -= t; } else { - if (t > 0 && end < t) { - av_log(ctx->avctx, AV_LOG_ERROR, "end %u smaller than time diff index %d.\n", end, t); + if (end < t) { + av_log(ctx->avctx, AV_LOG_ERROR, "end %td smaller than time diff index %d.\n", end, t); return AVERROR_INVALIDDATA; } end -= t; } + if (FFMIN(begin - 1, begin - 1 + t) < ctx->raw_buffer - master || + FFMAX(end + 1, end + 1 + t) > ctx->raw_buffer + channels * channel_size - master) { + av_log(ctx->avctx, AV_LOG_ERROR, + "sample pointer range [%p, %p] not contained in raw_buffer [%p, %p].\n", + master + FFMIN(begin - 1, begin - 1 + t), master + FFMAX(end + 1, end + 1 + t), + ctx->raw_buffer, ctx->raw_buffer + channels * channel_size); + return AVERROR_INVALIDDATA; + } + for (smp = begin; smp < end; smp++) { y = (1 << 6) + MUL64(ch[dep].weighting[0], master[smp - 1 ]) + @@ -1311,6 +1321,16 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, bd->raw_samples[smp] += y >> 7; } } else { + + if (begin - 1 < ctx->raw_buffer - master || + end + 1 > ctx->raw_buffer + channels * channel_size - master) { + av_log(ctx->avctx, AV_LOG_ERROR, + "sample pointer range [%p, %p] not contained in raw_buffer [%p, %p].\n", + master + begin - 1, master + end + 1, + ctx->raw_buffer, ctx->raw_buffer + channels * channel_size); + return AVERROR_INVALIDDATA; + } + for (smp = begin; smp < end; smp++) { y = (1 << 6) + MUL64(ch[dep].weighting[0], master[smp - 1]) + From e93c46b3ccc1f30cd14bac6f3e4f6e4a831559c1 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 22 Apr 2015 16:03:41 +0200 Subject: [PATCH 675/822] alsdec: only adapt order for positive max_order For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1) Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 58d605ee9b3277289278dc40e022311f8e083833) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 1cd55ea923..b5e748dee6 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -680,7 +680,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) if (!sconf->rlslms) { - if (sconf->adapt_order) { + if (sconf->adapt_order && sconf->max_order) { int opt_order_length = av_ceil_log2(av_clip((bd->block_length >> 3) - 1, 2, sconf->max_order + 1)); *bd->opt_order = get_bits(gb, opt_order_length); From 1f3ca53b8ae32e30e661fdaa1f1a04bed3f95640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 19 Jan 2015 22:56:59 +0100 Subject: [PATCH 676/822] tests: drop bc dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already have a dependency on awk and bc is sometimes not found in the base system. Signed-off-by: Martin Storsjö (cherry picked from commit a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6) Conflicts: doc/platform.texi Signed-off-by: Timothy Gu --- doc/platform.texi | 4 +--- tests/fate-run.sh | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/platform.texi b/doc/platform.texi index f5bfd256c7..4a33cba2e9 100644 --- a/doc/platform.texi +++ b/doc/platform.texi @@ -121,8 +121,6 @@ You will need the following prerequisites: (if using MSVC 2012 or earlier) @item @uref{http://www.mingw.org/, MSYS} @item @uref{http://yasm.tortall.net/, YASM} -@item @uref{http://gnuwin32.sourceforge.net/packages/bc.htm, bc for Windows} if -you want to run @uref{fate.html, FATE}. @end itemize To set up a proper environment in MSYS, you need to run @code{msys.bat} from @@ -269,7 +267,7 @@ binutils, gcc4-core, make, git, mingw-runtime, texi2html In order to run FATE you will also need the following "Utils" packages: @example -bc, diffutils +diffutils @end example If you want to build FFmpeg with additional libraries, download Cygwin diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 7f88dff246..8958e92f18 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -38,7 +38,7 @@ target_path(){ # $1=value1, $2=value2, $3=threshold # prints 0 if absolute difference between value1 and value2 is <= threshold compare(){ - echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | bc + awk "BEGIN { v = $1 - $2; printf ((v < 0 ? -v : v) > $3) }" } do_tiny_psnr(){ From 4a620243b9618a75d3edbb436e102e944b55cede Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 25 Feb 2015 15:07:18 +0100 Subject: [PATCH 677/822] lavfi/fade: Do not overread input buffer. (cherry picked from commit ab3ff19f08b7a83e320c39ab066f289c242b8030) --- libavfilter/vf_fade.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index cc10b122ca..6283f3ed06 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -138,7 +138,9 @@ static int config_props(AVFilterLink *inlink) s->hsub = pixdesc->log2_chroma_w; s->vsub = pixdesc->log2_chroma_h; - s->bpp = av_get_bits_per_pixel(pixdesc) >> 3; + s->bpp = pixdesc->flags & AV_PIX_FMT_FLAG_PLANAR ? + 1 : + av_get_bits_per_pixel(pixdesc) >> 3; s->alpha &= !!(pixdesc->flags & AV_PIX_FMT_FLAG_ALPHA); s->is_packed_rgb = ff_fill_rgba_map(s->rgba_map, inlink->format) >= 0; From 891ed1184e49bc7944311302d9ece01e87c188a8 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Sun, 8 Mar 2015 21:08:16 +0000 Subject: [PATCH 678/822] libvpx: Fix mixed use of av_malloc() and av_reallocp() This buffer is resized when vpx_codec_get_cx_data() returns a VPX_CODEC_STATS_PKT packet. CC: libav-stable@libav.org Signed-off-by: Vittorio Giovara (cherry picked from commit 7244cefd6e6ba7258cb022dfd7a284099d88a3e8) Signed-off-by: Reinhard Tartler --- libavcodec/libvpxenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index dc1ddc3dc9..ba14b1d069 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -291,7 +291,7 @@ static av_cold int vpx_init(AVCodecContext *avctx, if (enccfg.g_pass == VPX_RC_FIRST_PASS) enccfg.g_lag_in_frames = 0; else if (enccfg.g_pass == VPX_RC_LAST_PASS) { - int decode_size; + int decode_size, ret; if (!avctx->stats_in) { av_log(avctx, AV_LOG_ERROR, "No stats file for second pass\n"); @@ -299,12 +299,12 @@ static av_cold int vpx_init(AVCodecContext *avctx, } ctx->twopass_stats.sz = strlen(avctx->stats_in) * 3 / 4; - ctx->twopass_stats.buf = av_malloc(ctx->twopass_stats.sz); - if (!ctx->twopass_stats.buf) { + ret = av_reallocp(&ctx->twopass_stats.buf, ctx->twopass_stats.sz); + if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Stat buffer alloc (%zu bytes) failed\n", ctx->twopass_stats.sz); - return AVERROR(ENOMEM); + return ret; } decode_size = av_base64_decode(ctx->twopass_stats.buf, avctx->stats_in, ctx->twopass_stats.sz); From c7a983762ab40bca4f85be64995d5398a4307aa5 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 9 Mar 2015 19:24:09 +0100 Subject: [PATCH 679/822] roqvideoenc: set enc->avctx in roq_encode_init So far it is only set in roq_encode_frame, but it is used in roq_encode_end to free the coded_frame. This currently segfaults if roq_encode_frame is not called between roq_encode_init and roq_encode_end. CC:libav-stable@libav.org Signed-off-by: Andreas Cadhalpun Signed-off-by: Anton Khirnov (cherry picked from commit 9f6c36d961d27283808310e3ca1d8390b55fce9b) Signed-off-by: Reinhard Tartler --- libavcodec/roqvideoenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index af0089fb7f..871371be96 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -959,6 +959,8 @@ static av_cold int roq_encode_init(AVCodecContext *avctx) av_lfg_init(&enc->randctx, 1); + enc->avctx = avctx; + enc->framesSinceKeyframe = 0; if ((avctx->width & 0xf) || (avctx->height & 0xf)) { av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n"); From 987a8f8514e07aba8136d491949d0b8d6bb183f9 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 16 Mar 2015 11:26:48 +0100 Subject: [PATCH 680/822] x86: Put COPY3_IF_LT under HAVE_6REGS It uses 6 registers, unbreaks building on hardened x86 system. Bug-Id: gentoo/541930 CC: libav-stable@libav.org (cherry picked from commit 2af720fe5f0418612a8fc26b0147a0e10414fcbe) Signed-off-by: Reinhard Tartler --- libavcodec/x86/mathops.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h index a62094ee97..2c04d9d1bd 100644 --- a/libavcodec/x86/mathops.h +++ b/libavcodec/x86/mathops.h @@ -23,7 +23,9 @@ #define AVCODEC_X86_MATHOPS_H #include "config.h" + #include "libavutil/common.h" +#include "libavutil/x86/asm.h" #if HAVE_INLINE_ASM @@ -88,6 +90,7 @@ static inline av_const int mid_pred(int a, int b, int c) return i; } +#if HAVE_6REGS #define COPY3_IF_LT(x, y, a, b, c, d)\ __asm__ volatile(\ "cmpl %0, %3 \n\t"\ @@ -97,6 +100,8 @@ __asm__ volatile(\ : "+&r" (x), "+&r" (a), "+r" (c)\ : "r" (y), "r" (b), "r" (d)\ ); +#endif /* HAVE_6REGS */ + #endif /* HAVE_I686 */ #define MASK_ABS(mask, level) \ From 8b9d0f5d3aceb67d472d190db53a21177fea9275 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 13 Mar 2015 19:45:14 +0000 Subject: [PATCH 681/822] mov: Fix little endian audio detection Set this field to TRUE if the audio component is to operate on little-endian data, and FALSE otherwise. However TRUE and FALSE are not defined. Since this flag is just a boolean, interpret all values except for 0 as little endian. Sample-Id: 64bit_FLOAT_Little_Endian.mov (cherry picked from commit 8ae4d4e117626313e0b7df746e82de84d00d160a) Signed-off-by: Reinhard Tartler --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 5ef343eadc..4f0062d08f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -816,7 +816,7 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; st = c->fc->streams[c->fc->nb_streams-1]; - little_endian = avio_rb16(pb); + little_endian = !!avio_rb16(pb); av_dlog(c->fc, "enda %d\n", little_endian); if (little_endian == 1) { switch (st->codec->codec_id) { From 1f1686615c20982a68b2d8db3ff109834a260d27 Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sat, 11 Apr 2015 00:54:10 +0300 Subject: [PATCH 682/822] rtpenc_jpeg: Handle case of picture dimensions not dividing by 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the calculation of the number of needed blocks to make sure that ALL pixels are represented by the result. Signed-off-by: Martin Storsjö (cherry picked from commit 4415d0f3bbaeb287327ef101ae98d727a69d9af1) Signed-off-by: Reinhard Tartler --- libavformat/rtpenc_jpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c index 04df6583df..0ceb091836 100644 --- a/libavformat/rtpenc_jpeg.c +++ b/libavformat/rtpenc_jpeg.c @@ -40,8 +40,8 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size) s->timestamp = s->cur_timestamp; /* convert video pixel dimensions from pixels to blocks */ - w = s1->streams[0]->codec->width >> 3; - h = s1->streams[0]->codec->height >> 3; + w = (s1->streams[0]->codec->width + 7) >> 3; + h = (s1->streams[0]->codec->height + 7) >> 3; /* check if pixel format is not the normal 420 case */ if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ422P) { From 4c4cc9b27b69a86e405fd7612aa0a62f3b62b027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 24 Apr 2015 12:38:09 +0300 Subject: [PATCH 683/822] rtsp: Make sure we don't write too many transport entries into a fixed-size array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit f77c9d71615e17414aacbb1720693b800a5a32d3) Signed-off-by: Reinhard Tartler --- libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b95be46f4f..6f7d7751d9 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -904,6 +904,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) p++; reply->nb_transports++; + if (reply->nb_transports >= RTSP_MAX_TRANSPORTS) + break; } } From feedde4d8702d554a7f46de824a887fe4d75a714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Tue, 28 Apr 2015 10:20:33 +0200 Subject: [PATCH 684/822] mpegts: Update the PSI/SI table only if the version change If a PAT is finished while a PMT section filter is opened but not yet finished, the PMT section filter is closed and all the received data is discarded. This is usually not an issue but some multiplexers (With very quick PAT/PMT repetition settings) consistently emit a PMT section start, then a PAT, and then the rest of the PMT, causing the aforementioned behavior to result in no PMT being finished. In the most pathologic situation the stream information are lost and the probe fallback miscategorizes subtitles as mp3 audio. Avoid the issue through eliminating redundant PSI/SI table updates by checking their version field, which is required by the standard to be incremented on every change no matter how minor. CC: libav-stable@libav.org Signed-off-by: Luca Barbato (cherry picked from commit 844201e35fe575710be8218d45828df49b77f205) Signed-off-by: Reinhard Tartler Conflicts: libavformat/mpegts.c --- libavformat/mpegts.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 3f828b4f26..88bef79db0 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -66,6 +66,7 @@ typedef void SetServiceCallback(void *opaque, int ret); typedef struct MpegTSSectionFilter { int section_index; int section_h_size; + int last_ver; uint8_t *section_buf; unsigned int check_crc:1; unsigned int end_of_section_reached:1; @@ -340,6 +341,8 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int sec->opaque = opaque; sec->section_buf = av_malloc(MAX_SECTION_SIZE); sec->check_crc = check_crc; + sec->last_ver = -1; + if (!sec->section_buf) { av_free(filter); return NULL; @@ -1186,6 +1189,7 @@ static int mp4_read_od(AVFormatContext *s, const uint8_t *buf, unsigned size, static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; + MpegTSSectionFilter *tssf = &filter->u.section_filter; SectionHeader h; const uint8_t *p, *p_end; AVIOContext pb; @@ -1200,6 +1204,9 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_le return; if (h.tid != M4OD_TID) return; + if (h.version == tssf->last_ver) + return; + tssf->last_ver = h.version; mp4_read_od(s, p, (unsigned)(p_end - p), mp4_descr, &mp4_descr_count, MAX_MP4_DESCR_COUNT); @@ -1374,6 +1381,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; + MpegTSSectionFilter *tssf = &filter->u.section_filter; SectionHeader h1, *h = &h1; PESContext *pes; AVStream *st; @@ -1393,6 +1401,9 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len p = section; if (parse_section_header(h, &p, p_end) < 0) return; + if (h->version == tssf->last_ver) + return; + tssf->last_ver = h->version; av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d\n", h->id, h->sec_num, h->last_sec_num); @@ -1519,6 +1530,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; + MpegTSSectionFilter *tssf = &filter->u.section_filter; SectionHeader h1, *h = &h1; const uint8_t *p, *p_end; int sid, pmt_pid; @@ -1532,6 +1544,9 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (h->tid != PAT_TID) return; + if (h->version == tssf->last_ver) + return; + tssf->last_ver = h->version; clear_programs(ts); for(;;) { @@ -1562,6 +1577,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; + MpegTSSectionFilter *tssf = &filter->u.section_filter; SectionHeader h1, *h = &h1; const uint8_t *p, *p_end, *desc_list_end, *desc_end; int onid, val, sid, desc_list_len, desc_tag, desc_len, service_type; @@ -1576,6 +1592,10 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (h->tid != SDT_TID) return; + if (h->version == tssf->last_ver) + return; + tssf->last_ver = h->version; + onid = get16(&p, p_end); if (onid < 0) return; From e3c4eb87e4d9650d76f6d8d790a9b749b325e973 Mon Sep 17 00:00:00 2001 From: Nidhi Makhijani Date: Mon, 14 Jul 2014 11:52:44 +0530 Subject: [PATCH 685/822] avpacket: Check for and return errors in ff_interleave_add_packet() Signed-off-by: Diego Biurrun (cherry picked from commit 324ff59444ff5470bb325ff1e2be7c4b054fc944) Signed-off-by: Reinhard Tartler --- libavformat/audiointerleave.c | 8 +++++--- libavformat/internal.h | 4 ++-- libavformat/mux.c | 20 +++++++++++++++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c index e4cde9d0aa..e49c77fe0b 100644 --- a/libavformat/audiointerleave.c +++ b/libavformat/audiointerleave.c @@ -99,7 +99,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *)) { - int i; + int i, ret; if (pkt) { AVStream *st = s->streams[pkt->stream_index]; @@ -116,7 +116,8 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt // rewrite pts and dts to be decoded time line position pkt->pts = pkt->dts = aic->dts; aic->dts += pkt->duration; - ff_interleave_add_packet(s, pkt, compare_ts); + if ((ret = ff_interleave_add_packet(s, pkt, compare_ts)) < 0) + return ret; } pkt = NULL; } @@ -126,7 +127,8 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { AVPacket new_pkt; while (interleave_new_audio_packet(s, &new_pkt, i, flush)) - ff_interleave_add_packet(s, &new_pkt, compare_ts); + if ((ret = ff_interleave_add_packet(s, &new_pkt, compare_ts)) < 0) + return ret; } } diff --git a/libavformat/internal.h b/libavformat/internal.h index 0e7eb36e32..2824436286 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -87,8 +87,8 @@ void ff_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i * Add packet to AVFormatContext->packet_buffer list, determining its * interleaved position using compare() function argument. */ -void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, - int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)); +int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, + int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)); void ff_read_frame_flush(AVFormatContext *s); diff --git a/libavformat/mux.c b/libavformat/mux.c index 59f9c42cf1..8466605efb 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -477,12 +477,15 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt) return ret; } -void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, - int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)) +int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, + int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)) { + int ret; AVPacketList **next_point, *this_pktl; this_pktl = av_mallocz(sizeof(AVPacketList)); + if (!this_pktl) + return AVERROR(ENOMEM); this_pktl->pkt = *pkt; #if FF_API_DESTRUCT_PACKET FF_DISABLE_DEPRECATION_WARNINGS @@ -490,7 +493,11 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif pkt->buf = NULL; - av_dup_packet(&this_pktl->pkt); // duplicate the packet if it uses non-alloced memory + // Duplicate the packet if it uses non-allocated memory + if ((ret = av_dup_packet(&this_pktl->pkt)) < 0) { + av_free(this_pktl); + return ret; + } if (s->streams[pkt->stream_index]->last_in_packet_buffer) { next_point = &(s->streams[pkt->stream_index]->last_in_packet_buffer->next); @@ -515,6 +522,8 @@ next_non_null: s->streams[pkt->stream_index]->last_in_packet_buffer = *next_point = this_pktl; + + return 0; } static int interleave_compare_dts(AVFormatContext *s, AVPacket *next, @@ -535,10 +544,11 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, { AVPacketList *pktl; int stream_count = 0; - int i; + int i, ret; if (pkt) { - ff_interleave_add_packet(s, pkt, interleave_compare_dts); + if ((ret = ff_interleave_add_packet(s, pkt, interleave_compare_dts)) < 0) + return ret; } if (s->max_interleave_delta > 0 && s->packet_buffer && !flush) { From 296d70f58517d6702bfda32178c1e395bca9665e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 1 May 2015 23:55:42 +0100 Subject: [PATCH 686/822] mux: Do not leave stale side data pointers in ff_interleave_add_packet() Signed-off-by: Michael Niedermayer Signed-off-by: Vittorio Giovara (cherry picked from commit 386e80610de282c92ad5897683ccaf2675766ac5) Signed-off-by: Reinhard Tartler --- libavformat/mux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mux.c b/libavformat/mux.c index 8466605efb..e4b614467f 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -493,6 +493,8 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif pkt->buf = NULL; + pkt->side_data = NULL; + pkt->side_data_elems = 0; // Duplicate the packet if it uses non-allocated memory if ((ret = av_dup_packet(&this_pktl->pkt)) < 0) { av_free(this_pktl); From 9726f3007196a9c3589c4f09a81c0d75e1d97f2c Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 29 Apr 2015 20:39:22 +0200 Subject: [PATCH 687/822] ape: Support _0000 files with nblock smaller than 64 The decode_array_0000 assumed that 64 is the minimal block size while it is not. CC: libav-stable@libav.org Signed-off-by: Luca Barbato (cherry picked from commit ac1660509ecfbeca7b63eb5ab8360011180e705b) Signed-off-by: Reinhard Tartler --- libavcodec/apedec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 8669db8805..d107d2b371 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -590,12 +590,12 @@ static void decode_array_0000(APEContext *ctx, GetBitContext *gb, int ksummax, ksummin; rice->ksum = 0; - for (i = 0; i < 5; i++) { + for (i = 0; i < FFMIN(blockstodecode, 5); i++) { out[i] = get_rice_ook(&ctx->gb, 10); rice->ksum += out[i]; } rice->k = av_log2(rice->ksum / 10) + 1; - for (; i < 64; i++) { + for (; i < FFMIN(blockstodecode, 64); i++) { out[i] = get_rice_ook(&ctx->gb, rice->k); rice->ksum += out[i]; rice->k = av_log2(rice->ksum / ((i + 1) * 2)) + 1; From 1dcb68c02a55648facb82c0b2b6a1eb3dc18f988 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Fri, 24 Apr 2015 00:01:43 +0200 Subject: [PATCH 688/822] alac: Reject rice_limit 0 if compression is used If in compression mode rice_limit = 0 leads to call `show_bits(gb, k)` in `decode_scalar` with k = 0. Request a sample in case it is valid and it should be accepted. Signed-off-by: Luca Barbato CC: libav-stable@libav.org (cherry picked from commit cb5324200ccdc693dd5b28dcd7d4b722fad83ea2) Signed-off-by: Reinhard Tartler --- libavcodec/alac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index f972531195..7c2b925992 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -305,6 +305,12 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index, int lpc_quant[2]; int rice_history_mult[2]; + if (!alac->rice_limit) { + avpriv_request_sample(alac->avctx, + "Compression with rice limit 0"); + return AVERROR(ENOSYS); + } + decorr_shift = get_bits(&alac->gb, 8); decorr_left_weight = get_bits(&alac->gb, 8); From 3bebca9634f05ea5da7624e3a3f35ec95341e250 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 20:57:59 +0200 Subject: [PATCH 689/822] nut: Check chapter creation in decode_info_header This fixes a segmentation fault when accessing the metadata. Signed-off-by: Luca Barbato CC: libav-stable@libav.org (cherry picked from commit 21b21aed797b5e636adcf2df811f96a95f208930) Signed-off-by: Reinhard Tartler --- libavformat/nutdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 6328549d7a..0da7c4ba1d 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -474,6 +474,10 @@ static int decode_info_header(NUTContext *nut) nut->time_base[chapter_start % nut->time_base_count], start, start + chapter_len, NULL); + if (!chapter) { + av_log(s, AV_LOG_ERROR, "Could not create chapter.\n"); + return AVERROR(ENOMEM); + } metadata = &chapter->metadata; } else if (stream_id_plus1) { st = s->streams[stream_id_plus1 - 1]; From 0654518597e6ee2947e4a81c26f03f9aec7ef656 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 6 May 2015 02:26:57 +0200 Subject: [PATCH 690/822] avi: Validate sample_size And either error out or set it to 0 if it is negative. CC: libav-stable@libav.org Signed-off-by: Luca Barbato (cherry picked from commit a55a70644872027fdf76a75edf12a09c9008880f) Signed-off-by: Reinhard Tartler --- libavformat/avidec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index e851f0b2fa..0423da27e3 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -569,6 +569,23 @@ static int avi_read_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1); goto fail; } + + if (ast->sample_size < 0) { + if (s->error_recognition & AV_EF_EXPLODE) { + av_log(s, AV_LOG_ERROR, + "Invalid sample_size %d at stream %d\n", + ast->sample_size, + stream_index); + goto fail; + } + av_log(s, AV_LOG_WARNING, + "Invalid sample_size %d at stream %d " + "setting it to 0\n", + ast->sample_size, + stream_index); + ast->sample_size = 0; + } + if (ast->sample_size == 0) st->duration = st->nb_frames; ast->frame_offset = ast->cum_len; From f29cf578923d2d4d2cf891dfc0c7ac45c641a5b7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 8 May 2015 17:01:50 +0200 Subject: [PATCH 691/822] png: Set the color range as full range The format uses full range for the gray formats. CC: libav-stable@libav.org (cherry picked from commit 0f50c53cfb959162f2bccc1a2c2e066d35723595) Signed-off-by: Reinhard Tartler --- libavcodec/pngdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index e6462967f6..eac4bd79fb 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -629,6 +629,8 @@ static av_cold int png_dec_init(AVCodecContext *avctx) { PNGDecContext *s = avctx->priv_data; + avctx->color_range = AVCOL_RANGE_JPEG; + s->prev = av_frame_alloc(); if (!s->prev) return AVERROR(ENOMEM); From c34d1099db6f9bc49f30eb3141f87c42b01a3714 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 29 Apr 2015 21:29:49 +0200 Subject: [PATCH 692/822] nut: Make sure to clean up on read_header failure Based on Andreas Cadhalpun work. CC: libav-stable@libav.org (cherry picked from commit 1f64b018cbec018fa66a4a20f79958d9707913de) Signed-off-by: Reinhard Tartler --- libavformat/nutdec.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 0da7c4ba1d..56bffe02d2 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -659,6 +659,20 @@ fail: return ret; } +static int nut_read_close(AVFormatContext *s) +{ + NUTContext *nut = s->priv_data; + int i; + + av_freep(&nut->time_base); + av_freep(&nut->stream); + ff_nut_free_sp(nut); + for (i = 1; i < nut->header_count; i++) + av_freep(&nut->header[i]); + + return 0; +} + static int nut_read_header(AVFormatContext *s) { NUTContext *nut = s->priv_data; @@ -674,7 +688,7 @@ static int nut_read_header(AVFormatContext *s) pos = find_startcode(bc, MAIN_STARTCODE, pos) + 1; if (pos < 0 + 1) { av_log(s, AV_LOG_ERROR, "No main startcode found.\n"); - return AVERROR_INVALIDDATA; + goto fail; } } while (decode_main_header(nut) < 0); @@ -684,7 +698,7 @@ static int nut_read_header(AVFormatContext *s) pos = find_startcode(bc, STREAM_STARTCODE, pos) + 1; if (pos < 0 + 1) { av_log(s, AV_LOG_ERROR, "Not all stream headers found.\n"); - return AVERROR_INVALIDDATA; + goto fail; } if (decode_stream_header(nut) >= 0) initialized_stream_count++; @@ -698,7 +712,7 @@ static int nut_read_header(AVFormatContext *s) if (startcode == 0) { av_log(s, AV_LOG_ERROR, "EOF before video frames\n"); - return AVERROR_INVALIDDATA; + goto fail; } else if (startcode == SYNCPOINT_STARTCODE) { nut->next_startcode = startcode; break; @@ -721,6 +735,11 @@ static int nut_read_header(AVFormatContext *s) ff_metadata_conv_ctx(s, NULL, ff_nut_metadata_conv); return 0; + +fail: + nut_read_close(s); + + return AVERROR_INVALIDDATA; } static int decode_frame_header(NUTContext *nut, int64_t *pts, int *stream_id, @@ -987,20 +1006,6 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -static int nut_read_close(AVFormatContext *s) -{ - NUTContext *nut = s->priv_data; - int i; - - av_freep(&nut->time_base); - av_freep(&nut->stream); - ff_nut_free_sp(nut); - for (i = 1; i < nut->header_count; i++) - av_freep(&nut->header[i]); - - return 0; -} - AVInputFormat ff_nut_demuxer = { .name = "nut", .long_name = NULL_IF_CONFIG_SMALL("NUT"), From 5e886756ee687be5840867d3810991efe17a66c3 Mon Sep 17 00:00:00 2001 From: Shiina Hideaki Date: Thu, 7 May 2015 01:46:55 +0100 Subject: [PATCH 693/822] mjpegenc: Fix JFIF header byte ordering The header had a wrong version description. Bug-Id: 808 Signed-off-by: Shiina Hideaki Signed-off-by: Vittorio Giovara (cherry picked from commit 5549f693d2181b3211427f65e48eaa2f4fc5a402) Signed-off-by: Reinhard Tartler Conflicts: libavcodec/mjpegenc_common.c --- libavcodec/mjpegenc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 30433c3ff6..cf0f510c44 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -142,7 +142,10 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p) put_marker(p, APP0); put_bits(p, 16, 16); avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */ - put_bits(p, 16, 0x0201); /* v 1.02 */ + /* The most significant byte is used for major revisions, the least + * significant byte for minor revisions. Version 1.02 is the current + * released revision. */ + put_bits(p, 16, 0x0102); put_bits(p, 8, 0); /* units type: 0 - aspect ratio */ put_bits(p, 16, avctx->sample_aspect_ratio.num); put_bits(p, 16, avctx->sample_aspect_ratio.den); From 9eba675e549c48860601a4018df7756b57623e93 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 15 Sep 2014 05:11:21 -0700 Subject: [PATCH 694/822] configure: Disable i686 for i586 and lower CPUs (cherry picked from commit b37bfbfbe53917820d1f97312fa0b2e8c7a15217) Signed-off-by: Reinhard Tartler --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 35f9d5cdc8..b4ba1e0b9b 100755 --- a/configure +++ b/configure @@ -3121,6 +3121,7 @@ elif enabled x86; then case $cpu in i[345]86|pentium) cpuflags="-march=$cpu" + disable i686 disable mmx ;; # targets that do NOT support nopl and conditional mov (cmov) From 60852532ba0971c4d253b755a3596e0a004a8bd9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 28 May 2015 12:38:35 +0200 Subject: [PATCH 695/822] x86: cavs: Remove an unneeded scratch buffer Simplifies the code and makes it build on certain compilers running out of registers on x86. CC: libav-stable@libav.org Reported-By: mudler (cherry picked from commit e4610300de6869bd6b3b00e76cfeabb6d7653dcd) Signed-off-by: Luca Barbato (cherry picked from commit 4dc0fbb13c33b4e5bdb766652f4daf900ccc952f) Signed-off-by: Reinhard Tartler --- libavcodec/x86/cavsdsp.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c index bc9cbf7411..fef299c336 100644 --- a/libavcodec/x86/cavsdsp.c +++ b/libavcodec/x86/cavsdsp.c @@ -140,9 +140,7 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride) DECLARE_ALIGNED(8, int16_t, b2)[64]; for(i=0; i<2; i++){ - DECLARE_ALIGNED(8, uint64_t, tmp); - - cavs_idct8_1d(block+4*i, ff_pw_4.a); + cavs_idct8_1d(block + 4 * i, ff_pw_4.a); __asm__ volatile( "psraw $3, %%mm7 \n\t" @@ -153,20 +151,20 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride) "psraw $3, %%mm2 \n\t" "psraw $3, %%mm1 \n\t" "psraw $3, %%mm0 \n\t" - "movq %%mm7, %0 \n\t" + "movq %%mm7, (%0) \n\t" TRANSPOSE4( %%mm0, %%mm2, %%mm4, %%mm6, %%mm7 ) - "movq %%mm0, 8(%1) \n\t" - "movq %%mm6, 24(%1) \n\t" - "movq %%mm7, 40(%1) \n\t" - "movq %%mm4, 56(%1) \n\t" - "movq %0, %%mm7 \n\t" + "movq %%mm0, 8(%0) \n\t" + "movq %%mm6, 24(%0) \n\t" + "movq %%mm7, 40(%0) \n\t" + "movq %%mm4, 56(%0) \n\t" + "movq (%0), %%mm7 \n\t" TRANSPOSE4( %%mm7, %%mm5, %%mm3, %%mm1, %%mm0 ) - "movq %%mm7, (%1) \n\t" - "movq %%mm1, 16(%1) \n\t" - "movq %%mm0, 32(%1) \n\t" - "movq %%mm3, 48(%1) \n\t" - : "=m"(tmp) - : "r"(b2+32*i) + "movq %%mm7, (%0) \n\t" + "movq %%mm1, 16(%0) \n\t" + "movq %%mm0, 32(%0) \n\t" + "movq %%mm3, 48(%0) \n\t" + : + : "r"(b2 + 32 * i) : "memory" ); } From 48c7fe5b5834a197f10a6eb56cbe7cda8ee32407 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 25 May 2015 21:53:26 +0200 Subject: [PATCH 696/822] msrle: Use FFABS to determine the frame size in msrle_decode_pal4 As done in msrle_decode_8_16_24_32. Bug-Id: CVE-2015-3395 CC: libav-stable@libav.org --- libavcodec/msrledec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index af2a2478b1..370d9bdfce 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -39,7 +39,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, unsigned int pixel_ptr = 0; int row_dec = pic->linesize[0]; int row_ptr = (avctx->height - 1) * row_dec; - int frame_size = row_dec * avctx->height; + int frame_size = FFABS(row_dec) * avctx->height; int i; while (row_ptr >= 0) { From 964fef3f3ced60e67831549df223bc177e1537c9 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 25 May 2015 22:30:10 +0200 Subject: [PATCH 697/822] h264: Make sure reinit failures mark the context as not initialized Bug-Id: CVE-2015-3417 CC: libav-stable@libav.org (cherry picked from commit 3b69f245dbe6e2016659a45c4bfe284f6c5ac57e) Signed-off-by: Reinhard Tartler Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 857a949e98..c32711343b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3489,6 +3489,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) (h->width != h->avctx->coded_width || h->height != h->avctx->coded_height || needs_reinit)) { + h->context_initialized = 0; if (h != h0) { av_log(h->avctx, AV_LOG_ERROR, "changing width/height on " "slice %d\n", h0->current_slice + 1); From e863f4cd2a5ea05c74b8beb92e55d7ed10908d64 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 31 May 2015 11:39:39 -0400 Subject: [PATCH 698/822] Update Changelog for 10.7 --- Changelog | 28 ++++++++++++++++++++++++++++ RELEASE | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index adaf30e824..290d791f31 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,34 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10.7: +- h264: Make sure reinit failures mark the context as not initialized (CVE-2015-3417) +- msrle: Use FFABS to determine the frame size in msrle_decode_pal4 (CVE-2015-3395) +- x86: cavs: Remove an unneeded scratch buffer +- configure: Disable i686 for i586 and lower CPUs (debian/783082) +- mjpegenc: Fix JFIF header byte ordering (bug/808) +- nut: Make sure to clean up on read_header failure +- png: Set the color range as full range +- avi: Validate sample_size +- nut: Check chapter creation in decode_info_header +- alac: Reject rice_limit 0 if compression is used +- ape: Support _0000 files with nblock smaller than 64 +- mux: Do not leave stale side data pointers in ff_interleave_add_packet() +- avpacket: Check for and return errors in ff_interleave_add_packet() +- mpegts: Update the PSI/SI table only if the version change +- rtsp: Make sure we don't write too many transport entries into a fixed-size array +- rtpenc_jpeg: Handle case of picture dimensions not dividing by 8 +- mov: Fix little endian audio detection +- x86: Put COPY3_IF_LT under HAVE_6REGS (gentoo/541930) +- roqvideoenc: set enc->avctx in roq_encode_init +- libvpx: Fix mixed use of av_malloc() and av_reallocp() +- (libav.org/release/10) alsdec: only adapt order for positive max_order +- alsdec: check sample pointer range in revert_channel_correlation +- aacpsy: correct calculation of minath in psy_3gpp_init +- alsdec: limit avctx->bits_per_raw_sample to 32 +- aasc: return correct buffer size from aasc_decode_frame +- matroskadec: fix crash when parsing invalid mkv + version 10.6: - utvideodec: Handle slice_height being zero (CVE-2014-9604) - tiff: Check that there is no aliasing in pixel format selection (CVE-2014-8544) diff --git a/RELEASE b/RELEASE index 12c0281acb..4e74f9f0eb 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -10.6 +10.7 From 8580977e30e3c18feff11c8b0eb5658c91e4683e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 19 Apr 2014 09:56:01 +0200 Subject: [PATCH 699/822] Fix compilation with !HAVE_6REGS. Can be tested with: $ ./configure --cc='cc -m32' --disable-optimizations --enable-pic (cherry picked from commit b38910c9790253b362839042a17e13252c1d4b90) Signed-off-by: Michael Niedermayer --- libavcodec/x86/mathops.h | 3 +++ libavcodec/x86/mpegaudiodsp.c | 6 +++--- libavcodec/x86/mpegvideoenc.c | 12 ++++++++++-- libavcodec/x86/snowdsp.c | 6 ++++++ libavcodec/x86/vc1dsp_init.c | 5 +++-- libavcodec/x86/vc1dsp_mmx.c | 4 ++-- libavcodec/x86/vp3dsp_init.c | 6 ++++-- libavcodec/x86/vp56_arith.h | 2 +- libavfilter/vf_noise.c | 4 +++- libswscale/x86/swscale_template.c | 6 ++++++ libswscale/x86/yuv2rgb.c | 12 ++++++------ 11 files changed, 47 insertions(+), 19 deletions(-) diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h index 9c48afeb20..4453032aba 100644 --- a/libavcodec/x86/mathops.h +++ b/libavcodec/x86/mathops.h @@ -24,6 +24,7 @@ #include "config.h" #include "libavutil/common.h" +#include "libavutil/x86/asm.h" #if HAVE_INLINE_ASM @@ -88,6 +89,7 @@ static inline av_const int mid_pred(int a, int b, int c) return i; } +#if HAVE_6REGS #define COPY3_IF_LT(x, y, a, b, c, d)\ __asm__ volatile(\ "cmpl %0, %3 \n\t"\ @@ -97,6 +99,7 @@ __asm__ volatile(\ : "+&r" (x), "+&r" (a), "+r" (c)\ : "r" (y), "r" (b), "r" (d)\ ); +#endif /* HAVE_6REGS */ #endif /* HAVE_I686 */ #define MASK_ABS(mask, level) \ diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c index 3654c81248..bd9ec51773 100644 --- a/libavcodec/x86/mpegaudiodsp.c +++ b/libavcodec/x86/mpegaudiodsp.c @@ -45,7 +45,7 @@ void ff_four_imdct36_float_avx(float *out, float *buf, float *in, float *win, DECLARE_ALIGNED(16, static float, mdct_win_sse)[2][4][4*40]; -#if HAVE_SSE2_INLINE +#if HAVE_6REGS && HAVE_SSE2_INLINE #define MACS(rt, ra, rb) rt+=(ra)*(rb) #define MLSS(rt, ra, rb) rt-=(ra)*(rb) @@ -189,7 +189,7 @@ static void apply_window_mp3(float *in, float *win, int *unused, float *out, *out = sum; } -#endif /* HAVE_SSE2_INLINE */ +#endif /* HAVE_6REGS && HAVE_SSE2_INLINE */ #if HAVE_YASM #define DECL_IMDCT_BLOCKS(CPU1, CPU2) \ @@ -255,7 +255,7 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s) } } -#if HAVE_SSE2_INLINE +#if HAVE_6REGS && HAVE_SSE2_INLINE if (INLINE_SSE2(cpu_flags)) { s->apply_window_float = apply_window_mp3; } diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c index 7dd9959087..e8abfb4f05 100644 --- a/libavcodec/x86/mpegvideoenc.c +++ b/libavcodec/x86/mpegvideoenc.c @@ -31,6 +31,8 @@ /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ DECLARE_ALIGNED(16, static uint16_t, inv_zigzag_direct16)[64]; +#if HAVE_6REGS + #if HAVE_MMX_INLINE #define COMPILE_TEMPLATE_MMXEXT 0 #define COMPILE_TEMPLATE_SSE2 0 @@ -82,6 +84,8 @@ DECLARE_ALIGNED(16, static uint16_t, inv_zigzag_direct16)[64]; #include "mpegvideoenc_template.c" #endif /* HAVE_SSSE3_INLINE */ +#endif /* HAVE_6REGS */ + #if HAVE_INLINE_ASM static void denoise_dct_mmx(MpegEncContext *s, int16_t *block){ const int intra= s->mb_intra; @@ -206,21 +210,25 @@ av_cold void ff_dct_encode_init_x86(MpegEncContext *s) #if HAVE_MMX_INLINE int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { +#if HAVE_6REGS s->dct_quantize = dct_quantize_MMX; +#endif s->denoise_dct = denoise_dct_mmx; } #endif -#if HAVE_MMXEXT_INLINE +#if HAVE_6REGS && HAVE_MMXEXT_INLINE if (INLINE_MMXEXT(cpu_flags)) s->dct_quantize = dct_quantize_MMXEXT; #endif #if HAVE_SSE2_INLINE if (INLINE_SSE2(cpu_flags)) { +#if HAVE_6REGS s->dct_quantize = dct_quantize_SSE2; +#endif s->denoise_dct = denoise_dct_sse2; } #endif -#if HAVE_SSSE3_INLINE +#if HAVE_6REGS && HAVE_SSSE3_INLINE if (INLINE_SSSE3(cpu_flags)) s->dct_quantize = dct_quantize_SSSE3; #endif diff --git a/libavcodec/x86/snowdsp.c b/libavcodec/x86/snowdsp.c index 735e7905a0..b5b6a834b9 100644 --- a/libavcodec/x86/snowdsp.c +++ b/libavcodec/x86/snowdsp.c @@ -606,6 +606,7 @@ static void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM } #endif //HAVE_7REGS +#if HAVE_6REGS #define snow_inner_add_yblock_sse2_header \ IDWTELEM * * dst_array = sb->line + src_y;\ x86_reg tmp;\ @@ -872,6 +873,7 @@ static void ff_snow_inner_add_yblock_mmx(const uint8_t *obmc, const int obmc_str else ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8); } +#endif /* HAVE_6REGS */ #endif /* HAVE_INLINE_ASM */ @@ -886,7 +888,9 @@ void ff_dwt_init_x86(SnowDWTContext *c) #if HAVE_7REGS c->vertical_compose97i = ff_snow_vertical_compose97i_sse2; #endif +#if HAVE_6REGS c->inner_add_yblock = ff_snow_inner_add_yblock_sse2; +#endif } else{ if (mm_flags & AV_CPU_FLAG_MMXEXT) { @@ -895,7 +899,9 @@ void ff_dwt_init_x86(SnowDWTContext *c) c->vertical_compose97i = ff_snow_vertical_compose97i_mmx; #endif } +#if HAVE_6REGS c->inner_add_yblock = ff_snow_inner_add_yblock_mmx; +#endif } } #endif /* HAVE_INLINE_ASM */ diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index 9bd5ae3666..adb5ab4a6c 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -27,6 +27,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" +#include "libavutil/x86/asm.h" #include "libavcodec/vc1dsp.h" #include "dsputil_x86.h" #include "vc1dsp.h" @@ -86,10 +87,10 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (INLINE_MMX(cpu_flags)) + if (HAVE_6REGS && INLINE_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); - if (INLINE_MMXEXT(cpu_flags)) + if (HAVE_6REGS && INLINE_MMXEXT(cpu_flags)) ff_vc1dsp_init_mmxext(dsp); #define ASSIGN_LF(EXT) \ diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index 5ceacd348e..488faba573 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -33,7 +33,7 @@ #include "dsputil_x86.h" #include "vc1dsp.h" -#if HAVE_INLINE_ASM +#if HAVE_6REGS && HAVE_INLINE_ASM #define OP_PUT(S,D) #define OP_AVG(S,D) "pavgb " #S ", " #D " \n\t" @@ -754,4 +754,4 @@ av_cold void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp) dsp->vc1_inv_trans_8x4_dc = vc1_inv_trans_8x4_dc_mmxext; dsp->vc1_inv_trans_4x4_dc = vc1_inv_trans_4x4_dc_mmxext; } -#endif /* HAVE_INLINE_ASM */ +#endif /* HAVE_6REGS && HAVE_INLINE_ASM */ diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c index 1f02a6f709..534374820f 100644 --- a/libavcodec/x86/vp3dsp_init.c +++ b/libavcodec/x86/vp3dsp_init.c @@ -64,6 +64,7 @@ void ff_vp3_h_loop_filter_mmxext(uint8_t *src, int stride, "paddb "#regb", "#regr" \n\t" \ "paddb "#regd", "#regp" \n\t" +#if HAVE_6REGS static void put_vp_no_rnd_pixels8_l2_mmx(uint8_t *dst, const uint8_t *a, const uint8_t *b, ptrdiff_t stride, int h) { // START_TIMER @@ -95,15 +96,16 @@ static void put_vp_no_rnd_pixels8_l2_mmx(uint8_t *dst, const uint8_t *a, const u :"memory"); // STOP_TIMER("put_vp_no_rnd_pixels8_l2_mmx") } +#endif /*HAVE_6REGS */ #endif /* HAVE_MMX_INLINE */ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_MMX_INLINE +#if HAVE_6REGS && HAVE_MMX_INLINE c->put_no_rnd_pixels_l2 = put_vp_no_rnd_pixels8_l2_mmx; -#endif /* HAVE_MMX_INLINE */ +#endif /* HAVE_6REGS && HAVE_MMX_INLINE */ #if ARCH_X86_32 if (EXTERNAL_MMX(cpu_flags)) { diff --git a/libavcodec/x86/vp56_arith.h b/libavcodec/x86/vp56_arith.h index e71dbf8ed0..752a92d046 100644 --- a/libavcodec/x86/vp56_arith.h +++ b/libavcodec/x86/vp56_arith.h @@ -24,7 +24,7 @@ #ifndef AVCODEC_X86_VP56_ARITH_H #define AVCODEC_X86_VP56_ARITH_H -#if HAVE_INLINE_ASM && HAVE_FAST_CMOV +#if HAVE_INLINE_ASM && HAVE_FAST_CMOV && HAVE_6REGS #define vp56_rac_get_prob vp56_rac_get_prob static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) { diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index c29afa2721..07d1c276c3 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -289,7 +289,7 @@ static inline void line_noise_avg_c(uint8_t *dst, const uint8_t *src, static inline void line_noise_avg_mmx(uint8_t *dst, const uint8_t *src, int len, int8_t **shift) { -#if HAVE_MMX_INLINE +#if HAVE_MMX_INLINE && HAVE_6REGS x86_reg mmx_len= len&(~7); __asm__ volatile( @@ -438,7 +438,9 @@ static av_cold int init(AVFilterContext *ctx) if (HAVE_MMX_INLINE && cpu_flags & AV_CPU_FLAG_MMX) { n->line_noise = line_noise_mmx; +#if HAVE_6REGS n->line_noise_avg = line_noise_avg_mmx; +#endif } if (HAVE_MMXEXT_INLINE && cpu_flags & AV_CPU_FLAG_MMXEXT) diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index c72104bd09..fdd7eb8b39 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -660,6 +660,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, #define WRITEBGR24(dst, dstw, index) WRITEBGR24MMX(dst, dstw, index) #endif +#if HAVE_6REGS static void RENAME(yuv2bgr24_X_ar)(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, @@ -707,6 +708,7 @@ static void RENAME(yuv2bgr24_X)(SwsContext *c, const int16_t *lumFilter, : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S ); } +#endif /* HAVE_6REGS */ #define REAL_WRITEYUY2(dst, dstw, index) \ "packuswb %%mm3, %%mm3 \n\t"\ @@ -1647,7 +1649,9 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c) if (!(c->flags & SWS_FULL_CHR_H_INT)) { switch (c->dstFormat) { case AV_PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X_ar); break; +#if HAVE_6REGS case AV_PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X_ar); break; +#endif case AV_PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X_ar); break; case AV_PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X_ar); break; case AV_PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X_ar); break; @@ -1660,7 +1664,9 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c) if (!(c->flags & SWS_FULL_CHR_H_INT)) { switch (c->dstFormat) { case AV_PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X); break; +#if HAVE_6REGS case AV_PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X); break; +#endif case AV_PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X); break; case AV_PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X); break; case AV_PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X); break; diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c index a3370eec61..5e2f77c20f 100644 --- a/libswscale/x86/yuv2rgb.c +++ b/libswscale/x86/yuv2rgb.c @@ -50,28 +50,28 @@ DECLARE_ASM_CONST(8, uint64_t, pb_03) = 0x0303030303030303ULL; DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL; //MMX versions -#if HAVE_MMX_INLINE +#if HAVE_MMX_INLINE && HAVE_6REGS #undef RENAME #undef COMPILE_TEMPLATE_MMXEXT #define COMPILE_TEMPLATE_MMXEXT 0 #define RENAME(a) a ## _mmx #include "yuv2rgb_template.c" -#endif /* HAVE_MMX_INLINE */ +#endif /* HAVE_MMX_INLINE && HAVE_6REGS */ // MMXEXT versions -#if HAVE_MMXEXT_INLINE +#if HAVE_MMXEXT_INLINE && HAVE_6REGS #undef RENAME #undef COMPILE_TEMPLATE_MMXEXT #define COMPILE_TEMPLATE_MMXEXT 1 #define RENAME(a) a ## _mmxext #include "yuv2rgb_template.c" -#endif /* HAVE_MMXEXT_INLINE */ +#endif /* HAVE_MMXEXT_INLINE && HAVE_6REGS */ #endif /* HAVE_INLINE_ASM */ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c) { -#if HAVE_MMX_INLINE +#if HAVE_MMX_INLINE && HAVE_6REGS int cpu_flags = av_get_cpu_flags(); #if HAVE_MMXEXT_INLINE @@ -113,7 +113,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c) return yuv420_rgb15_mmx; } } -#endif /* HAVE_MMX_INLINE */ +#endif /* HAVE_MMX_INLINE && HAVE_6REGS */ return NULL; } From 0ca612a765abac04733b2725fd5c2d3c8297da6e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 29 Apr 2015 05:00:51 +0200 Subject: [PATCH 700/822] avformat/mpegts: reset last_version on seeking Signed-off-by: Michael Niedermayer (cherry picked from commit 639781492684fcad05da52e7700bcbf6086599ea) Conflicts: libavformat/mpegts.c Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 0b35b846a1..3f06c57444 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2170,11 +2170,13 @@ static int handle_packets(MpegTSContext *ts, int nb_packets) for (i = 0; i < NB_PID_MAX; i++) { if (ts->pids[i]) { if (ts->pids[i]->type == MPEGTS_PES) { - PESContext *pes = ts->pids[i]->u.pes_filter.opaque; - av_buffer_unref(&pes->buffer); - pes->data_index = 0; - pes->state = MPEGTS_SKIP; /* skip until pes header */ - pes->last_pcr = -1; + PESContext *pes = ts->pids[i]->u.pes_filter.opaque; + av_buffer_unref(&pes->buffer); + pes->data_index = 0; + pes->state = MPEGTS_SKIP; /* skip until pes header */ + pes->last_pcr = -1; + } else if (ts->pids[i]->type == MPEGTS_SECTION) { + ts->pids[i]->u.section_filter.last_ver = -1; } ts->pids[i]->last_cc = -1; } From c0d6afa3e617c8d5b24d0a98688314edc9bfbbcc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 29 Apr 2015 06:26:18 +0200 Subject: [PATCH 701/822] avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet Fixes Detecting AAC with such descriptor if the parts needed for detection are later in the stream Signed-off-by: Michael Niedermayer (cherry picked from commit 14e9a20083c9c17c9431754bf13e458293c1ead4) Conflicts: libavformat/mpegts.c Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 3f06c57444..71a4549c3b 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1459,8 +1459,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type } break; case 0x1F: /* FMC descriptor */ - get16(pp, desc_end); - if (mp4_descr_count > 0 && (st->codec->codec_id == AV_CODEC_ID_AAC_LATM || st->request_probe>0) && + if (get16(pp, desc_end) < 0) + break; + if (mp4_descr_count > 0 && + (st->codec->codec_id == AV_CODEC_ID_AAC_LATM || + (st->request_probe == 0 && st->codec->codec_id == AV_CODEC_ID_NONE) || + st->request_probe > 0) && mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) { AVIOContext pb; ffio_init_context(&pb, mp4_descr->dec_config_descr, From 3db9966152244540b69ae97c6304c2fec7c49aa6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 2 Jun 2014 14:48:22 +0200 Subject: [PATCH 702/822] avformat/mux: Dont leave stale side data pointers in ff_interleave_add_packet() Signed-off-by: Michael Niedermayer (cherry picked from commit bfb3ed1a9d5dafdc185080fdd88d02ff7221d30a) Signed-off-by: Michael Niedermayer --- libavformat/mux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mux.c b/libavformat/mux.c index eb39cbb5e1..582c55b59e 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -657,6 +657,8 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif pkt->buf = NULL; + pkt->side_data = NULL; + pkt->side_data_elems = 0; if ((pkt->flags & AV_PKT_FLAG_UNCODED_FRAME)) { av_assert0(pkt->size == UNCODED_FRAME_PACKET_SIZE); av_assert0(((AVFrame *)pkt->data)->buf); From bb519be5e6c6600ea40a1f86d036aa05155746a2 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 11:13:43 +0200 Subject: [PATCH 703/822] apedec: prevent out of array writes in decode_array_0000 s->decoded_buffer is allocated with a min_size of: 2 * FFALIGN(blockstodecode, 8) * sizeof(*s->decoded_buffer) Then it is assigned to s->decoded[0] (and s->decoded_buffer + FFALIGN(blockstodecode, 8) to s->decoded[1]) and passed as out buffer to decode_array_0000. In this function 64 elements of the out buffer are written unconditionally and outside the array if blockstodecode is too small. This causes memory corruption, leading to segmentation faults or other crashes. Thus change decode_array_0000 to write at most blockstodecode elements of the out buffer. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 699341d647f7af785fb8ceed67604467b0b9ab12) Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 58072d49ba..370f1abc69 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -598,14 +598,14 @@ static void decode_array_0000(APEContext *ctx, GetBitContext *gb, int ksummax, ksummin; rice->ksum = 0; - for (i = 0; i < 5; i++) { + for (i = 0; i < FFMIN(blockstodecode, 5); i++) { out[i] = get_rice_ook(&ctx->gb, 10); rice->ksum += out[i]; } rice->k = av_log2(rice->ksum / 10) + 1; if (rice->k >= 24) return; - for (; i < 64; i++) { + for (; i < FFMIN(blockstodecode, 64); i++) { out[i] = get_rice_ook(&ctx->gb, rice->k); rice->ksum += out[i]; rice->k = av_log2(rice->ksum / ((i + 1) * 2)) + 1; From 6443db085a192baf1ede12ca80e2bbd7be3ca4fc Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Fri, 24 Apr 2015 00:01:43 +0200 Subject: [PATCH 704/822] alac: reject rice_limit 0 if compression is used If rice_limit is 0, k can be 0 in decode_scalar, which calls show_bits(gb, k). Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09) Signed-off-by: Michael Niedermayer --- libavcodec/alac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 1e28efd715..37dcc3a71b 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -311,6 +311,11 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index, int lpc_quant[2]; int rice_history_mult[2]; + if (!alac->rice_limit) { + avpriv_request_sample(alac->avctx, "Compression with rice limit 0"); + return AVERROR(ENOSYS); + } + decorr_shift = get_bits(&alac->gb, 8); decorr_left_weight = get_bits(&alac->gb, 8); From 6dfb78d6f1c10f04d782fe292c96e61e07b71c0e Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 20:57:59 +0200 Subject: [PATCH 705/822] nutdec: check chapter creation in decode_info_header This fixes a segmentation fault when accessing the metadata. Signed-off-by: Michael Niedermayer (cherry picked from commit 3ff1af2b0db7132d5717be6395227a94c8abab07) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 5746416180..390a983a04 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -495,6 +495,10 @@ static int decode_info_header(NUTContext *nut) nut->time_base[chapter_start % nut->time_base_count], start, start + chapter_len, NULL); + if (!chapter) { + av_log(s, AV_LOG_ERROR, "could not create chapter\n"); + return AVERROR(ENOMEM); + } metadata = &chapter->metadata; } else if (stream_id_plus1) { st = s->streams[stream_id_plus1 - 1]; From 0658aef53a86a9f5bb9257faa1f641e765c6d007 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 4 May 2015 23:01:45 +0200 Subject: [PATCH 706/822] avidec: avoid infinite loop due to negative ast->sample_size If max in clean_index is set to a negative ast->sample_size, the following loop never ends: while (max < 1024) max += max; Thus set ast->sample_size to 0 if it would otherwise be negative. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit ca234639ac49a0dc073ac1f10977979acdb94f97) Signed-off-by: Michael Niedermayer --- libavformat/avidec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 7512622d15..cfcd85bc16 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -604,6 +604,7 @@ static int avi_read_header(AVFormatContext *s) default: av_log(s, AV_LOG_INFO, "unknown stream type %X\n", tag1); } + ast->sample_size = FFMAX(ast->sample_size, 0); if (ast->sample_size == 0) { st->duration = st->nb_frames; if (st->duration > 0 && avi->io_fsize > 0 && avi->riff_end > avi->io_fsize) { From 7666ecbbcbd295ab23a5b43293ba59c7ae1cfcab Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 4 May 2015 23:42:24 +0200 Subject: [PATCH 707/822] avformat/avidec: print a warning for negative sample_size Signed-off-by: Michael Niedermayer (cherry picked from commit c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c) Signed-off-by: Michael Niedermayer --- libavformat/avidec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index cfcd85bc16..9eb48f2df1 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -604,6 +604,8 @@ static int avi_read_header(AVFormatContext *s) default: av_log(s, AV_LOG_INFO, "unknown stream type %X\n", tag1); } + if (ast->sample_size < 0) + av_log(s, AV_LOG_WARNING, "sample size %d is invalid\n", ast->sample_size); ast->sample_size = FFMAX(ast->sample_size, 0); if (ast->sample_size == 0) { st->duration = st->nb_frames; From b216e8b02bbc263d0eae9f61a59e582d5e4c91a3 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 20:58:21 +0200 Subject: [PATCH 708/822] nutdec: fix memleaks on error in nut_read_header Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 361702660d2c37a63b7d6381d39e1e1de8405260) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 68e0205fd7..424eb8dc2a 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -718,12 +718,14 @@ fail: return ret; } +static int nut_read_close(AVFormatContext *s); + static int nut_read_header(AVFormatContext *s) { NUTContext *nut = s->priv_data; AVIOContext *bc = s->pb; int64_t pos; - int initialized_stream_count; + int initialized_stream_count, ret = 0; nut->avf = s; @@ -733,7 +735,8 @@ static int nut_read_header(AVFormatContext *s) pos = find_startcode(bc, MAIN_STARTCODE, pos) + 1; if (pos < 0 + 1) { av_log(s, AV_LOG_ERROR, "No main startcode found.\n"); - return AVERROR_INVALIDDATA; + ret = AVERROR_INVALIDDATA; + goto end; } } while (decode_main_header(nut) < 0); @@ -743,7 +746,8 @@ static int nut_read_header(AVFormatContext *s) pos = find_startcode(bc, STREAM_STARTCODE, pos) + 1; if (pos < 0 + 1) { av_log(s, AV_LOG_ERROR, "Not all stream headers found.\n"); - return AVERROR_INVALIDDATA; + ret = AVERROR_INVALIDDATA; + goto end; } if (decode_stream_header(nut) >= 0) initialized_stream_count++; @@ -757,7 +761,8 @@ static int nut_read_header(AVFormatContext *s) if (startcode == 0) { av_log(s, AV_LOG_ERROR, "EOF before video frames\n"); - return AVERROR_INVALIDDATA; + ret = AVERROR_INVALIDDATA; + goto end; } else if (startcode == SYNCPOINT_STARTCODE) { nut->next_startcode = startcode; break; @@ -779,7 +784,10 @@ static int nut_read_header(AVFormatContext *s) ff_metadata_conv_ctx(s, NULL, ff_nut_metadata_conv); - return 0; +end: + if (ret < 0) + nut_read_close(s); + return FFMIN(ret, 0); } static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos) From 7c9870d3f7c1ec45f5b46506983cf6ffbb2f0ad0 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Fri, 12 Sep 2014 22:29:29 +0200 Subject: [PATCH 709/822] configure: Fix miscompilation for i586 If the CPU is 386, 486 or pentium, we must not use cmov in inline assembler. Signed-off-by: Michael Niedermayer (cherry picked from commit cdb3eee7c496f763d195de34be7f67783b98fb2c) Signed-off-by: Michael Niedermayer --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index d1a675abab..5b8d2ef9cf 100755 --- a/configure +++ b/configure @@ -3585,6 +3585,7 @@ elif enabled x86; then case $cpu in i[345]86|pentium) cpuflags="-march=$cpu" + disable i686 disable mmx ;; # targets that do NOT support nopl and conditional mov (cmov) From 47936e1a5c872ad305337dc111d20db8afda5a18 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 3 Jun 2015 00:48:29 +0200 Subject: [PATCH 710/822] swresample: Check the return value of resampler->init() Signed-off-by: Michael Niedermayer (cherry picked from commit 02915602d9313aa4b108342a3081244b9d2422bf) Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index ad05617506..9cd4e5dde4 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -351,6 +351,10 @@ av_cold int swr_init(struct SwrContext *s){ if (s->out_sample_rate!=s->in_sample_rate || (s->flags & SWR_FLAG_RESAMPLE)){ s->resample = s->resampler->init(s->resample, s->out_sample_rate, s->in_sample_rate, s->filter_size, s->phase_shift, s->linear_interp, s->cutoff, s->int_sample_fmt, s->filter_type, s->kaiser_beta, s->precision, s->cheby); + if (!s->resample) { + av_log(s, AV_LOG_ERROR, "Failed to initilaize resampler\n"); + return AVERROR(ENOMEM); + } }else s->resampler->free(&s->resample); if( s->int_sample_fmt != AV_SAMPLE_FMT_S16P From b71657324d0c50a4a3fb0cca9fde2403a295a50c Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 1 Jun 2015 00:51:30 +0200 Subject: [PATCH 711/822] libopenjpegenc: add NULL check for img before accessing it If opj_image_create fails to allocate an image it returns NULL, which causes a segmentation fault at 'img->x0 = 0'. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun (cherry picked from commit 1577526b47439f33a999339efdec5d624b70e1da) Signed-off-by: Michael Niedermayer --- libavcodec/libopenjpegenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c index 083da64259..c94a112ce8 100644 --- a/libavcodec/libopenjpegenc.c +++ b/libavcodec/libopenjpegenc.c @@ -164,6 +164,9 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p img = opj_image_create(numcomps, cmptparm, color_space); + if (!img) + return NULL; + // x0, y0 is the top left corner of the image // x1, y1 is the width, height of the reference grid img->x0 = 0; From 0fee46e2dbc0a07f3abb0bca7d2c76d6c88868d7 Mon Sep 17 00:00:00 2001 From: Ganesh Ajjanagadde Date: Tue, 2 Jun 2015 23:17:48 -0400 Subject: [PATCH 712/822] swresample/dither: check memory allocation check memory allocation in swri_get_dither() Signed-off-by: Michael Niedermayer (cherry picked from commit 196b885a5f0aa3ca022c1fa99509f47341239784) Signed-off-by: Michael Niedermayer --- libswresample/dither.c | 6 +++++- libswresample/swresample.c | 3 ++- libswresample/swresample_internal.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libswresample/dither.c b/libswresample/dither.c index 8121f11c2f..23e7e12ede 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -23,12 +23,15 @@ #include "noise_shaping_data.c" -void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { +int swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale; #define TMP_EXTRA 2 double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; + if (!tmp) + return AVERROR(ENOMEM); + for(i=0; idither.noise.ch_count; ch++) - swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<dither.noise.fmt); + if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<dither.noise.fmt))<0) + return ret; av_assert0(s->dither.noise.ch_count == preout->ch_count); if(s->dither.noise_pos + out_count > s->dither.noise.count) diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h index ab19f212fe..4de6017db4 100644 --- a/libswresample/swresample_internal.h +++ b/libswresample/swresample_internal.h @@ -185,7 +185,7 @@ void swri_rematrix_free(SwrContext *s); int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy); void swri_rematrix_init_x86(struct SwrContext *s); -void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt); +int swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt); int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt); void swri_audio_convert_init_arm(struct AudioConvert *ac, From f33adf1b53454cf6a9c5f64f824aef18b74cdfb2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 1 Jun 2015 21:35:02 +0200 Subject: [PATCH 713/822] avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec This is the maximum rate possible based on the frame size limit of MXF D-10 Previous version reviewed by tim nicholson Signed-off-by: Michael Niedermayer (cherry picked from commit d7a762553c6f6c422adb6632354bcc4ff577b701) Signed-off-by: Michael Niedermayer --- libavformat/mxfenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 5e77a3f068..43b4dd991d 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1712,9 +1712,10 @@ static int mxf_write_header(AVFormatContext *s) return ret; sc->video_bit_rate = st->codec->bit_rate ? st->codec->bit_rate : st->codec->rc_max_rate; if (s->oformat == &ff_mxf_d10_muxer) { - if (sc->video_bit_rate == 50000000) { - if (mxf->time_base.den == 25) sc->index = 3; - else sc->index = 5; + if ((sc->video_bit_rate == 50000000) && (mxf->time_base.den == 25)) { + sc->index = 3; + } else if ((sc->video_bit_rate == 49999840 || sc->video_bit_rate == 50000000) && (mxf->time_base.den != 25)) { + sc->index = 5; } else if (sc->video_bit_rate == 40000000) { if (mxf->time_base.den == 25) sc->index = 7; else sc->index = 9; From 41e3d5bc3aefbabb768df3770f5cdcd0ca0b669b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 3 Jun 2015 22:39:27 +0200 Subject: [PATCH 714/822] Revert "avformat/rtpenc: check av_packet_get_side_data() return, fix null ptr dereference" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was simply wrong Found-by: Martin Storsjö This reverts commit 5d8e4f6da03c0342157e6ac7fab1a8ac3a87a8b0. (cherry picked from commit 3e34b7498f14c04baadde1700a6f73a7e9e86fa6) Signed-off-by: Michael Niedermayer --- libavformat/rtpenc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index f0100083b8..6fdc908d0f 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -557,10 +557,6 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) const uint8_t *mb_info = av_packet_get_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, &mb_info_size); - if (!mb_info) { - av_log(s1, AV_LOG_ERROR, "failed to allocate side data\n"); - return AVERROR(ENOMEM); - } ff_rtp_send_h263_rfc2190(s1, pkt->data, size, mb_info, mb_info_size); break; } From b97fb80db9e6a185aad432ef57eb6b9598e322bf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 4 Jun 2015 03:47:55 +0200 Subject: [PATCH 715/822] swresample/swresample: Cleanup on init failure. This avoids leaks if the user doest call swr_close() after a failed init Found-by: James Almer Reviewed-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit c3f87f7545d42520921bc448b9fbd7324c574e49) Conflicts: libswresample/swresample.c --- libswresample/swresample.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 5b9dc7c26e..68c53e6f6b 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -363,7 +363,8 @@ av_cold int swr_init(struct SwrContext *s){ && s->int_sample_fmt != AV_SAMPLE_FMT_DBLP && s->resample){ av_log(s, AV_LOG_ERROR, "Resampling only supported with internal s16/s32/flt/dbl\n"); - return -1; + ret = AVERROR(EINVAL); + goto fail; } #define RSC 1 //FIXME finetune @@ -377,7 +378,8 @@ av_cold int swr_init(struct SwrContext *s){ if(!s-> in.ch_count){ av_assert0(!s->in_ch_layout); av_log(s, AV_LOG_ERROR, "Input channel count and layout are unset\n"); - return -1; + ret = AVERROR(EINVAL); + goto fail; } if ((!s->out_ch_layout || !s->in_ch_layout) && s->used_ch_count != s->out.ch_count && !s->rematrix_custom) { @@ -386,7 +388,8 @@ av_cold int swr_init(struct SwrContext *s){ av_get_channel_layout_string(l2, sizeof(l2), s->out.ch_count, s->out_ch_layout); av_log(s, AV_LOG_ERROR, "Rematrix is needed between %s and %s " "but there is not enough information to do it\n", l1, l2); - return -1; + ret = AVERROR(EINVAL); + goto fail; } av_assert0(s->used_ch_count); @@ -408,8 +411,10 @@ av_assert0(s->out.ch_count); s->out_convert= swri_audio_convert_alloc(s->out_sample_fmt, s->int_sample_fmt, s->out.ch_count, NULL, 0); - if (!s->in_convert || !s->out_convert) - return AVERROR(ENOMEM); + if (!s->in_convert || !s->out_convert) { + ret = AVERROR(ENOMEM); + goto fail; + } s->postin= s->in; s->preout= s->out; @@ -436,12 +441,19 @@ av_assert0(s->out.ch_count); } if ((ret = swri_dither_init(s, s->out_sample_fmt, s->int_sample_fmt)) < 0) - return ret; + goto fail; - if(s->rematrix || s->dither.method) - return swri_rematrix_init(s); + if(s->rematrix || s->dither.method) { + ret = swri_rematrix_init(s); + if (ret < 0) + goto fail; + } return 0; +fail: + clear_context(s); + return ret; + } int swri_realloc_audio(AudioData *a, int count){ From eb021638a116e64b8dd7ff250f5165b9a841dc93 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 4 Jun 2015 22:47:24 +0200 Subject: [PATCH 716/822] avcodec/atrac3plusdec: consume only as many bytes as available Signed-off-by: Michael Niedermayer (cherry picked from commit 6b6ae7c3ead5dee786a4aea929820076a7c82da4) Signed-off-by: Michael Niedermayer --- libavcodec/atrac3plusdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/atrac3plusdec.c b/libavcodec/atrac3plusdec.c index 652bd7890d..313ff35ba2 100644 --- a/libavcodec/atrac3plusdec.c +++ b/libavcodec/atrac3plusdec.c @@ -381,7 +381,7 @@ static int atrac3p_decode_frame(AVCodecContext *avctx, void *data, *got_frame_ptr = 1; - return avctx->block_align; + return FFMIN(avctx->block_align, avpkt->size); } AVCodec ff_atrac3p_decoder = { From c03c2f23b2299eeec48e3e8f9e0d5b74258db58a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 4 Jun 2015 22:59:34 +0200 Subject: [PATCH 717/822] avcodec/alsdec: Check for overread Signed-off-by: Michael Niedermayer (cherry picked from commit c2657633187e325a439e3297fd9ccd0522ab2e39) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index b5e748dee6..a0514ac575 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1488,6 +1488,11 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame) // TODO: read_diff_float_data + if (get_bits_left(gb) < 0) { + av_log(ctx->avctx, AV_LOG_ERROR, "Overread %d\n", -get_bits_left(gb)); + return AVERROR_INVALIDDATA; + } + return 0; } From 57c99f8fe4d6244e12c43a9b8e4c27f3e21f48b1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 4 Jun 2015 22:34:12 +0200 Subject: [PATCH 718/822] avcodec/adpcm: Check for overreads See: vlc ticket 14649 Reported-by: carl Signed-off-by: Michael Niedermayer (cherry picked from commit 3c803ed9cb23e5a8d76b6c31d8a8c71cac27e769) Signed-off-by: Michael Niedermayer --- libavcodec/adpcm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index f7f82599b0..e157a10eed 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -575,6 +575,8 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, case AV_CODEC_ID_ADPCM_IMA_DK4: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); + if (buf_size < 4 * ch) + return AVERROR_INVALIDDATA; nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch; break; case AV_CODEC_ID_ADPCM_IMA_RAD: @@ -588,13 +590,15 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, int bsamples = ff_adpcm_ima_block_samples[avctx->bits_per_coded_sample - 2]; if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); + if (buf_size < 4 * ch) + return AVERROR_INVALIDDATA; nb_samples = 1 + (buf_size - 4 * ch) / (bsize * ch) * bsamples; break; } case AV_CODEC_ID_ADPCM_MS: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); - nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch; + nb_samples = (buf_size - 6 * ch) * 2 / ch; break; case AV_CODEC_ID_ADPCM_SBPRO_2: case AV_CODEC_ID_ADPCM_SBPRO_3: @@ -607,6 +611,8 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, case AV_CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break; } if (!s->status[0].step_index) { + if (buf_size < ch) + return AVERROR_INVALIDDATA; nb_samples++; buf_size -= ch; } @@ -1525,6 +1531,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *got_frame_ptr = 1; + if (avpkt->size < bytestream2_tell(&gb)) { + av_log(avctx, AV_LOG_ERROR, "Overread of %d < %d\n", avpkt->size, bytestream2_tell(&gb)); + return avpkt->size; + } + return bytestream2_tell(&gb); } From 78ef1be8e12e04dec3ea141047bc3a34ba58fd83 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 7 Jun 2015 14:55:10 +0200 Subject: [PATCH 719/822] avformat/ffmdec: Check ffio_set_buf_size() return value Signed-off-by: Michael Niedermayer (cherry picked from commit dc55477a64cefebf8dcc611f026be71382814ae2) Signed-off-by: Michael Niedermayer --- libavformat/ffmdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 338a8502e7..ed5663f670 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -95,7 +95,9 @@ static int ffm_read_data(AVFormatContext *s, retry_read: if (pb->buffer_size != ffm->packet_size) { int64_t tell = avio_tell(pb); - ffio_set_buf_size(pb, ffm->packet_size); + int ret = ffio_set_buf_size(pb, ffm->packet_size); + if (ret < 0) + return ret; avio_seek(pb, tell, SEEK_SET); } id = avio_rb16(pb); /* PACKET_ID */ From 4cb077793d00a2f6b8510eab3a7bb49af74f7c57 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 9 Jun 2015 00:37:26 +0200 Subject: [PATCH 720/822] avcodec/jpeg2000dec: Check that coords match before applying ICT This avoid potential out of array accesses Signed-off-by: Michael Niedermayer (cherry picked from commit 12ba1b2b4d5592c0e27b0fcc83db929e8d6a8eee) Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 845feb6e73..8e46616405 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1159,11 +1159,16 @@ static void mct_decode(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) int32_t *src[3], i0, i1, i2; float *srcf[3], i0f, i1f, i2f; - for (i = 1; i < 3; i++) + for (i = 1; i < 3; i++) { if (tile->codsty[0].transform != tile->codsty[i].transform) { av_log(s->avctx, AV_LOG_ERROR, "Transforms mismatch, MCT not supported\n"); return; } + if (memcmp(tile->comp[0].coord, tile->comp[i].coord, sizeof(tile->comp[0].coord))) { + av_log(s->avctx, AV_LOG_ERROR, "Coords mismatch, MCT not supported\n"); + return; + } + } for (i = 0; i < 3; i++) if (tile->codsty[0].transform == FF_DWT97) From 4348a241ed535fe1141e4acfb3ad799b0302a8d2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 9 Jun 2015 05:11:09 +0200 Subject: [PATCH 721/822] avcodec/x86/h264_weight: handle weight1=128 Fix ticket4596 Signed-off-by: Michael Niedermayer (cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290) Signed-off-by: Michael Niedermayer --- libavcodec/x86/h264_weight.asm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm index 4759a063a6..f6b9d5f6ad 100644 --- a/libavcodec/x86/h264_weight.asm +++ b/libavcodec/x86/h264_weight.asm @@ -135,8 +135,11 @@ WEIGHT_FUNC_HALF_MM 8, 8 add off_regd, 1 or off_regd, 1 add r4, 1 + cmp r6d, 128 + je .nonnormal cmp r5, 128 jne .normal +.nonnormal sar r5, 1 sar r6, 1 sar off_regd, 1 From b2d7a0840534b54dab3ecb2e0e498505353e8c01 Mon Sep 17 00:00:00 2001 From: Simon Thelen Date: Tue, 9 Jun 2015 04:55:57 +0200 Subject: [PATCH 722/822] libavutil/channel_layout: Correctly return layout when channel specification ends with a trailing 'c'. Return layout when FF_API_GET_CHANNEL_LAYOUT_COMPAT is set even if the layout itself is not in the deprecated style. Signed-off-by: Simon Thelen Signed-off-by: Michael Niedermayer (cherry picked from commit 83307a32eb0c9f0843f655c44bb65e3e999153f8) Signed-off-by: Michael Niedermayer --- libavutil/channel_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index 4c0677f794..cd5cf426d4 100644 --- a/libavutil/channel_layout.c +++ b/libavutil/channel_layout.c @@ -138,8 +138,8 @@ static uint64_t get_channel_layout_single(const char *name, int name_len) "switch to the syntax '%.*sc' otherwise it will be interpreted as a " "channel layout number in a later version\n", name_len, name, name_len, name); - return layout; } + return layout; } } else { #endif From 4a5a6fe6ba1af6cb037ff6d818c3c4f6d2ac508d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 10 Jun 2015 00:47:43 +0200 Subject: [PATCH 723/822] avdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet() Signed-off-by: Michael Niedermayer (cherry picked from commit 913685f55208efd78bfc34d82b261bd449e69774) Signed-off-by: Michael Niedermayer --- libavdevice/lavfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index a177ad0271..457ef2065a 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -343,7 +343,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt) continue; } else if (ret < 0) return ret; - d = av_rescale_q(frame->pts, tb, AV_TIME_BASE_Q); + d = av_rescale_q_rnd(frame->pts, tb, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX); av_dlog(avctx, "sink_idx:%d time:%f\n", i, d); av_frame_unref(frame); From d6bde7be5f34126f0b70b0146dfc3415424de116 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 10 Jun 2015 00:12:38 +0200 Subject: [PATCH 724/822] takdec: ensure chan2 is a valid channel index If chan2 is not smaller than the number of channels, it can cause segmentation faults due to dereferencing a NULL pointer. Signed-off-by: Andreas Cadhalpun Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit 05c57ba2f42324da2fdc93d83d65bb68dd637613) Signed-off-by: Michael Niedermayer --- libavcodec/takdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index 86ca3ac013..cfc7ad50a5 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -800,6 +800,12 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data, if (s->mcdparams[i].present) { s->mcdparams[i].index = get_bits(gb, 2); s->mcdparams[i].chan2 = get_bits(gb, 4); + if (s->mcdparams[i].chan2 >= avctx->channels) { + av_log(avctx, AV_LOG_ERROR, + "invalid channel 2 (%d) for %d channel(s)\n", + s->mcdparams[i].chan2, avctx->channels); + return AVERROR_INVALIDDATA; + } if (s->mcdparams[i].index == 1) { if ((nbit == s->mcdparams[i].chan2) || (ch_mask & 1 << s->mcdparams[i].chan2)) From 557aa4c6b32a5271b0718cfc929b0ab874ca514a Mon Sep 17 00:00:00 2001 From: Deliang Fu Date: Wed, 10 Jun 2015 12:30:46 +0800 Subject: [PATCH 725/822] avformat: Fix bug in parse_rps for HEVC. Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps Signed-off-by: Michael Niedermayer (cherry picked from commit 6e1f8780c833ef55815111d4771b95ff78567cdb) Signed-off-by: Michael Niedermayer --- libavformat/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 9632386153..41750fcf4b 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -444,7 +444,7 @@ static int parse_rps(GetBitContext *gb, unsigned int rps_idx, * * NumDeltaPocs[RefRpsIdx]: num_delta_pocs[rps_idx - 1] */ - for (i = 0; i < num_delta_pocs[rps_idx - 1]; i++) { + for (i = 0; i <= num_delta_pocs[rps_idx - 1]; i++) { uint8_t use_delta_flag = 0; uint8_t used_by_curr_pic_flag = get_bits1(gb); if (!used_by_curr_pic_flag) From 8bb21c031074ed6346e8bb50977c0b9fc41aaa6f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 12 Jun 2015 15:36:20 +0200 Subject: [PATCH 726/822] ffmpeg_opt: Check for localtime() failure Found-by: Daemon404 Signed-off-by: Michael Niedermayer (cherry picked from commit 8e91d9652ea5048d9014e7636e12c6ed4732d7b7) Signed-off-by: Michael Niedermayer --- ffmpeg_opt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 0e75dea24c..d72858d98d 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2253,6 +2253,9 @@ static int opt_vstats(void *optctx, const char *opt, const char *arg) time_t today2 = time(NULL); struct tm *today = localtime(&today2); + if (!today) + return AVERROR(errno); + snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min, today->tm_sec); return opt_vstats_file(NULL, opt, filename); From de8e63ca82153e0af5f7e7ff4dcfc687a5e3f65b Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 23 May 2015 23:32:12 +0200 Subject: [PATCH 727/822] mov: abort on EOF in ff_mov_read_chan Otherwise the loop can take a lot of time if num_descr is very large. Signed-off-by: Andreas Cadhalpun (cherry picked from commit a5718863da99b54b6c853d45c84871c4a96a57c0) Signed-off-by: Michael Niedermayer --- libavformat/mov_chan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index e7b5221f08..de181084b2 100644 --- a/libavformat/mov_chan.c +++ b/libavformat/mov_chan.c @@ -566,6 +566,11 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, label_mask = 0; for (i = 0; i < num_descr; i++) { uint32_t label; + if (pb->eof_reached) { + av_log(s, AV_LOG_ERROR, + "reached EOF while reading channel layout\n"); + return AVERROR_INVALIDDATA; + } label = avio_rb32(pb); // mChannelLabel avio_rb32(pb); // mChannelFlags avio_rl32(pb); // mCoordinates[0] From ebf0a8fbda1f6fa43154bcf14bd897506c218c61 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 7 Jun 2015 18:50:43 +0200 Subject: [PATCH 728/822] vp9: change type of tile_size from unsigned to int64_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the check 'tile_size < size' treats a negative size as unsigned, causing the check to pass. This subsequently leads to segmentation faults. This was originally fixed as part of Libav commit 72ca83, so the original author is one of the following developers: Anton Khirnov Diego Biurrun Luca Barbato Martin Storsjö Reviewed-by: Ronald S. Bultje Signed-off-by: Andreas Cadhalpun (cherry picked from commit b18eac7ff22332c9344769af15f7b245dd13cc64) Signed-off-by: Michael Niedermayer --- libavcodec/vp9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 07d149732b..8d23c60311 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3840,7 +3840,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, tile_row, s->tiling.log2_tile_rows, s->sb_rows); if (s->pass != 2) { for (tile_col = 0; tile_col < s->tiling.tile_cols; tile_col++) { - unsigned tile_size; + int64_t tile_size; if (tile_col == s->tiling.tile_cols - 1 && tile_row == s->tiling.tile_rows - 1) { From fabb394a2dd0d1ab838dd82a1e1eb9151805a54e Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 8 Jun 2015 22:38:29 +0200 Subject: [PATCH 729/822] vp8: change mv_{min,max}.{x,y} type to int If one of the dimensions is larger than 8176, s->mb_width or s->mb_height is larger than 511, leading to an int16_t overflow of s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax. Changing the type to int avoids the overflow and has no negative effect, because s->mv_max is only used in clamp_mv for clipping. Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't increase the absolute value. The input to av_clip is an int16_t, and thus the output fits into int16_t as well. For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range before use. Reviewed-by: Ronald S. Bultje Signed-off-by: Andreas Cadhalpun (cherry picked from commit 6fdbaa2b7fb56623ab2163f861952bc1408c39b3) Signed-off-by: Michael Niedermayer --- libavcodec/vp8.c | 6 ++++-- libavcodec/vp8.h | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 296eb98202..8d4d1a82f1 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -439,8 +439,10 @@ static int decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_size) static av_always_inline void clamp_mv(VP8Context *s, VP56mv *dst, const VP56mv *src) { - dst->x = av_clip(src->x, s->mv_min.x, s->mv_max.x); - dst->y = av_clip(src->y, s->mv_min.y, s->mv_max.y); + dst->x = av_clip(src->x, av_clip(s->mv_min.x, INT16_MIN, INT16_MAX), + av_clip(s->mv_max.x, INT16_MIN, INT16_MAX)); + dst->y = av_clip(src->y, av_clip(s->mv_min.y, INT16_MIN, INT16_MAX), + av_clip(s->mv_max.y, INT16_MIN, INT16_MAX)); } /** diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h index 2f00298826..19ceb36039 100644 --- a/libavcodec/vp8.h +++ b/libavcodec/vp8.h @@ -133,6 +133,11 @@ typedef struct VP8Frame { AVBufferRef *seg_map; } VP8Frame; +typedef struct VP8intmv { + int x; + int y; +} VP8intmv; + #define MAX_THREADS 8 typedef struct VP8Context { VP8ThreadData *thread_data; @@ -151,8 +156,8 @@ typedef struct VP8Context { uint8_t deblock_filter; uint8_t mbskip_enabled; uint8_t profile; - VP56mv mv_min; - VP56mv mv_max; + VP8intmv mv_min; + VP8intmv mv_max; int8_t sign_bias[4]; ///< one state [0, 1] per ref frame type int ref_count[3]; From f87d76e659e0a4048ffe86f183f55d6811ff4143 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 9 Jun 2015 22:41:24 +0200 Subject: [PATCH 730/822] sonic: set avctx->channels in sonic_decode_init Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun (cherry picked from commit 58995f647b5fa2e1efa33ae4f8b8a76a81ec99df) Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index a5e573a7aa..7f154b4df0 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -884,6 +884,7 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Only mono and stereo streams are supported by now\n"); return AVERROR_INVALIDDATA; } + avctx->channels = s->channels; s->lossless = get_bits1(&gb); if (!s->lossless) From 539603e8770faa416f9b8383ddc8659e3b463bca Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 17 Jun 2015 00:21:02 +0200 Subject: [PATCH 731/822] avio: fix potential crashes when combining ffio_ensure_seekback + crc Calling ffio_ensure_seekback() if ffio_init_checksum() has been called on the same context can lead to out of bounds memory accesses and crashes. The reason is that ffio_ensure_seekback() does not update checksum_ptr after reallocating the buffer, resulting in a dangling pointer. This effectively fixes potential crashes when opening mp3 files. Signed-off-by: Michael Niedermayer (cherry picked from commit dc87758775e2ce8be84e4fe598e12416e83d2845) Conflicts: libavformat/aviobuf.c --- libavformat/aviobuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index db5a0f3227..a311f53b56 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -765,6 +765,7 @@ int ffio_ensure_seekback(AVIOContext *s, int buf_size) uint8_t *buffer; int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE; + ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - s->buffer : -1; buf_size += s->buf_ptr - s->buffer + max_buffer_size; @@ -782,6 +783,8 @@ int ffio_ensure_seekback(AVIOContext *s, int buf_size) s->buf_end = buffer + (s->buf_end - s->buffer); s->buffer = buffer; s->buffer_size = buf_size; + if (checksum_ptr_offset >= 0) + s->checksum_ptr = s->buffer + checksum_ptr_offset; return 0; } From d29153591299a05990d1319c4b76aa7d113ba292 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 6 May 2015 15:34:53 +0200 Subject: [PATCH 732/822] diracdec: check that block length is valid In init_planes p->xblen and p->yblen are set to: p->xblen = s->plane[0].xblen >> s->chroma_x_shift; p->yblen = s->plane[0].yblen >> s->chroma_y_shift; These are later used as block_w and block_h arguments of s->vdsp.emulated_edge_mc. If one of them is 0 it triggers an av_assert2 in emulated_edge_mc: av_assert2(start_x < end_x && block_w > 0); av_assert2(start_y < end_y && block_h > 0); Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 75fc81c8318505aa7946e05a9bee08d47241fc66) Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 5579dfb2a4..1edeab958f 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -894,6 +894,14 @@ static int dirac_unpack_prediction_parameters(DiracContext *s) /*[DIRAC_STD] 11.2.4 motion_data_dimensions() Calculated in function dirac_unpack_block_motion_data */ + if (s->plane[0].xblen % (1 << s->chroma_x_shift) != 0 || + s->plane[0].yblen % (1 << s->chroma_y_shift) != 0 || + !s->plane[0].xblen || !s->plane[0].yblen) { + av_log(s->avctx, AV_LOG_ERROR, + "invalid x/y block length (%d/%d) for x/y chroma shift (%d/%d)\n", + s->plane[0].xblen, s->plane[0].yblen, s->chroma_x_shift, s->chroma_y_shift); + return AVERROR_INVALIDDATA; + } if (!s->plane[0].xbsep || !s->plane[0].ybsep || s->plane[0].xbsep < s->plane[0].xblen/2 || s->plane[0].ybsep < s->plane[0].yblen/2) { av_log(s->avctx, AV_LOG_ERROR, "Block separation too small\n"); return -1; From 3a0c421b566976ca276f95a506be86b1836ef04a Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 22 Apr 2015 15:23:24 +0200 Subject: [PATCH 733/822] aacsbr: break infinite loop in sbr_hf_calc_npatches Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 584cc1ade10a3297ef9c107ef3a2081c04024156) Signed-off-by: Michael Niedermayer --- libavcodec/aacsbr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 290fb819e7..fcc4941e9d 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -520,7 +520,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, /// High Frequency Generation - Patch Construction (14496-3 sp04 p216 fig. 4.46) static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr) { - int i, k, sb = 0; + int i, k, last_k = -1, last_msb = -1, sb = 0; int msb = sbr->k[0]; int usb = sbr->kx[1]; int goal_sb = ((1000 << 11) + (sbr->sample_rate >> 1)) / sbr->sample_rate; @@ -534,6 +534,12 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr) do { int odd = 0; + if (k == last_k && msb == last_msb) { + av_log(ac->avctx, AV_LOG_ERROR, "patch construction failed\n"); + return AVERROR_INVALIDDATA; + } + last_k = k; + last_msb = msb; for (i = k; i == k || sb > (sbr->k[0] - 1 + msb - odd); i--) { sb = sbr->f_master[i]; odd = (sb + sbr->k[0]) & 1; From 9f9af1dd04fb0b8359f229d407d4f98515f25460 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 May 2015 16:06:50 +0200 Subject: [PATCH 734/822] libavutil/mem: use size_t for the length in av_strdup() the string length is not constrained to INT_MAX Signed-off-by: Michael Niedermayer (cherry picked from commit 4950bd4ebedbb6289734234bb2a719820f565c41) Signed-off-by: Michael Niedermayer --- libavutil/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/mem.c b/libavutil/mem.c index 10b0137a7e..e50df1ec41 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -258,7 +258,7 @@ char *av_strdup(const char *s) { char *ptr = NULL; if (s) { - int len = strlen(s) + 1; + size_t len = strlen(s) + 1; ptr = av_realloc(NULL, len); if (ptr) memcpy(ptr, s, len); From 0b6c8bb26c623ec1f6484cb1071c67ad1f9662db Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 May 2015 16:09:07 +0200 Subject: [PATCH 735/822] avutil/dict: Use size_t for appending strings the string length is not constrained to INT_MAX Signed-off-by: Michael Niedermayer (cherry picked from commit 4c128ea1629116fc4936edc5f96bbd18f3ef1647) Conflicts: libavutil/dict.c --- libavutil/dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/dict.c b/libavutil/dict.c index 3a0e84cd40..73dbfd55a0 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -92,7 +92,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags if (flags & AV_DICT_DONT_STRDUP_VAL) { m->elems[m->count].value = (char*)(intptr_t)value; } else if (oldval && flags & AV_DICT_APPEND) { - int len = strlen(oldval) + strlen(value) + 1; + size_t len = strlen(oldval) + strlen(value) + 1; char *newval = av_mallocz(len); if (!newval) return AVERROR(ENOMEM); From d27b9d3bd1d216ec98807a8d7f1e04aab3975d8c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 11 May 2015 15:23:51 +0200 Subject: [PATCH 736/822] avformat/vorbiscomment: Check entry length in ff_vorbiscomment_write() Signed-off-by: Michael Niedermayer (cherry picked from commit eca38864a6ce5053e463b8d3fc22b22bc9a49578) Signed-off-by: Michael Niedermayer --- libavformat/vorbiscomment.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/vorbiscomment.c b/libavformat/vorbiscomment.c index f17a0c1d13..7ca919cbf9 100644 --- a/libavformat/vorbiscomment.c +++ b/libavformat/vorbiscomment.c @@ -63,8 +63,10 @@ int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m, AVDictionaryEntry *tag = NULL; bytestream_put_le32(p, count); while ((tag = av_dict_get(*m, "", tag, AV_DICT_IGNORE_SUFFIX))) { - unsigned int len1 = strlen(tag->key); - unsigned int len2 = strlen(tag->value); + int64_t len1 = strlen(tag->key); + int64_t len2 = strlen(tag->value); + if (len1+1+len2 > UINT32_MAX) + return AVERROR(EINVAL); bytestream_put_le32(p, len1+1+len2); bytestream_put_buffer(p, tag->key, len1); bytestream_put_byte(p, '='); From f76b54fba781596eef7f45851f6fc0efdc23bebe Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 11 May 2015 20:01:15 +0200 Subject: [PATCH 737/822] avutil/avstring: Use size_t in av_strlcatf() Signed-off-by: Michael Niedermayer (cherry picked from commit ae4eea8be45a0b212fd57ceaac1f11089ab81d98) Signed-off-by: Michael Niedermayer --- libavutil/avstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/avstring.c b/libavutil/avstring.c index e75cdc6312..d306cbe832 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -99,7 +99,7 @@ size_t av_strlcat(char *dst, const char *src, size_t size) size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) { - int len = strlen(dst); + size_t len = strlen(dst); va_list vl; va_start(vl, fmt); From 17ad9778a9a3da3f7c314c31ba9bc78b5ede8c4f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 11 May 2015 03:50:01 +0200 Subject: [PATCH 738/822] avformat/url: Use size_t for len from strlen() Signed-off-by: Michael Niedermayer (cherry picked from commit 95efc651294b3cf3e5ec4b3ed36e79d7261545ff) Signed-off-by: Michael Niedermayer --- libavformat/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/url.c b/libavformat/url.c index 47e15843cf..9b94163637 100644 --- a/libavformat/url.c +++ b/libavformat/url.c @@ -68,7 +68,7 @@ int ff_url_join(char *str, int size, const char *proto, av_strlcatf(str, size, ":%d", port); if (fmt) { va_list vl; - int len = strlen(str); + size_t len = strlen(str); va_start(vl, fmt); vsnprintf(str + len, size > len ? size - len : 0, fmt, vl); From 404db2b99eca0e71cc8026839c6e1fc43f2c86e3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 May 2015 15:38:40 +0200 Subject: [PATCH 739/822] avformat/subtitles: Use size_t for len MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit string length could theoretically be larger than int Reviewed-by: Clément Bœsch Signed-off-by: Michael Niedermayer (cherry picked from commit a633928d47057426a9c328da594407d1c7da8a5c) Signed-off-by: Michael Niedermayer --- libavformat/subtitles.c | 4 ++-- libavformat/subtitles.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c index fce2bf190b..b7795d8104 100644 --- a/libavformat/subtitles.c +++ b/libavformat/subtitles.c @@ -24,7 +24,7 @@ #include "libavutil/avstring.h" AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q, - const uint8_t *event, int len, int merge) + const uint8_t *event, size_t len, int merge) { AVPacket *subs, *sub; @@ -218,7 +218,7 @@ int ff_smil_extract_next_chunk(AVIOContext *pb, AVBPrint *buf, char *c) const char *ff_smil_get_attr_ptr(const char *s, const char *attr) { int in_quotes = 0; - const int len = strlen(attr); + const size_t len = strlen(attr); while (*s) { while (*s) { diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h index b5a96ec08c..5ed23d0fb9 100644 --- a/libavformat/subtitles.h +++ b/libavformat/subtitles.h @@ -47,7 +47,7 @@ typedef struct { * previous one instead of adding a new entry, 0 otherwise */ AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q, - const uint8_t *event, int len, int merge); + const uint8_t *event, size_t len, int merge); /** * Set missing durations and sort subtitles by PTS, and then byte position. From 6bb62d64d2400a2d3139855b89fb911b0638cfbc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 03:59:30 +0200 Subject: [PATCH 740/822] tools/graph2dot: use larger data types than int for array/string sizes Signed-off-by: Michael Niedermayer (cherry picked from commit acf4925f444636a828534ab47d0f86c21a7a9b4e) Signed-off-by: Michael Niedermayer --- tools/graph2dot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/graph2dot.c b/tools/graph2dot.c index 964322d080..868c62f0d8 100644 --- a/tools/graph2dot.c +++ b/tools/graph2dot.c @@ -153,7 +153,7 @@ int main(int argc, char **argv) /* read from infile and put it in a buffer */ { - unsigned int count = 0; + int64_t count = 0; struct line *line, *last_line, *first_line; char *p; last_line = first_line = av_malloc(sizeof(struct line)); @@ -169,7 +169,7 @@ int main(int argc, char **argv) graph_string = av_malloc(count + 1); p = graph_string; for (line = first_line; line->next; line = line->next) { - unsigned int l = strlen(line->data); + size_t l = strlen(line->data); memcpy(p, line->data, l); p += l; } From 0452e3e41cd08fba370cae661d7b96f2ce53512c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 18:03:55 +0200 Subject: [PATCH 741/822] avformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet() Larger packets are not supported and would cause problems later Signed-off-by: Michael Niedermayer (cherry picked from commit aa5169935e160551fb1c290d1397da2f04325817) Signed-off-by: Michael Niedermayer --- libavformat/rtpdec_xiph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index 887a65ed65..3acc89488f 100644 --- a/libavformat/rtpdec_xiph.c +++ b/libavformat/rtpdec_xiph.c @@ -112,7 +112,7 @@ static int xiph_handle_packet(AVFormatContext *ctx, PayloadContext *data, return data->split_pkts > 0; } - if (len < 6) { + if (len < 6 || len > INT_MAX/2) { av_log(ctx, AV_LOG_ERROR, "Invalid %d byte packet\n", len); return AVERROR_INVALIDDATA; } From b8060bc217e446e2e617798e11c3eab048d4bb41 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 17:55:40 +0200 Subject: [PATCH 742/822] avformat/rtpenc_jpeg: Check remaining buffer size for SOS Fixes CID1238818 Signed-off-by: Michael Niedermayer (cherry picked from commit 81198a68370e88f7d02f16de58db36713c2a50b6) Signed-off-by: Michael Niedermayer --- libavformat/rtpenc_jpeg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c index d6691f2984..59baf3b113 100644 --- a/libavformat/rtpenc_jpeg.c +++ b/libavformat/rtpenc_jpeg.c @@ -80,6 +80,11 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size) } else if (buf[i + 1] == SOS) { /* SOS is last marker in the header */ i += AV_RB16(&buf[i + 2]) + 2; + if (i > size) { + av_log(s1, AV_LOG_ERROR, + "Insufficient data. Aborted!\n"); + return; + } break; } } From 3062689f3766240b3d5fbf4b850fff5d25075f47 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 18:20:23 +0200 Subject: [PATCH 743/822] avformat/nutdec: Fix use of uinitialized value Fixes CID1041175 Signed-off-by: Michael Niedermayer (cherry picked from commit 56abf35151c635caa3eb04bbb90454bae5463a09) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index e2cb153237..432e96aed1 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -509,6 +509,8 @@ static int decode_info_header(NUTContext *nut) for (i = 0; i < count; i++) { get_str(bc, name, sizeof(name)); value = get_s(bc); + str_value[0] = 0; + if (value == -1) { type = "UTF-8"; get_str(bc, str_value, sizeof(str_value)); From ed578c91bfdf820dc10b9e32fb05e6ddf185f3e7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 18:32:12 +0200 Subject: [PATCH 744/822] avformat/matroskadec: Cleanup error handling for bz2 & zlib Fixes CID703652 Signed-off-by: Michael Niedermayer (cherry picked from commit 171af59d58fc67d82dce8ff7ed11fa671108baa5) Conflicts: libavformat/matroskadec.c --- libavformat/matroskadec.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e04122b7f2..4c06c99366 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1187,15 +1187,13 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, newpktdata = av_realloc(pkt_data, pkt_size); if (!newpktdata) { inflateEnd(&zstream); + result = AVERROR(ENOMEM); goto failed; } pkt_data = newpktdata; zstream.avail_out = pkt_size - zstream.total_out; zstream.next_out = pkt_data + zstream.total_out; - if (pkt_data) { - result = inflate(&zstream, Z_NO_FLUSH); - } else - result = Z_MEM_ERROR; + result = inflate(&zstream, Z_NO_FLUSH); } while (result==Z_OK && pkt_size<10000000); pkt_size = zstream.total_out; inflateEnd(&zstream); @@ -1221,15 +1219,13 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, newpktdata = av_realloc(pkt_data, pkt_size); if (!newpktdata) { BZ2_bzDecompressEnd(&bzstream); + result = AVERROR(ENOMEM); goto failed; } pkt_data = newpktdata; bzstream.avail_out = pkt_size - bzstream.total_out_lo32; bzstream.next_out = pkt_data + bzstream.total_out_lo32; - if (pkt_data) { - result = BZ2_bzDecompress(&bzstream); - } else - result = BZ_MEM_ERROR; + result = BZ2_bzDecompress(&bzstream); } while (result==BZ_OK && pkt_size<10000000); pkt_size = bzstream.total_out_lo32; BZ2_bzDecompressEnd(&bzstream); From 55a9a373590b110e530531c4010fd271be5c93b0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 19:09:06 +0200 Subject: [PATCH 745/822] avformat/hevc: Check cpb_cnt_minus1 Fixes CID1239014 Signed-off-by: Michael Niedermayer (cherry picked from commit 2cddc0b19a20dd061dbf199bf88005b37c540d2f) Signed-off-by: Michael Niedermayer --- libavformat/hevc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 41750fcf4b..9d902e7eac 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -189,7 +189,7 @@ static void skip_sub_layer_hrd_parameters(GetBitContext *gb, } } -static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag, +static int skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag, unsigned int max_sub_layers_minus1) { unsigned int i; @@ -246,8 +246,11 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag, else low_delay_hrd_flag = get_bits1(gb); - if (!low_delay_hrd_flag) + if (!low_delay_hrd_flag) { cpb_cnt_minus1 = get_ue_golomb_long(gb); + if (cpb_cnt_minus1 > 31) + return AVERROR_INVALIDDATA; + } if (nal_hrd_parameters_present_flag) skip_sub_layer_hrd_parameters(gb, cpb_cnt_minus1, @@ -257,6 +260,8 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag, skip_sub_layer_hrd_parameters(gb, cpb_cnt_minus1, sub_pic_hrd_params_present_flag); } + + return 0; } static void skip_timing_info(GetBitContext *gb) From 06fda5bef349d9977ae947757d0fdb723366d2d7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 12 May 2015 19:28:15 +0200 Subject: [PATCH 746/822] avformat/hevc: Check num_negative_pics and num_positive_pics Fixes CID1238994 Signed-off-by: Michael Niedermayer (cherry picked from commit b62b3292d8e25d3240e462c1b1cd8ac69195c46b) Signed-off-by: Michael Niedermayer --- libavformat/hevc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 9d902e7eac..49f8ce482c 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -462,6 +462,9 @@ static int parse_rps(GetBitContext *gb, unsigned int rps_idx, unsigned int num_negative_pics = get_ue_golomb_long(gb); unsigned int num_positive_pics = get_ue_golomb_long(gb); + if ((num_positive_pics + (uint64_t)num_negative_pics) * 2 > get_bits_left(gb)) + return AVERROR_INVALIDDATA; + num_delta_pocs[rps_idx] = num_negative_pics + num_positive_pics; for (i = 0; i < num_negative_pics; i++) { From 14d69655b782e1d7fe14ce924bdff76920dab881 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 12 May 2015 20:27:21 +0200 Subject: [PATCH 747/822] aacdec: don't return frames without data Since commit 676a395a aac->frame->data is not necessarily allocated at the end of aac_decode_frame_int if avctx->channels is 0. In this case a bogus frame without any data, but non-zero nb_samples is returned. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit ec38a1ba404b8cb8d71ccee2b8dcd6f3fcbde273) Signed-off-by: Michael Niedermayer --- libavcodec/aacdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 47282a1731..8f73db6861 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -3021,6 +3021,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, AV_WL32(side, 2*AV_RL32(side)); } + if (!ac->frame->data[0] && samples) { + av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); + err = AVERROR_INVALIDDATA; + goto fail; + } + *got_frame_ptr = !!samples; if (samples) { ac->frame->nb_samples = samples; From e1b98555b9aa6bfb60d9c58172ca493b08f2f43b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 00:41:38 +0200 Subject: [PATCH 748/822] avcodec/vqavideo: Check chunk size Fixes CID1239154 Signed-off-by: Michael Niedermayer (cherry picked from commit 8a62b80ce6c8e87e7937f9a5d68f83882c1c8da2) Signed-off-by: Michael Niedermayer --- libavcodec/vqavideo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index c34849d577..57bd224886 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -231,6 +231,12 @@ static int decode_format80(VqaContext *s, int src_size, unsigned char color; int i; + if (src_size < 0 || src_size > bytestream2_get_bytes_left(&s->gb)) { + av_log(s->avctx, AV_LOG_ERROR, "Chunk size %d is out of range\n", + src_size); + return AVERROR_INVALIDDATA; + } + start = bytestream2_tell(&s->gb); while (bytestream2_tell(&s->gb) - start < src_size) { opcode = bytestream2_get_byte(&s->gb); From 6d6acef9fb83e616d983700f824a13146c0c4a2f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 01:31:15 +0200 Subject: [PATCH 749/822] avcodec/hevc_sei: Check num_sps_ids_minus1 value Fixes CID1271794 Signed-off-by: Michael Niedermayer (cherry picked from commit 93b0ee21a2f534f6d3b812686f3acde110e94f18) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_sei.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c index 216db37e53..ce9f2545ea 100644 --- a/libavcodec/hevc_sei.c +++ b/libavcodec/hevc_sei.c @@ -111,6 +111,11 @@ static int active_parameter_sets(HEVCContext *s) get_bits(gb, 1); // num_sps_ids_minus1 num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1 + if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) { + av_log(s->avctx, AV_LOG_ERROR, "num_sps_ids_minus1 %d invalid\n", num_sps_ids_minus1); + return AVERROR_INVALIDDATA; + } + active_seq_parameter_set_id = get_ue_golomb_long(gb); if (active_seq_parameter_set_id >= MAX_SPS_COUNT) { av_log(s->avctx, AV_LOG_ERROR, "active_parameter_set_id %d invalid\n", active_seq_parameter_set_id); From eed8ccd9eb3eb37e7ba09c5fb921f7db76d305ae Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 13:13:07 +0200 Subject: [PATCH 750/822] avcodec/hevc: Check offset_len Fixes CID1239099 part 1 Signed-off-by: Michael Niedermayer (cherry picked from commit 3e9d5e16ad9799f6b6faae4f21120d23146b84c9) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 2d81a3a874..7b2bd154f3 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -649,6 +649,13 @@ static int hls_slice_header(HEVCContext *s) int offset_len = get_ue_golomb_long(gb) + 1; int segments = offset_len >> 4; int rest = (offset_len & 15); + + if (offset_len < 1 || offset_len > 32) { + sh->num_entry_point_offsets = 0; + av_log(s->avctx, AV_LOG_ERROR, "offset_len %d is invalid\n", offset_len); + return AVERROR_INVALIDDATA; + } + av_freep(&sh->entry_point_offset); av_freep(&sh->offset); av_freep(&sh->size); From 87d2c6105df2c1b37c4b3b1b83ab4f65734ade2c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 13:21:52 +0200 Subject: [PATCH 751/822] avcodec/hevc: Check num_entry_point_offsets Fixes CID1239099 part 2 Signed-off-by: Michael Niedermayer (cherry picked from commit 1c6ae98d4a9ff9ea607df87908393eda4ebdf4e8) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 7b2bd154f3..9d8204cf23 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -644,7 +644,14 @@ static int hls_slice_header(HEVCContext *s) sh->num_entry_point_offsets = 0; if (s->pps->tiles_enabled_flag || s->pps->entropy_coding_sync_enabled_flag) { - sh->num_entry_point_offsets = get_ue_golomb_long(gb); + unsigned num_entry_point_offsets = get_ue_golomb_long(gb); + // It would be possible to bound this tighter but this here is simpler + if (sh->num_entry_point_offsets > get_bits_left(gb)) { + av_log(s->avctx, AV_LOG_ERROR, "num_entry_point_offsets %d is invalid\n", num_entry_point_offsets); + return AVERROR_INVALIDDATA; + } + + sh->num_entry_point_offsets = num_entry_point_offsets; if (sh->num_entry_point_offsets > 0) { int offset_len = get_ue_golomb_long(gb) + 1; int segments = offset_len >> 4; From a2e183aa0552753af91559303229dfd5ebc61ed1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 13:35:57 +0200 Subject: [PATCH 752/822] avcodec/hevc_ps: Check vps_num_hrd_parameters Fix CID1239052 part2 Signed-off-by: Michael Niedermayer (cherry picked from commit b195aa5d529040f43ab3acf0079cecbeb111bd57) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 2dad58d5c0..85d1213008 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -396,6 +396,11 @@ int ff_hevc_decode_nal_vps(HEVCContext *s) if (vps->vps_poc_proportional_to_timing_flag) vps->vps_num_ticks_poc_diff_one = get_ue_golomb_long(gb) + 1; vps->vps_num_hrd_parameters = get_ue_golomb_long(gb); + if (vps->vps_num_hrd_parameters > (unsigned)vps->vps_num_layer_sets) { + av_log(s->avctx, AV_LOG_ERROR, + "vps_num_hrd_parameters %d is invalid\n", vps->vps_num_hrd_parameters); + goto err; + } for (i = 0; i < vps->vps_num_hrd_parameters; i++) { int common_inf_present = 1; From 003b006c85649ea3efb903874051c3405cdbcc2b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 13:53:33 +0200 Subject: [PATCH 753/822] avcodec/hevc_ps: Explicitly check num_tile_* for negative values This fixes nothing but maybe helps coverity which does not see that this is failing later Signed-off-by: Michael Niedermayer (cherry picked from commit 65e5032955cb5022f0f39160aa3839f0799456bd) Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 85d1213008..a8534be85a 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1129,14 +1129,14 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) if (pps->tiles_enabled_flag) { pps->num_tile_columns = get_ue_golomb_long(gb) + 1; pps->num_tile_rows = get_ue_golomb_long(gb) + 1; - if (pps->num_tile_columns == 0 || + if (pps->num_tile_columns <= 0 || pps->num_tile_columns >= sps->width) { av_log(s->avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n", pps->num_tile_columns - 1); ret = AVERROR_INVALIDDATA; goto err; } - if (pps->num_tile_rows == 0 || + if (pps->num_tile_rows <= 0 || pps->num_tile_rows >= sps->height) { av_log(s->avctx, AV_LOG_ERROR, "num_tile_rows_minus1 out of range: %d\n", pps->num_tile_rows - 1); From 046439d6084e0d8cb89ad61a50b3386eeecdc7bb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 15:15:55 +0200 Subject: [PATCH 754/822] avcodec/jpeg2000dec: fix boolean operator Fixes CID1271791 #7-6 Signed-off-by: Michael Niedermayer (cherry picked from commit f8f155a18ac454e7ff3312e0e0c3a70eb4359143) Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 8e46616405..080f9876b2 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1607,7 +1607,7 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s) int cn = bytestream2_get_be16(&s->g); int av_unused typ = bytestream2_get_be16(&s->g); int asoc = bytestream2_get_be16(&s->g); - if (cn < 4 || asoc < 4) + if (cn < 4 && asoc < 4) s->cdef[cn] = asoc; } } From 611791e77e941df84f63956a2fc02527c93e292d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 13 May 2015 18:36:19 +0200 Subject: [PATCH 755/822] avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt() Signed-off-by: Michael Niedermayer (cherry picked from commit 81cf9108563510dee24f73b2c5d94a7bd07ff747) Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 64c6fce669..f23f622922 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -177,7 +177,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s) s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1; av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n", index, s->qscale[index]); - len -= 65; + len -= 1 + 64 * (1+pr); } return 0; } From 02c51e05640c4610e5ad5ee3e911497dbdf52de7 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 13 May 2015 18:31:27 +0200 Subject: [PATCH 756/822] swr: fix alignment issue caused by 8ch sse functions Fix crash when doing 8 ch conversion from apps compiled with MSVS Thanks to Ronald for giving this hint: https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html Reviewed-by: "Ronald S. Bultje" Signed-off-by: Michael Niedermayer (cherry picked from commit adb7372f7495927a226edf9b8e1d0ac9453985ea) Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 68c53e6f6b..6baf157ad0 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -23,6 +23,7 @@ #include "audioconvert.h" #include "libavutil/avassert.h" #include "libavutil/channel_layout.h" +#include "libavutil/internal.h" #include @@ -758,8 +759,8 @@ int swr_is_initialized(struct SwrContext *s) { return !!s->in_buffer.ch_count; } -int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, - const uint8_t *in_arg [SWR_CH_MAX], int in_count){ +int attribute_align_arg swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, + const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; From 05a3a3e5b0d9fe84fc66650c5d88957637940c01 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 14 May 2015 00:09:56 +0200 Subject: [PATCH 757/822] avcodec/mpeg4audio: add some padding/alignment to MAX_PCE_SIZE This avoids potential accesses over the end Signed-off-by: Michael Niedermayer (cherry picked from commit 93cfa7d1692c25cff045f99ba1af2c9e5772c45e) Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4audio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index 0f410455f5..a1f3ffc59b 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -101,7 +101,7 @@ enum AudioObjectType { AOT_USAC, ///< N Unified Speech and Audio Coding }; -#define MAX_PCE_SIZE 304 /// Date: Thu, 14 May 2015 17:54:40 +0200 Subject: [PATCH 758/822] avcodec/cavsdec: Check esc_code Signed-off-by: Michael Niedermayer (cherry picked from commit 139e1c8009df7729a53eaaae7036ca01071aced5) Signed-off-by: Michael Niedermayer --- libavcodec/cavsdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 399b5b914f..9be38fc9d3 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -570,6 +570,11 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb, return AVERROR_INVALIDDATA; } esc_code = get_ue_code(gb, esc_golomb_order); + if (esc_code < 0 || esc_code > 32767) { + av_log(h->avctx, AV_LOG_ERROR, "esc_code invalid\n"); + return AVERROR_INVALIDDATA; + } + level = esc_code + (run > r->max_run ? 1 : r->level_add[run]); while (level > r->inc_limit) r++; From f06168f7dcd2a7ab67f3369986c465eea9cb2402 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 14 May 2015 18:27:31 +0200 Subject: [PATCH 759/822] hevc: make avcodec_decode_video2() fail if get_format() fails Personally, I need the decoder to back out if get_format() returns no usable pixel format. This didn't work because the error code was not propagated down the call chain. This in turn happened because the variable declaration removed in this patch shadowed the variable, whose value is returned at the end of the function. Consequently, failures of decode_nal_unit() were ignored in this place. Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit cc5e4bb48476a89cc8ce0c41bc2bd2e8fda9b37c) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 9d8204cf23..57bda4c427 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2641,7 +2641,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) /* parse the NAL units */ for (i = 0; i < s->nb_nals; i++) { - int ret; s->skipped_bytes = s->skipped_bytes_nal[i]; s->skipped_bytes_pos = s->skipped_bytes_pos_nal[i]; From d9194389049b7e63707e7549fb43b72591d50a53 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 14 May 2015 20:49:25 +0200 Subject: [PATCH 760/822] avcodec/dcadec: Check nchans Fixes CID1239110 Signed-off-by: Michael Niedermayer (cherry picked from commit a6a45774d045007f8262cd7c614804390e53122e) Signed-off-by: Michael Niedermayer --- libavcodec/dcadec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index c02d7a7f4a..1d020badc1 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -581,6 +581,14 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel, } nchans = get_bits(&s->gb, 3) + 1; + if (xxch && nchans >= 3) { + av_log(s->avctx, AV_LOG_ERROR, "nchans %d is too large\n", nchans); + return AVERROR_INVALIDDATA; + } else if (nchans + base_channel > DCA_PRIM_CHANNELS_MAX) { + av_log(s->avctx, AV_LOG_ERROR, "channel sum %d + %d is too large\n", nchans, base_channel); + return AVERROR_INVALIDDATA; + } + s->total_channels = nchans + base_channel; s->prim_channels = s->total_channels; From b259c7e891016df2c6a8f1b84c62838f5b7c68ff Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 14 May 2015 21:29:19 +0200 Subject: [PATCH 761/822] avcodec/dcadec: Check subsubframes Fixes: CID1239152 Signed-off-by: Michael Niedermayer (cherry picked from commit a9bf628bfdad142763880a3d1ccb6058040dda57) Signed-off-by: Michael Niedermayer --- libavcodec/dcadec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 1d020badc1..43fc40d6c9 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -847,6 +847,10 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index) if (!base_channel) { s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2) + 1; + if (block_index + s->subsubframes[s->current_subframe] > s->sample_blocks/8) { + s->subsubframes[s->current_subframe] = 1; + return AVERROR_INVALIDDATA; + } s->partial_samples[s->current_subframe] = get_bits(&s->gb, 3); } From f8f24d5dbdf9d3dd167ae272700f3f292211edd7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 9 May 2015 13:07:00 +0200 Subject: [PATCH 762/822] ffmpeg_opt: Fix -timestamp parsing Signed-off-by: Michael Niedermayer (cherry picked from commit 107e4da47644fe615ea821d6a19682d73789aca7) Signed-off-by: Michael Niedermayer --- ffmpeg_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index d72858d98d..2606151dfb 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2732,7 +2732,7 @@ const OptionDef options[] = { { "itsscale", HAS_ARG | OPT_DOUBLE | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(ts_scale) }, "set the input ts scale", "scale" }, - { "timestamp", HAS_ARG | OPT_PERFILE, { .func_arg = opt_recording_timestamp }, + { "timestamp", HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_recording_timestamp }, "set the recording timestamp ('now' to set the current time)", "time" }, { "metadata", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(metadata) }, "add metadata", "string=string" }, From cd489b8f6469aac8abeee26b495d6c93b3805df3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 15:23:32 +0200 Subject: [PATCH 763/822] avcodec/proresdec2: Reset slice_count on deallocation Signed-off-by: Michael Niedermayer (cherry picked from commit c4c6aea397f62421bf8ef0449b2b465a53e4ab4d) Conflicts: libavcodec/proresdec2.c --- libavcodec/proresdec2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index b1affadaac..54ef9de6ce 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -182,6 +182,7 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons if (ctx->slice_count != slice_count || !ctx->slices) { av_freep(&ctx->slices); + ctx->slice_count = 0; ctx->slices = av_mallocz(slice_count * sizeof(*ctx->slices)); if (!ctx->slices) return AVERROR(ENOMEM); From 9f885733d6a9ab200d5bfdf7d09e929ad8c4a4ae Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 16:58:51 +0200 Subject: [PATCH 764/822] avcodec/shorten: Fix code depending on signed overflow behavior Signed-off-by: Michael Niedermayer (cherry picked from commit 2d15588124ab1d4c0612cab66f02a716f1509211) Signed-off-by: Michael Niedermayer --- libavcodec/shorten.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 8b91ed3645..98c11703cd 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -129,8 +129,7 @@ static int allocate_buffers(ShortenContext *s) av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n"); return AVERROR_INVALIDDATA; } - if (s->blocksize + s->nwrap >= UINT_MAX / sizeof(int32_t) || - s->blocksize + s->nwrap <= (unsigned)s->nwrap) { + if (s->blocksize + (uint64_t)s->nwrap >= UINT_MAX / sizeof(int32_t)) { av_log(s->avctx, AV_LOG_ERROR, "s->blocksize + s->nwrap too large\n"); return AVERROR_INVALIDDATA; From 16af12a807ce8d5672e9af1ee9e0bbb1b78a393b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 16:48:31 +0200 Subject: [PATCH 765/822] avcodec/shorten: Check skip_bytes() Fixes CID1210526 Signed-off-by: Michael Niedermayer (cherry picked from commit d201becfc0d89c6a5dfe44e96f1044fbc2aadb70) Signed-off-by: Michael Niedermayer --- libavcodec/shorten.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 98c11703cd..93559ee0a8 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -369,6 +369,11 @@ static int read_header(ShortenContext *s) s->nmean = get_uint(s, 0); skip_bytes = get_uint(s, NSKIPSIZE); + if ((unsigned)skip_bytes > get_bits_left(&s->gb)/8) { + av_log(s->avctx, AV_LOG_ERROR, "invalid skip_bytes: %d\n", skip_bytes); + return AVERROR_INVALIDDATA; + } + for (i = 0; i < skip_bytes; i++) skip_bits(&s->gb, 8); } From 47db54cef679398a98ea41cd6defbfb12708da1c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 17:02:28 +0200 Subject: [PATCH 766/822] avcodec/shorten: More complete pred_order check Fixes CID1239055 Signed-off-by: Michael Niedermayer (cherry picked from commit 294469416d8193a28710d802bb0c46e5fa09fad7) Signed-off-by: Michael Niedermayer --- libavcodec/shorten.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 93559ee0a8..b862e15136 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -277,7 +277,7 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel, if (command == FN_QLPC) { /* read/validate prediction order */ pred_order = get_ur_golomb_shorten(&s->gb, LPCQSIZE); - if (pred_order > s->nwrap) { + if ((unsigned)pred_order > s->nwrap) { av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n", pred_order); return AVERROR(EINVAL); From 49a759fb3fe9117c179b928c02ee7ef2d7f553b1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 17:21:10 +0200 Subject: [PATCH 767/822] avcodec/smvjpegdec: check avcodec_decode_video2() return code Fixes CID1271810 Signed-off-by: Michael Niedermayer (cherry picked from commit cdd25f9a3df3905543a5546cf6076d2eaf895736) Signed-off-by: Michael Niedermayer --- libavcodec/smvjpegdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index f883ecf80a..41b9ed2765 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -137,6 +137,10 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz if (!cur_frame) { av_frame_unref(mjpeg_data); ret = avcodec_decode_video2(s->avctx, mjpeg_data, &s->mjpeg_data_size, avpkt); + if (ret < 0) { + s->mjpeg_data_size = 0; + return ret; + } } else if (!s->mjpeg_data_size) return AVERROR(EINVAL); From 3a43c712aebc796962a9dc5d26012a32b6381afd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 17:26:25 +0200 Subject: [PATCH 768/822] avcodec/sonic: check memory allocations Signed-off-by: Michael Niedermayer (cherry picked from commit c131a9fead5bf63215b6e1172b3c5c183cf90b85) Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 7f154b4df0..61f81145b7 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -497,12 +497,15 @@ static int predictor_calc_error(int *k, int *state, int order, int error) // copes better with quantization, and calculates the // actual whitened result as it goes. -static void modified_levinson_durbin(int *window, int window_entries, +static int modified_levinson_durbin(int *window, int window_entries, int *out, int out_entries, int channels, int *tap_quant) { int i; int *state = av_calloc(window_entries, sizeof(*state)); + if (!state) + return AVERROR(ENOMEM); + memcpy(state, window, 4* window_entries); for (i = 0; i < out_entries; i++) @@ -567,6 +570,7 @@ static void modified_levinson_durbin(int *window, int window_entries, } av_free(state); + return 0; } static inline int code_samplerate(int samplerate) @@ -627,6 +631,9 @@ static av_cold int sonic_encode_init(AVCodecContext *avctx) // generate taps s->tap_quant = av_calloc(s->num_taps, sizeof(*s->tap_quant)); + if (!s->tap_quant) + return AVERROR(ENOMEM); + for (i = 0; i < s->num_taps; i++) s->tap_quant[i] = ff_sqrt(i+1); @@ -656,7 +663,7 @@ static av_cold int sonic_encode_init(AVCodecContext *avctx) s->window_size = ((2*s->tail_size)+s->frame_size); s->window = av_calloc(s->window_size, sizeof(*s->window)); - if (!s->window) + if (!s->window || !s->int_samples) return AVERROR(ENOMEM); avctx->extradata = av_mallocz(16); @@ -769,8 +776,11 @@ static int sonic_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, s->tail[i] = s->int_samples[s->frame_size - s->tail_size + i]; // generate taps - modified_levinson_durbin(s->window, s->window_size, + ret = modified_levinson_durbin(s->window, s->window_size, s->predictor_k, s->num_taps, s->channels, s->tap_quant); + if (ret < 0) + return ret; + if ((ret = intlist_write(&c, state, s->predictor_k, s->num_taps, 0)) < 0) return ret; @@ -914,6 +924,9 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) // generate taps s->tap_quant = av_calloc(s->num_taps, sizeof(*s->tap_quant)); + if (!s->tap_quant) + return AVERROR(ENOMEM); + for (i = 0; i < s->num_taps; i++) s->tap_quant[i] = ff_sqrt(i+1); @@ -933,6 +946,8 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); } s->int_samples = av_calloc(s->frame_size, sizeof(*s->int_samples)); + if (!s->int_samples) + return AVERROR(ENOMEM); avctx->sample_fmt = AV_SAMPLE_FMT_S16; return 0; From 3344a28787a72533f322e1f6f5bc6fd07597d870 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 17:31:58 +0200 Subject: [PATCH 769/822] avcodec/sonic: More completely check sample_rate_index and channels Fixes CID1271783 Signed-off-by: Michael Niedermayer (cherry picked from commit ade8a46154cb45c88b1cb5c616eaa6320c941187) Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 61f81145b7..c5076f9d8e 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -883,13 +883,19 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) if (s->version >= 1) { + int sample_rate_index; s->channels = get_bits(&gb, 2); - s->samplerate = samplerate_table[get_bits(&gb, 4)]; + sample_rate_index = get_bits(&gb, 4); + if (sample_rate_index >= FF_ARRAY_ELEMS(samplerate_table)) { + av_log(avctx, AV_LOG_ERROR, "Invalid sample_rate_index %d\n", sample_rate_index); + return AVERROR_INVALIDDATA; + } + s->samplerate = samplerate_table[sample_rate_index]; av_log(avctx, AV_LOG_INFO, "Sonicv2 chans: %d samprate: %d\n", s->channels, s->samplerate); } - if (s->channels > MAX_CHANNELS) + if (s->channels > MAX_CHANNELS || s->channels < 1) { av_log(avctx, AV_LOG_ERROR, "Only mono and stereo streams are supported by now\n"); return AVERROR_INVALIDDATA; From 3edb74db3bc93609a381a8d38cf4a00188060714 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 18:04:12 +0200 Subject: [PATCH 770/822] avcodec/dcadec: Check scale table index Fixes CID1297594 part 1 Signed-off-by: Michael Niedermayer (cherry picked from commit 0f3e6959bfa67d12cd5a173b86eb15abd7d9e4d5) Conflicts: libavcodec/dcadec.c --- libavcodec/dcadec.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 43fc40d6c9..d066c9b299 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1855,23 +1855,34 @@ static int dca_xbr_parse_frame(DCAContext *s) for(i = 0; i < n_xbr_ch[chset]; i++) { const uint32_t *scale_table; int nbits; + int scale_table_size; if (s->scalefactor_huffman[chan_base+i] == 6) { scale_table = scale_factor_quant7; + scale_table_size = FF_ARRAY_ELEMS(scale_factor_quant7); } else { scale_table = scale_factor_quant6; + scale_table_size = FF_ARRAY_ELEMS(scale_factor_quant6); } nbits = anctemp[i]; for(j = 0; j < active_bands[chset][i]; j++) { if(abits_high[i][j] > 0) { - scale_table_high[i][j][0] = - scale_table[get_bits(&s->gb, nbits)]; + int index = get_bits(&s->gb, nbits); + if (index >= scale_table_size) { + av_log(s->avctx, AV_LOG_ERROR, "scale table index %d invalid\n", index); + return AVERROR_INVALIDDATA; + } + scale_table_high[i][j][0] = scale_table[index]; if(xbr_tmode && s->transition_mode[i][j]) { - scale_table_high[i][j][1] = - scale_table[get_bits(&s->gb, nbits)]; + int index = get_bits(&s->gb, nbits); + if (index >= scale_table_size) { + av_log(s->avctx, AV_LOG_ERROR, "scale table index %d invalid\n", index); + return AVERROR_INVALIDDATA; + } + scale_table_high[i][j][1] = scale_table[index]; } } } From 0122e38cb19b8ba01b1016ca0be1fbbc81caebd3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 18:29:40 +0200 Subject: [PATCH 771/822] avcodec/dcadec: Check active_bands Fixes CID1297594 part2 Signed-off-by: Michael Niedermayer (cherry picked from commit fc624ec9ba7e5c4e8d905ac10f605a43d123f95a) Signed-off-by: Michael Niedermayer --- libavcodec/dcadec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index d066c9b299..ce7f303fe1 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1812,8 +1812,13 @@ static int dca_xbr_parse_frame(DCAContext *s) for(i = 0; i < num_chsets; i++) { n_xbr_ch[i] = get_bits(&s->gb, 3) + 1; k = get_bits(&s->gb, 2) + 5; - for(j = 0; j < n_xbr_ch[i]; j++) + for(j = 0; j < n_xbr_ch[i]; j++) { active_bands[i][j] = get_bits(&s->gb, k) + 1; + if (active_bands[i][j] > DCA_SUBBANDS) { + av_log(s->avctx, AV_LOG_ERROR, "too many active subbands (%d)\n", active_bands[i][j]); + return AVERROR_INVALIDDATA; + } + } } /* skip to the end of the header */ From ed6d7696db316355694c1142e478b316d2158705 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 22:02:12 +0200 Subject: [PATCH 772/822] avcodec/libtheoraenc: Check for av_malloc failure Fixes CID1257799 Signed-off-by: Michael Niedermayer (cherry picked from commit c64b2d480b4a35d4face9928b4265a0fda3f3dd9) Signed-off-by: Michael Niedermayer --- libavcodec/libtheoraenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 4c90822439..36d48fbbb3 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -108,6 +108,8 @@ static int get_stats(AVCodecContext *avctx, int eos) // libtheora generates a summary header at the end memcpy(h->stats, buf, bytes); avctx->stats_out = av_malloc(b64_size); + if (!avctx->stats_out) + return AVERROR(ENOMEM); av_base64_encode(avctx->stats_out, b64_size, h->stats, h->stats_offset); } return 0; From 9cee1c4ac7cd39b2e44479060306510ca925faab Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 22:12:08 +0200 Subject: [PATCH 773/822] avcodec/hevc: Fix typo in num_entry_point_offsets check Signed-off-by: Michael Niedermayer (cherry picked from commit 3051e7fa712dfe2136f19b7157211453895f2a3c) Signed-off-by: Michael Niedermayer --- libavcodec/hevc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 57bda4c427..663cd944ef 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -646,7 +646,7 @@ static int hls_slice_header(HEVCContext *s) if (s->pps->tiles_enabled_flag || s->pps->entropy_coding_sync_enabled_flag) { unsigned num_entry_point_offsets = get_ue_golomb_long(gb); // It would be possible to bound this tighter but this here is simpler - if (sh->num_entry_point_offsets > get_bits_left(gb)) { + if (num_entry_point_offsets > get_bits_left(gb)) { av_log(s->avctx, AV_LOG_ERROR, "num_entry_point_offsets %d is invalid\n", num_entry_point_offsets); return AVERROR_INVALIDDATA; } From c8676f9daf9dfb5948235412f58c7581fdc03f46 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 17 May 2015 19:07:17 +0200 Subject: [PATCH 774/822] avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values Signed-off-by: Michael Niedermayer (cherry picked from commit c720b9ce9850710e74a103d9626869e397a89faa) Signed-off-by: Michael Niedermayer --- libavcodec/golomb.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 1c4e2106ee..e10fdc40fa 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -346,8 +346,16 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, if (i < limit - 1) { if (k) { - buf = SHOW_UBITS(re, gb, k); - LAST_SKIP_BITS(re, gb, k); + if (k > MIN_CACHE_BITS - 1) { + buf = SHOW_UBITS(re, gb, 16) << (k-16); + LAST_SKIP_BITS(re, gb, 16); + UPDATE_CACHE(re, gb); + buf |= SHOW_UBITS(re, gb, k-16); + LAST_SKIP_BITS(re, gb, k-16); + } else { + buf = SHOW_UBITS(re, gb, k); + LAST_SKIP_BITS(re, gb, k); + } } else { buf = 0; } From 6ad36546709718e4add47d68d99d1246eced8c22 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 20 May 2015 17:13:15 +0200 Subject: [PATCH 775/822] avformat/nutdec: Return error on EOF from get_str() Signed-off-by: Michael Niedermayer (cherry picked from commit 6bbb2f8f4da67af374d62403742482cc5962aa21) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 432e96aed1..82904dd2d9 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -51,6 +51,8 @@ static int get_str(AVIOContext *bc, char *string, unsigned int maxlen) if (maxlen) string[FFMIN(len, maxlen - 1)] = 0; + if (bc->eof_reached) + return AVERROR_EOF; if (maxlen == len) return -1; else From 8cfc0fdb23e14dca402217a99e374f98355a3d60 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 20 May 2015 17:32:48 +0200 Subject: [PATCH 776/822] avformat/nutdec: Fix recovery when immedeately after seeking a failure happens Found-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit b3496b4a33e806b7afdcbbf6f468b0332b676d7c) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 82904dd2d9..d2d90b0559 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -1189,6 +1189,7 @@ static int read_seek(AVFormatContext *s, int stream_index, av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2); pos = find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2); avio_seek(s->pb, pos, SEEK_SET); + nut->last_syncpoint_pos = pos; av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos); if (pos2 > pos || pos2 + 15 < pos) av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n"); From fe1e6b919d8d3145c163fde456edcfad1ac13cfc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 23 May 2015 00:23:05 +0200 Subject: [PATCH 777/822] avformat/nutdec: Check X in 2nd branch of index reading Prevents read of uninitialized variable Based on patch by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit ebb0ca3d70465ab6d369a66b2ef43bb059705db8) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index d2d90b0559..7f7a61cc56 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -679,6 +679,10 @@ static int find_and_decode_index(NUTContext *nut) has_keyframe[n++] = flag; has_keyframe[n++] = !flag; } else { + if (x <= 1) { + av_log(s, AV_LOG_ERROR, "index: x %"PRIu64" is invalid\n", x); + goto fail; + } while (x != 1) { if (n >= syncpoint_count + 1) { av_log(s, AV_LOG_ERROR, "index overflow B\n"); From 9414358f15863d1fdd343be9bb0d7205867e9eb3 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 20 May 2015 00:06:05 +0200 Subject: [PATCH 778/822] nutdec: fix infinite resync loops nut->last_syncpoint_pos doesn't necessarily change between resync attempts, so find_any_startcode can return the same startcode again. Thus remember where the last resync happened and don't try to resync before that. This can't be done locally in nut_read_packet, because this wouldn't prevent infinite resync loops, where after the resync a packet is returned and while reading a following packet the resync happens again. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun (cherry picked from commit 37e679881d364b6da817d829d35869d657218ab3) Signed-off-by: Michael Niedermayer --- libavformat/nut.h | 1 + libavformat/nutdec.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/nut.h b/libavformat/nut.h index 29f28e6ab9..1f2909b506 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -99,6 +99,7 @@ typedef struct NUTContext { unsigned int max_distance; unsigned int time_base_count; int64_t last_syncpoint_pos; + int64_t last_resync_pos; int header_count; AVRational *time_base; struct AVTreeNode *syncpoints; diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 7f7a61cc56..53cdee0cb5 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -1103,7 +1103,8 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt) default: resync: av_log(s, AV_LOG_DEBUG, "syncing from %"PRId64"\n", pos); - tmp = find_any_startcode(bc, nut->last_syncpoint_pos + 1); + tmp = find_any_startcode(bc, FFMAX(nut->last_syncpoint_pos, nut->last_resync_pos) + 1); + nut->last_resync_pos = avio_tell(bc); if (tmp == 0) return AVERROR_INVALIDDATA; av_log(s, AV_LOG_DEBUG, "sync\n"); @@ -1200,6 +1201,8 @@ static int read_seek(AVFormatContext *s, int stream_index, for (i = 0; i < s->nb_streams; i++) nut->stream[i].skip_until_key_frame = 1; + nut->last_resync_pos = 0; + return 0; } From 4d625f270a592d57845bdeb2362f0c7f3a08de18 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 20 May 2015 00:31:24 +0200 Subject: [PATCH 779/822] nutdec: stop skipping bytes at EOF This can unnecessarily waste a lot of time. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun (cherry picked from commit fa7dec8cb00d2d0dd96ff9863ccda38428610a21) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 53cdee0cb5..91c6d1b750 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -46,6 +46,8 @@ static int get_str(AVIOContext *bc, char *string, unsigned int maxlen) while (len > maxlen) { avio_r8(bc); len--; + if (bc->eof_reached) + len = maxlen; } if (maxlen) @@ -212,8 +214,11 @@ static int skip_reserved(AVIOContext *bc, int64_t pos) avio_seek(bc, pos, SEEK_CUR); return AVERROR_INVALIDDATA; } else { - while (pos--) + while (pos--) { + if (bc->eof_reached) + return AVERROR_INVALIDDATA; avio_r8(bc); + } return 0; } } @@ -292,8 +297,13 @@ static int decode_main_header(NUTContext *nut) if (tmp_fields > 7) tmp_head_idx = ffio_read_varlen(bc); - while (tmp_fields-- > 8) + while (tmp_fields-- > 8) { + if (bc->eof_reached) { + av_log(s, AV_LOG_ERROR, "reached EOF while decoding main header\n"); + return AVERROR_INVALIDDATA; + } ffio_read_varlen(bc); + } if (count == 0 || i + count > 256) { av_log(s, AV_LOG_ERROR, "illegal count %d at %d\n", count, i); @@ -970,8 +980,13 @@ static int decode_frame_header(NUTContext *nut, int64_t *pts, int *stream_id, *header_idx = ffio_read_varlen(bc); if (flags & FLAG_RESERVED) reserved_count = ffio_read_varlen(bc); - for (i = 0; i < reserved_count; i++) + for (i = 0; i < reserved_count; i++) { + if (bc->eof_reached) { + av_log(s, AV_LOG_ERROR, "reached EOF while decoding frame header\n"); + return AVERROR_INVALIDDATA; + } ffio_read_varlen(bc); + } if (*header_idx >= (unsigned)nut->header_count) { av_log(s, AV_LOG_ERROR, "header_idx invalid\n"); From dfd1d487301b47ad2e15d1061a1dbdde1f4d0775 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 20 May 2015 00:34:42 +0200 Subject: [PATCH 780/822] nutdec: abort if EOF is reached in decode_info_header/read_sm_data These loops can take a lot of time if count is very large. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun (cherry picked from commit bb23a15df507440deb0dcf25099d321d0f73dc28) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 91c6d1b750..a63de7d437 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -484,7 +484,7 @@ static int decode_info_header(NUTContext *nut) AVIOContext *bc = s->pb; uint64_t tmp, chapter_start, chapter_len; unsigned int stream_id_plus1, count; - int chapter_id, i; + int chapter_id, i, ret; int64_t value, end; char name[256], str_value[1024], type_str[256]; const char *type; @@ -519,7 +519,11 @@ static int decode_info_header(NUTContext *nut) metadata = &s->metadata; for (i = 0; i < count; i++) { - get_str(bc, name, sizeof(name)); + ret = get_str(bc, name, sizeof(name)); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "get_str failed while decoding info header\n"); + return ret; + } value = get_s(bc); str_value[0] = 0; @@ -831,14 +835,18 @@ static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int int sample_rate = 0; int width = 0; int height = 0; - int i; + int i, ret; for (i=0; i= maxpos) return AVERROR_INVALIDDATA; - get_str(bc, name, sizeof(name)); + ret = get_str(bc, name, sizeof(name)); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "get_str failed while reading sm data\n"); + return ret; + } value = get_s(bc); if (value == -1) { From 9d6d4eb4254253b012658d3eb95e674c6d70abe4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 25 May 2015 04:53:09 +0200 Subject: [PATCH 781/822] avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size() Signed-off-by: Michael Niedermayer (cherry picked from commit e4c2ec879b1121c02279cd60a54643da0d249e40) Signed-off-by: Michael Niedermayer --- libavcodec/put_bits.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index e2c4a61791..df3701c76b 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -240,6 +240,7 @@ static inline void skip_put_bits(PutBitContext *s, int n) static inline void set_put_bits_buffer_size(PutBitContext *s, int size) { s->buf_end = s->buf + size; + s->size_in_bits = 8*size; } #endif /* AVCODEC_PUT_BITS_H */ From 4f09968865a0682aae0d0945f24560c29181630e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 25 May 2015 04:54:41 +0200 Subject: [PATCH 782/822] avcodec/mpegvideo_enc: Update the buffer size as more slices are merged Signed-off-by: Michael Niedermayer (cherry picked from commit 561d3a57aaa95c7e8e65e96b36dd069100603650) Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo_enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index b7bb786337..3ea47f6027 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3610,6 +3610,8 @@ static int encode_picture(MpegEncContext *s, int picture_number) } s->avctx->execute(s->avctx, encode_thread, &s->thread_context[0], NULL, context_count, sizeof(void*)); for(i=1; ipb.buf_end == s->thread_context[i]->pb.buf) + set_put_bits_buffer_size(&s->pb, FFMIN(s->thread_context[i]->pb.buf_end - s->pb.buf, INT_MAX/8-32)); merge_context_after_encode(s, s->thread_context[i]); } emms_c(); From 2b499b694002f7729d77b1acce3c5d84db77a4ae Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 25 May 2015 03:45:38 +0200 Subject: [PATCH 783/822] avcodec/put_bits: Assert that there is enough space left in skip_put_bytes() Signed-off-by: Michael Niedermayer (cherry picked from commit 8f5ffed183e099128a732a00976f69fdc641d093) Signed-off-by: Michael Niedermayer --- libavcodec/put_bits.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index df3701c76b..9b7398e91c 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -217,6 +217,7 @@ static inline void skip_put_bytes(PutBitContext *s, int n) { av_assert2((put_bits_count(s) & 7) == 0); av_assert2(s->bit_left == 32); + av_assert0(n <= s->buf_end - s->buf_ptr); s->buf_ptr += n; } From 249021eb23368f81ff4db19f538ae4a96bb56878 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 25 May 2015 03:48:45 +0200 Subject: [PATCH 784/822] avcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits() Signed-off-by: Michael Niedermayer (cherry picked from commit 291ad5cc9cf815eb110b062487980fab2d107936) Signed-off-by: Michael Niedermayer --- libavcodec/bitstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index e907322871..af416ce5bc 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -69,6 +69,8 @@ void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length) if (length == 0) return; + av_assert0(length <= put_bits_left(pb)); + if (CONFIG_SMALL || words < 16 || put_bits_count(pb) & 7) { for (i = 0; i < words; i++) put_bits(pb, 16, AV_RB16(src + 2 * i)); From f494b906e344ea9711065b2de23ab2d69e9dd364 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 20 Apr 2015 22:22:31 +0200 Subject: [PATCH 785/822] avformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before use Signed-off-by: Michael Niedermayer (cherry picked from commit ba631b791435c395361e2026fc7419b341e57813) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index b56a40f664..79bdb87109 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -537,6 +537,9 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if (options) av_dict_copy(&tmp, *options, 0); + if (s->pb) // must be before any goto fail + s->flags |= AVFMT_FLAG_CUSTOM_IO; + if ((ret = av_opt_set_dict(s, &tmp)) < 0) goto fail; From e96e0e1333c8292bd7720ee7cb7e44c935aa74a6 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 22 Apr 2015 16:32:42 +0200 Subject: [PATCH 786/822] mpeg4videodec: only allow a positive length Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit b3408ae4c64cb674b1d5f0f30171759113ce722a) Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4videodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index a1f530c3bc..18f63b995d 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -186,14 +186,14 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g int x = 0, y = 0; length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3); - if (length) + if (length > 0) x = get_xbits(gb, length); if (!(ctx->divx_version == 500 && ctx->divx_build == 413)) skip_bits1(gb); /* marker bit */ length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3); - if (length) + if (length > 0) y = get_xbits(gb, length); skip_bits1(gb); /* marker bit */ From 940b9484dcde8fe25ce1c85cfa698f0493aa9395 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Wed, 22 Apr 2015 17:08:51 +0200 Subject: [PATCH 787/822] bink: check vst->index_entries before using it This fixes a NULL pointer dereference if vst->duration is 0. The problem was introduced in commit 0588acaf. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 86d00ede4f9acb02690a0615490173648e1d933c) Signed-off-by: Michael Niedermayer --- libavformat/bink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/bink.c b/libavformat/bink.c index ec9257bca2..7bcd9ee208 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -190,7 +190,10 @@ static int read_header(AVFormatContext *s) return ret; } - avio_seek(pb, vst->index_entries[0].pos, SEEK_SET); + if (vst->index_entries) + avio_seek(pb, vst->index_entries[0].pos, SEEK_SET); + else + avio_skip(pb, 4); bink->current_track = -1; return 0; From cd5a832b0aabfe6cc21d3d6012f80cf57ca3e00b Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 22 Apr 2015 14:59:56 +0100 Subject: [PATCH 788/822] lavf: Reset global flag on deinit Signed-off-by: Michael Niedermayer (cherry picked from commit 32da94fa7f73ac749e0a1e2f20499fad2f6f57fe) Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 79bdb87109..376b8e239a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4345,6 +4345,7 @@ int avformat_network_deinit(void) #if CONFIG_NETWORK ff_network_close(); ff_tls_deinit(); + ff_network_inited_globally = 0; #endif return 0; } From fe8a763bc7064ebac9c51f8d0bcb79d51c9bea58 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 23 Apr 2015 04:27:56 +0200 Subject: [PATCH 789/822] tests/fate-run: do not attempt to parse tiny_psnrs output if it failed This avoids confusing syntax errors with awk later Likely fixes awk errors at: http://buildd.debian-ports.org/status/fetch.php?pkg=ffmpeg&arch=sparc64&ver=7%3A2.6.2-1&stamp=1428928967 Reviewed-by: Timothy Gu Thanks-to: Andreas Cadhalpun for the link Signed-off-by: Michael Niedermayer (cherry picked from commit c0d847e457c1ef72843a63853f1135d52b74131e) Signed-off-by: Michael Niedermayer --- tests/fate-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 8958e92f18..fcdfe01000 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -42,7 +42,7 @@ compare(){ } do_tiny_psnr(){ - psnr=$(tests/tiny_psnr "$1" "$2" $cmp_unit $cmp_shift 0) + psnr=$(tests/tiny_psnr "$1" "$2" $cmp_unit $cmp_shift 0) || return 1 val=$(expr "$psnr" : ".*$3: *\([0-9.]*\)") size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)') size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)') From d9ff9b8ab0b5a1470fb7d066b0ed413b452eac7f Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 00:30:51 +0200 Subject: [PATCH 790/822] apedec: set s->samples only when init_frame_decoder succeeded Otherwise range_start_decoding is not necessarily run and thus ctx->rc.range still 0 in range_dec_normalize leading to an infinite loop. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 464c49155ce7ffc88ed39eb2511e7a75565c24be) Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 370f1abc69..c5c0dcb58e 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1472,13 +1472,13 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %u.\n", nblocks); return AVERROR_INVALIDDATA; } - s->samples = nblocks; /* Initialize the frame decoder */ if (init_frame_decoder(s) < 0) { av_log(avctx, AV_LOG_ERROR, "Error reading frame header\n"); return AVERROR_INVALIDDATA; } + s->samples = nblocks; } if (!s->data) { From 25daf27484ea6d9c090975893804aa4f096fcfd4 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 28 Apr 2015 13:08:31 +0530 Subject: [PATCH 791/822] OpenCL: Avoid potential buffer overflow in cmdutils_opencl.c The opt_opencl_bench function copied the device name using strcpy without checking if the source string was larger. This patch fixes this by replacing the strcpy with av_strlcpy, with the string copy size capped to the destination buffer size. Signed-off-by: Maneesh Gupta Signed-off-by: Michael Niedermayer (cherry picked from commit cf234552b83a9503ff96572de2658b921b8842eb) Signed-off-by: Michael Niedermayer --- cmdutils_opencl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index d7e3287e4b..8686096e19 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -22,6 +22,7 @@ #include "libavutil/time.h" #include "libavutil/log.h" #include "libavutil/opencl.h" +#include "libavutil/avstring.h" #include "cmdutils.h" typedef struct { @@ -238,7 +239,8 @@ int opt_opencl_bench(void *optctx, const char *opt, const char *arg) devices[count].platform_idx = i; devices[count].device_idx = j; devices[count].runtime = score; - strcpy(devices[count].device_name, device_node->device_name); + av_strlcpy(devices[count].device_name, device_node->device_name, + sizeof(devices[count].device_name)); count++; } } From 02b434044caa93e0384844dcff597d29ae31efe2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 23 Apr 2015 14:29:47 +0200 Subject: [PATCH 792/822] ffmpeg: remove incorrect network deinit Signed-off-by: Michael Niedermayer (cherry picked from commit e2877bdf3862325c2982c3237d9bf28f1bbf793f) Signed-off-by: Michael Niedermayer --- ffmpeg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 0fab24aa78..318a860549 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -353,7 +353,6 @@ void term_init(void) signal(SIGQUIT, sigterm_handler); /* Quit (POSIX). */ } #endif - avformat_network_deinit(); signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */ signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */ From b548a6208eed898599bca0bf7979ba1d03932183 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 20:31:56 +0200 Subject: [PATCH 793/822] nutdec: check for negative frame rate in decode_info_header A negative frame rate triggers an av_assert2 in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 6621105877ce0d65724a8ab60b3a50160adbe65d) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index a63de7d437..dbf8df3b06 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -560,7 +560,8 @@ static int decode_info_header(NUTContext *nut) if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) { sscanf(str_value, "%d/%d", &st->r_frame_rate.num, &st->r_frame_rate.den); - if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den) + if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den || + st->r_frame_rate.num < 0 || st->r_frame_rate.num < 0) st->r_frame_rate.num = st->r_frame_rate.den = 0; continue; } From ffdd93fe79b708b7fdef378d34951e7c8c0d7f6b Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 28 Apr 2015 22:37:19 +0200 Subject: [PATCH 794/822] nutdec: fix illegal count check in decode_main_header The existing check has two problems: 1) i + count can overflow, so that the check '< 256' returns true. 2) In the (i == 'N') case occurs a j-- so that the loop runs once more. This can trigger the assertion 'nut->header_len[0] == 0' or cause segmentation faults or infinite hangs. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 7c24ca1bda2d4df1dc9b2b982941be532d60da21) Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index dbf8df3b06..fbcbeadba3 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -305,7 +305,7 @@ static int decode_main_header(NUTContext *nut) ffio_read_varlen(bc); } - if (count == 0 || i + count > 256) { + if (count <= 0 || count > 256 - (i <= 'N') - i) { av_log(s, AV_LOG_ERROR, "illegal count %d at %d\n", count, i); return AVERROR_INVALIDDATA; } From 45ea5ba0686c23020abf2190b0c2af8cb6b8cf27 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 3 May 2015 15:54:21 +0200 Subject: [PATCH 795/822] avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate Signed-off-by: Michael Niedermayer (cherry picked from commit 042260cde4ecf716438c5fc92d15ad5f037ee2e1) Signed-off-by: Michael Niedermayer --- libavcodec/wavpack.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 0428b05128..c4b4e52e0b 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -472,6 +472,14 @@ static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, s->decorr[i].samplesB[0] = L; } } + + if (type == AV_SAMPLE_FMT_S16P) { + if (FFABS(L) + FFABS(R) > (1<<19)) { + av_log(s->avctx, AV_LOG_ERROR, "sample %d %d too large\n", L, R); + return AVERROR_INVALIDDATA; + } + } + pos = (pos + 1) & 7; if (s->joint) L += (R -= (L >> 1)); From 1f5eeed43ba42698f054635837283f8ea1bf0137 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 3 May 2015 23:07:20 +0200 Subject: [PATCH 796/822] matroskadec: use uint64_t instead of int for index_scale index_scale is set to matroska->time_scale of type uint64_t. When index_scale is int, the assignment can overflow and e.g. result in index_scale = 0. This causes a floating point exception due to the division by index_scale. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit eb9fb508b0e09d85d234fe694333b2005e1d7a7e) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4c06c99366..bf07738226 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1455,7 +1455,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) static void matroska_add_index_entries(MatroskaDemuxContext *matroska) { EbmlList *index_list; MatroskaIndex *index; - int index_scale = 1; + uint64_t index_scale = 1; int i, j; index_list = &matroska->index; From 80cd5abf7fdb478e8ad83828cab5a10a772a06cc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 4 May 2015 13:37:26 +0200 Subject: [PATCH 797/822] avcodec/ffv1dec: Check chroma shift parameters Signed-off-by: Michael Niedermayer (cherry picked from commit d43cd6b08ed555c303478e3133717fbb2236be6e) Signed-off-by: Michael Niedermayer --- libavcodec/ffv1dec.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index f795a2cb9d..384f3e3ec5 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -536,6 +536,12 @@ static int read_extra_header(FFV1Context *f) f->num_h_slices = 1 + get_symbol(c, state, 0); f->num_v_slices = 1 + get_symbol(c, state, 0); + if (f->chroma_h_shift > 4U || f->chroma_v_shift > 4U) { + av_log(f->avctx, AV_LOG_ERROR, "chroma shift parameters %d %d are invalid\n", + f->chroma_h_shift, f->chroma_v_shift); + return AVERROR_INVALIDDATA; + } + if (f->num_h_slices > (unsigned)f->width || !f->num_h_slices || f->num_v_slices > (unsigned)f->height || !f->num_v_slices ) { @@ -641,6 +647,12 @@ static int read_header(FFV1Context *f) } } + if (chroma_h_shift > 4U || chroma_v_shift > 4U) { + av_log(f->avctx, AV_LOG_ERROR, "chroma shift parameters %d %d are invalid\n", + chroma_h_shift, chroma_v_shift); + return AVERROR_INVALIDDATA; + } + f->colorspace = colorspace; f->avctx->bits_per_raw_sample = bits_per_raw_sample; f->chroma_planes = chroma_planes; From 7d9725187d1ac027e1659e014e78b73566e76b1d Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 3 May 2015 23:55:20 +0200 Subject: [PATCH 798/822] matroskadec: check s->streams[k] before using it This fixes a segmentation fault. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit e54540655f229d06667dc7fa7005f2a20e101e80) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index bf07738226..662f02b26a 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1929,7 +1929,7 @@ static int matroska_read_header(AVFormatContext *s) snprintf(buf, sizeof(buf), "%s_%d", ff_matroska_video_stereo_plane[planes[j].type], i); for (k=0; k < matroska->tracks.nb_elem; k++) - if (planes[j].uid == tracks[k].uid) { + if (planes[j].uid == tracks[k].uid && s->streams[k]) { av_dict_set(&s->streams[k]->metadata, "stereo_mode", buf, 0); break; From 4f0d1af68ad352dbfcb079e52fd333622c274a5b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 4 May 2015 15:47:54 +0200 Subject: [PATCH 799/822] avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k] The later is not correct Signed-off-by: Michael Niedermayer (cherry picked from commit 5d309d309108684f742bbf5fc2393f1c519cda72) Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 662f02b26a..652ca8c176 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1929,8 +1929,8 @@ static int matroska_read_header(AVFormatContext *s) snprintf(buf, sizeof(buf), "%s_%d", ff_matroska_video_stereo_plane[planes[j].type], i); for (k=0; k < matroska->tracks.nb_elem; k++) - if (planes[j].uid == tracks[k].uid && s->streams[k]) { - av_dict_set(&s->streams[k]->metadata, + if (planes[j].uid == tracks[k].uid && tracks[k].stream) { + av_dict_set(&tracks[k].stream->metadata, "stereo_mode", buf, 0); break; } From a64102e25fb94159ee548cb7fb59322770faf7f7 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 5 May 2015 21:33:08 +0200 Subject: [PATCH 800/822] diracdec: prevent overflow in data_unit_size check buf_idx + data_unit_size can overflow, causing the '> buf_size' check to wrongly fail. This causes a segmentation fault. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 984f50deb2d48f6844d65e10991b996a6d29e87c) Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 1edeab958f..ebbe80bb3e 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1937,8 +1937,8 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, break; data_unit_size = AV_RB32(buf+buf_idx+5); - if (buf_idx + data_unit_size > buf_size || !data_unit_size) { - if(buf_idx + data_unit_size > buf_size) + if (data_unit_size > buf_size - buf_idx || !data_unit_size) { + if(data_unit_size > buf_size - buf_idx) av_log(s->avctx, AV_LOG_ERROR, "Data unit with size %d is larger than input buffer, discarding\n", data_unit_size); From b946f849bb926dcfb67ed76e0bd8fdb1b53519b2 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 5 May 2015 22:10:44 +0200 Subject: [PATCH 801/822] diracdec: avoid overflow of bytes*8 in decode_lowdelay If bytes is large enough, bytes*8 can overflow and become negative. In that case 'bufsize -= bytes*8' causes bufsize to increase instead of decrease. This leads to a segmentation fault. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit 9e66b39aa87eb653a6e5d15f70b792ccbf719de7) Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index ebbe80bb3e..c9c43fd969 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -797,7 +797,10 @@ static void decode_lowdelay(DiracContext *s) slice_num++; buf += bytes; - bufsize -= bytes*8; + if (bufsize/8 >= bytes) + bufsize -= bytes*8; + else + bufsize = 0; } avctx->execute(avctx, decode_lowdelay_slice, slices, NULL, slice_num, From c9c5bd8c89b6e3cc09e50c3b053cd8a083fbddc6 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 5 May 2015 23:51:48 +0200 Subject: [PATCH 802/822] diracdec: check if reference could not be allocated s->ref_pics[i] is later used as ref argument of interpolate_refplane, where it is dereferenced. If it is NULL, it causes a segmentation fault. Signed-off-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer (cherry picked from commit d93181ef3eacdb862d93448f31c97765a523d1db) Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index c9c43fd969..679fbcffd0 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1745,6 +1745,12 @@ static int dirac_decode_picture_header(DiracContext *s) get_buffer_with_edge(s->avctx, s->ref_pics[i]->avframe, AV_GET_BUFFER_FLAG_REF); break; } + + if (!s->ref_pics[i]) { + av_log(s->avctx, AV_LOG_ERROR, "Reference could not be allocated\n"); + return -1; + } + } /* retire the reference frames that are not used anymore */ From cea2106fb2e1fc541691ab9b3fe54000aeb14f19 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 21 Aug 2014 16:33:03 +0200 Subject: [PATCH 803/822] avcodec/h264_slice: More complete cleanup in h264_slice_header_init() Fixes null pointer dereference Fixes Ticket3873 Signed-off-by: Michael Niedermayer (cherry picked from commit 1fa35e4352cc39894987e14de464e3d72b55739f) Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 37b9d34814..870aedd1e2 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3351,7 +3351,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) ret = ff_h264_alloc_tables(h); if (ret < 0) { av_log(h->avctx, AV_LOG_ERROR, "Could not allocate memory\n"); - return ret; + goto fail; } if (nb_slices > MAX_THREADS || (nb_slices > h->mb_height && h->mb_height)) { @@ -3370,14 +3370,16 @@ static int h264_slice_header_init(H264Context *h, int reinit) ret = context_init(h); if (ret < 0) { av_log(h->avctx, AV_LOG_ERROR, "context_init() failed.\n"); - return ret; + goto fail; } } else { for (i = 1; i < h->slice_context_count; i++) { H264Context *c; c = h->thread_context[i] = av_mallocz(sizeof(H264Context)); - if (!c) - return AVERROR(ENOMEM); + if (!c) { + ret = AVERROR(ENOMEM); + goto fail; + } c->avctx = h->avctx; if (CONFIG_ERROR_RESILIENCE) { c->dsp = h->dsp; @@ -3416,13 +3418,17 @@ static int h264_slice_header_init(H264Context *h, int reinit) for (i = 0; i < h->slice_context_count; i++) if ((ret = context_init(h->thread_context[i])) < 0) { av_log(h->avctx, AV_LOG_ERROR, "context_init() failed.\n"); - return ret; + goto fail; } } h->context_initialized = 1; return 0; +fail: + free_tables(h, 0); + h->context_initialized = 0; + return ret; } int ff_set_ref_count(H264Context *h) From 051cd7dc5f42542753f809109d00ec3cf19eb337 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Jun 2015 22:10:52 +0200 Subject: [PATCH 804/822] Update for 2.2.16 Signed-off-by: Michael Niedermayer --- RELEASE | 2 +- doc/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 5bd8c5430c..ed1fc35282 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.15 +2.2.16 diff --git a/doc/Doxyfile b/doc/Doxyfile index 2ca490c1bf..6893e7ca2f 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.2.15 +PROJECT_NUMBER = 2.2.16 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 85d0c7355b612af2f685e4eab305a5de30ef8d21 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 27 May 2015 04:31:30 +0200 Subject: [PATCH 805/822] avfilter/x86/vf_hqdn3d: Fix register types Fixes Ticket4301 Signed-off-by: Michael Niedermayer (cherry picked from commit 52fc3e372f8ed4de5735abed1f7f7569fe37b023) --- libavfilter/x86/vf_hqdn3d.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_hqdn3d.asm b/libavfilter/x86/vf_hqdn3d.asm index 961127e670..e3b1bdca53 100644 --- a/libavfilter/x86/vf_hqdn3d.asm +++ b/libavfilter/x86/vf_hqdn3d.asm @@ -27,8 +27,8 @@ SECTION .text %if lut_bits != 8 sar %1q, 8-lut_bits %endif - movsx %1d, word [%3q+%1q*2] - add %1d, %2d + movsx %1q, word [%3q+%1q*2] + add %1q, %2q %endmacro %macro LOAD 3 ; dstreg, x, bitdepth From 59a1e0cba0623b446dafc0248892c8cb6f7add1c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 25 May 2015 01:26:55 +0200 Subject: [PATCH 806/822] avformat/mov: Mark avio context of decompressed atoms as seekable Fixes Ticket4329 Signed-off-by: Michael Niedermayer (cherry picked from commit 8ce564ea280b61d21eebf8a2fd741f792ce81638) --- libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 5b4986cbc2..ce54692422 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2816,6 +2816,7 @@ static int mov_read_cmov(MOVContext *c, AVIOContext *pb, MOVAtom atom) goto free_and_return; if (ffio_init_context(&ctx, moov_data, moov_len, 0, NULL, NULL, NULL, NULL) != 0) goto free_and_return; + ctx.seekable = AVIO_SEEKABLE_NORMAL; atom.type = MKTAG('m','o','o','v'); atom.size = moov_len; ret = mov_read_default(c, &ctx, atom); From b61ee9f03f19153abd99fd0d8879d253c0609300 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 8 Jul 2015 02:43:02 +0200 Subject: [PATCH 807/822] avformat/swfdec: Do not error out on pixel format changes Instead print an error and continue Fixes Ticket4702 Signed-off-by: Michael Niedermayer (cherry picked from commit 6a1204a1a46674084b1e6b92562f81aaab7aac69) --- libavformat/swfdec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 91db06d55c..35c91df794 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -390,10 +390,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) } if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) { av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n"); - res = AVERROR_PATCHWELCOME; - goto bitmap_end; - } - st->codec->pix_fmt = pix_fmt; + }else + st->codec->pix_fmt = pix_fmt; if (linesize * height > pkt->size) { res = AVERROR_INVALIDDATA; From ac7d47dd70217c944895c383073de07285e91a45 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 31 Jul 2015 15:54:38 +0200 Subject: [PATCH 808/822] MAINTAINERS: Remove myself as leader Signed-off-by: Michael Niedermayer (cherry picked from commit f2c58931e629343f7d68258cc2b2d62c5f501ba5) Signed-off-by: Michael Niedermayer --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6a61ebae97..122f457d5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14,7 +14,6 @@ patches and related discussions. Project Leader ============== -Michael Niedermayer final design decisions From 288f52a64aac934750b87117e8e397c838036570 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 30 Sep 2015 14:53:35 +0200 Subject: [PATCH 809/822] avcodec/mp3: fix skipping zeros Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3 packets. This code forgot to report to the user that data was skipped at all. Since audio codecs allow partial packet decoding, the user application has to rely on the return value. It will remove the data reported as consumed by the decoder, and feed it to the decoder again. This resulted in the mp3 frame after the zero region to be decoded over and over again, until the zero region was finally skipped by the application. Fix this by including the amount of skipped bytes to the number of consumed bytes returned by the decode call. Fixes trac ticket #4890. (cherry picked from commit cb1da9fb8d71bb611a7b0028914c97afc3f5711d) --- libavcodec/mpegaudiodec_template.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index 1c1ab6e595..b1419d94c5 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -1642,9 +1642,11 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, uint32_t header; int ret; + int skipped = 0; while(buf_size && !*buf){ buf++; buf_size--; + skipped++; } if (buf_size < HEADER_SIZE) @@ -1699,7 +1701,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, return ret; } s->frame_size = 0; - return buf_size; + return buf_size + skipped; } static void mp_flush(MPADecodeContext *ctx) From fd7e170507f4656a966ddd2a57db230779f96ba7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Sep 2015 23:49:30 +0200 Subject: [PATCH 810/822] avcodec/ffv1: seperate slice_count from max_slice_count Fix segfault with too large slice_count Fixes Ticket4879 Signed-off-by: Michael Niedermayer (cherry picked from commit aa6c43f3fdec8a7518534b9dab20c9eb4be11568) Conflicts: libavcodec/ffv1enc.c libavcodec/ffv1.c (cherry picked from commit ef6d6f89067d17d1187fc1d82b418c63b88cbba6) --- libavcodec/ffv1.c | 14 +++++++------- libavcodec/ffv1.h | 1 + libavcodec/ffv1dec.c | 8 +++++--- libavcodec/ffv1enc.c | 4 +++- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index f8556b01f1..12fce0f797 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -103,7 +103,7 @@ av_cold int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs) av_cold int ffv1_init_slices_state(FFV1Context *f) { int i, ret; - for (i = 0; i < f->slice_count; i++) { + for (i = 0; i < f->max_slice_count; i++) { FFV1Context *fs = f->slice_context[i]; if ((ret = ffv1_init_slice_state(f, fs)) < 0) return AVERROR(ENOMEM); @@ -115,10 +115,10 @@ av_cold int ffv1_init_slice_contexts(FFV1Context *f) { int i; - f->slice_count = f->num_h_slices * f->num_v_slices; - av_assert0(f->slice_count > 0); + f->max_slice_count = f->num_h_slices * f->num_v_slices; + av_assert0(f->max_slice_count > 0); - for (i = 0; i < f->slice_count; i++) { + for (i = 0; i < f->max_slice_count; i++) { FFV1Context *fs = av_mallocz(sizeof(*fs)); int sx = i % f->num_h_slices; int sy = i / f->num_h_slices; @@ -203,7 +203,7 @@ av_cold int ffv1_close(AVCodecContext *avctx) ff_thread_release_buffer(avctx, &s->last_picture); av_frame_free(&s->last_picture.f); - for (j = 0; j < s->slice_count; j++) { + for (j = 0; j < s->max_slice_count; j++) { FFV1Context *fs = s->slice_context[j]; for (i = 0; i < s->plane_count; i++) { PlaneContext *p = &fs->plane[i]; @@ -217,14 +217,14 @@ av_cold int ffv1_close(AVCodecContext *avctx) av_freep(&avctx->stats_out); for (j = 0; j < s->quant_table_count; j++) { av_freep(&s->initial_states[j]); - for (i = 0; i < s->slice_count; i++) { + for (i = 0; i < s->max_slice_count; i++) { FFV1Context *sf = s->slice_context[i]; av_freep(&sf->rc_stat2[j]); } av_freep(&s->rc_stat2[j]); } - for (i = 0; i < s->slice_count; i++) + for (i = 0; i < s->max_slice_count; i++) av_freep(&s->slice_context[i]); return 0; diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index 9d8329f00f..a4583efed4 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -122,6 +122,7 @@ typedef struct FFV1Context { struct FFV1Context *slice_context[MAX_SLICES]; int slice_count; + int max_slice_count; int num_v_slices; int num_h_slices; int slice_width; diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 384f3e3ec5..c8b396ae9a 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -760,6 +760,7 @@ static int read_header(FFV1Context *f) av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n"); return AVERROR_INVALIDDATA; } + f->slice_count = f->max_slice_count; } else if (f->version < 3) { f->slice_count = get_symbol(c, state, 0); } else { @@ -774,8 +775,8 @@ static int read_header(FFV1Context *f) p -= size + trailer; } } - if (f->slice_count > (unsigned)MAX_SLICES || f->slice_count <= 0) { - av_log(f->avctx, AV_LOG_ERROR, "slice count %d is invalid\n", f->slice_count); + if (f->slice_count > (unsigned)MAX_SLICES || f->slice_count <= 0 || f->slice_count > f->max_slice_count) { + av_log(f->avctx, AV_LOG_ERROR, "slice count %d is invalid (max=%d)\n", f->slice_count, f->max_slice_count); return AVERROR_INVALIDDATA; } @@ -998,6 +999,7 @@ static int init_thread_copy(AVCodecContext *avctx) f->picture.f = NULL; f->last_picture.f = NULL; f->sample_buffer = NULL; + f->max_slice_count = 0; f->slice_count = 0; for (i = 0; i < f->quant_table_count; i++) { @@ -1068,7 +1070,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) av_assert0(!fdst->sample_buffer); } - av_assert1(fdst->slice_count == fsrc->slice_count); + av_assert1(fdst->max_slice_count == fsrc->max_slice_count); ff_thread_release_buffer(dst, &fdst->picture); diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index c7479e649f..247ad0e782 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -955,6 +955,7 @@ slices_ok: if ((ret = ffv1_init_slice_contexts(s)) < 0) return ret; + s->slice_count = s->max_slice_count; if ((ret = ffv1_init_slices_state(s)) < 0) return ret; @@ -964,7 +965,7 @@ slices_ok: if (!avctx->stats_out) return AVERROR(ENOMEM); for (i = 0; i < s->quant_table_count; i++) - for (j = 0; j < s->slice_count; j++) { + for (j = 0; j < s->max_slice_count; j++) { FFV1Context *sf = s->slice_context[j]; av_assert0(!sf->rc_stat2[i]); sf->rc_stat2[i] = av_mallocz(s->context_count[i] * @@ -1188,6 +1189,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, for (i = 0; i < f->quant_table_count; i++) memset(f->rc_stat2[i], 0, f->context_count[i] * sizeof(*f->rc_stat2[i])); + av_assert0(f->slice_count == f->max_slice_count); for (j = 0; j < f->slice_count; j++) { FFV1Context *fs = f->slice_context[j]; for (i = 0; i < 256; i++) { From 96f52e22f04f1c19a1e6c24b036684b250fd4706 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 20 Sep 2015 12:39:14 +0200 Subject: [PATCH 811/822] hevc: fix wpp threading deadlock. Fixes ticket 4258. (cherry picked from commit 74e4948235bc8f8946eeca20525258bbf383f75d) --- libavcodec/hevc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 663cd944ef..cf315b0fd5 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2038,6 +2038,8 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int if (more_data < 0) { s->tab_slice_address[ctb_addr_rs] = -1; + avpriv_atomic_int_set(&s1->wpp_err, 1); + ff_thread_report_progress2(s->avctx, ctb_row ,thread, SHIFT_CTB_WPP); return more_data; } From 8daf13a173128a6454359766ea751411cd82ff83 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Sep 2015 04:01:27 +0200 Subject: [PATCH 812/822] avformat/avidec: Workaround broken initial frame Fixes Ticket4851 Signed-off-by: Michael Niedermayer (cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502) --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 57b7e49047..6ccb40aec0 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1449,7 +1449,8 @@ static int avi_read_idx1(AVFormatContext *s, int size) ast = st->priv_data; if (first_packet && first_packet_pos) { - data_offset = first_packet_pos - pos; + if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos) + data_offset = first_packet_pos - pos; first_packet = 0; } pos += data_offset; From 57e284dac6491bff2b0127db3cf68a5beee4a24e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 27 Aug 2015 04:08:42 +0200 Subject: [PATCH 813/822] avformat/oggenc: Check segments_count for headers too Fixes infinite loop and segfault in ogg_buffer_data() Fixes Ticket4806 Signed-off-by: Michael Niedermayer (cherry picked from commit 81a8701eb52d2b6469ae16ef442ce425388141b7) --- libavformat/oggenc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 9c64755595..b2680ec3bf 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -249,7 +249,7 @@ static int ogg_buffer_data(AVFormatContext *s, AVStream *st, if (i == total_segments) page->granule = granule; - if (!header) { + { AVStream *st = s->streams[page->stream_index]; int64_t start = av_rescale_q(page->start_granule, st->time_base, @@ -257,10 +257,13 @@ static int ogg_buffer_data(AVFormatContext *s, AVStream *st, int64_t next = av_rescale_q(page->granule, st->time_base, AV_TIME_BASE_Q); - if (page->segments_count == 255 || - (ogg->pref_size > 0 && page->size >= ogg->pref_size) || - (ogg->pref_duration > 0 && next - start >= ogg->pref_duration)) { + if (page->segments_count == 255) { ogg_buffer_page(s, oggstream); + } else if (!header) { + if ((ogg->pref_size > 0 && page->size >= ogg->pref_size) || + (ogg->pref_duration > 0 && next - start >= ogg->pref_duration)) { + ogg_buffer_page(s, oggstream); + } } } } From 3ae3708246ec9ca46580b8ea40fd01bca31c97b3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Aug 2015 02:49:21 +0200 Subject: [PATCH 814/822] avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size check Fixes Ticket4778 Signed-off-by: Michael Niedermayer (cherry picked from commit 2bb54b82b5094fd906aa28c0443be08c95662a31) --- libavcodec/h264_mp4toannexb_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index a003a1df1d..91605ff863 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -173,7 +173,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, buf += ctx->length_size; unit_type = *buf & 0x1f; - if (buf + nal_size > buf_end || nal_size < 0) + if (nal_size > buf_end - buf || nal_size < 0) goto fail; if (ctx->first_idr && (unit_type == 7 || unit_type == 8)) From beaf2728cea1d832a50c5b91cc02aff1d79cf153 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 23 Oct 2015 11:11:53 -0400 Subject: [PATCH 815/822] videodsp: don't overread edges in vfix3 emu_edge. Fixes trac ticket 3226. Also see Andreas' analysis in https://bugs.debian.org/801745, which was very helpful. (cherry picked from commit 52f84d82bdf1851ecfcc412c1719e5f6f3396209) --- libavcodec/x86/videodsp.asm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/videodsp.asm b/libavcodec/x86/videodsp.asm index 1ac02574d6..77189fa6ef 100644 --- a/libavcodec/x86/videodsp.asm +++ b/libavcodec/x86/videodsp.asm @@ -185,8 +185,12 @@ hvar_fn %elif (%2-%%off) == 2 mov valw, [srcq+%2-2] %elifidn %1, body - mov vald, [srcq+%2-3] -%else + mov valb, [srcq+%2-1] + sal vald, 16 + mov valw, [srcq+%2-3] +%elifidn %1, bottom + movd mm %+ %%mmx_idx, [srcq+%2-4] +%else ; top movd mm %+ %%mmx_idx, [srcq+%2-3] %endif %endif ; (%2-%%off) >= 1 @@ -242,12 +246,15 @@ hvar_fn mov [dstq+%2-2], valw %elifidn %1, body mov [dstq+%2-3], valw - shr vald, 16 + sar vald, 16 mov [dstq+%2-1], valb %else movd vald, mm %+ %%mmx_idx +%ifidn %1, bottom + sar vald, 8 +%endif mov [dstq+%2-3], valw - shr vald, 16 + sar vald, 16 mov [dstq+%2-1], valb %endif %endif ; (%2-%%off) >= 1 From ed4c595edd73212e335354f530f83387f3d06203 Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Tue, 1 Dec 2015 21:15:53 +0200 Subject: [PATCH 816/822] doc/filters/drawtext: fix centering example Signed-off-by: Andrey Utkin Signed-off-by: Lou Logan (cherry picked from commit 648b26acc5e25ab40c43fddc54b50e9f0b13ebd8) Signed-off-by: Timothy Gu --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index ec1449acfd..3331576b96 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3855,7 +3855,7 @@ within the parameter list. @item Show the text at the center of the video frame: @example -drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h-line_h)/2" +drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2" @end example @item From 1aa1f4bbf45e258fb1fb0742d98ebef422fde094 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Nov 2015 00:36:59 +0100 Subject: [PATCH 817/822] avcodec/ffv1dec: Check for 0 quant tables Fixes assertion failure Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 5745cf799a4389bc5d14f2b4daf32fe4631c50bc) --- libavcodec/ffv1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index c8b396ae9a..22dcfddd28 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -550,7 +550,7 @@ static int read_extra_header(FFV1Context *f) } f->quant_table_count = get_symbol(c, state, 0); - if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES) + if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) return AVERROR_INVALIDDATA; for (i = 0; i < f->quant_table_count; i++) { From 8a6a619cbeee99cb42207e01bd733422ece1d911 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Nov 2015 01:25:50 +0100 Subject: [PATCH 818/822] avcodec/ffv1dec: Print an error if the quant table count is invalid Signed-off-by: Michael Niedermayer (cherry picked from commit a8b254e436dce2f5c8c6459108dab4b02cc6b79b) --- libavcodec/ffv1dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 22dcfddd28..60be4435d3 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -550,8 +550,10 @@ static int read_extra_header(FFV1Context *f) } f->quant_table_count = get_symbol(c, state, 0); - if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) + if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) { + av_log(f->avctx, AV_LOG_ERROR, "quant table count %d is invalid\n", f->quant_table_count); return AVERROR_INVALIDDATA; + } for (i = 0; i < f->quant_table_count; i++) { f->context_count[i] = read_quant_tables(c, f->quant_tables[i]); From a9e4be1cdf6f15b37935fcefa99d8a8610dd2c08 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Nov 2015 13:21:58 +0100 Subject: [PATCH 819/822] avcodec/ffv1dec: Clear quant_table_count if its invalid Fixes deallocation of corrupted pointer Fixes: 343dfbe142a38b521ed069dc4ea7c03b/signal_sigsegv_421427_4074_ffb11959610278cd40dbc153464aa254.avi No releases affected Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit e04126072e984f8db5db9da9303c89ae01f7d6bb) Fixes ticket #5052. --- libavcodec/ffv1dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 60be4435d3..af94d34a7d 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -552,6 +552,7 @@ static int read_extra_header(FFV1Context *f) f->quant_table_count = get_symbol(c, state, 0); if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) { av_log(f->avctx, AV_LOG_ERROR, "quant table count %d is invalid\n", f->quant_table_count); + f->quant_table_count = 0; return AVERROR_INVALIDDATA; } From 442e7c910a593319e2024c76d699d916a650f2f7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Dec 2015 02:06:04 +0100 Subject: [PATCH 820/822] swscale/x86/rgb2rgb_template: Do not crash on misaligend stride Fixes Ticket5013 Signed-off-by: Michael Niedermayer (cherry picked from commit 80bfce35ccd11458e97f68f417fc094c5347070c) --- libswscale/x86/rgb2rgb_template.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index 734453b7c9..dc8ca252c0 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1874,8 +1874,10 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui for (h=0; h < height; h++) { int w; - if (width >= 16) + if (width >= 16 #if COMPILE_TEMPLATE_SSE2 + && !((((intptr_t)src1) | ((intptr_t)src2) | ((intptr_t)dest))&15) + ) __asm__( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" @@ -1895,6 +1897,7 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui : "memory", "%"REG_a"" ); #else + ) __asm__( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" From ef23c40d435bb9bf44842d57168cd3f32465d903 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 Dec 2015 02:50:20 +0100 Subject: [PATCH 821/822] swscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment is insufficient for SSE* This also as a sideeffect fixes the non aligned case Signed-off-by: Michael Niedermayer (cherry picked from commit a066ff89bcbae6033c2ffda9271cad84f6c1b807) --- libswscale/x86/rgb2rgb_template.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index dc8ca252c0..fca0ad9f29 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1874,10 +1874,9 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui for (h=0; h < height; h++) { int w; - if (width >= 16 + if (width >= 16) { #if COMPILE_TEMPLATE_SSE2 - && !((((intptr_t)src1) | ((intptr_t)src2) | ((intptr_t)dest))&15) - ) + if (!((((intptr_t)src1) | ((intptr_t)src2) | ((intptr_t)dest))&15)) { __asm__( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" @@ -1896,8 +1895,8 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui ::"r"(dest), "r"(src1), "r"(src2), "r" ((x86_reg)width-15) : "memory", "%"REG_a"" ); -#else - ) + } else +#endif __asm__( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" @@ -1923,7 +1922,8 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui ::"r"(dest), "r"(src1), "r"(src2), "r" ((x86_reg)width-15) : "memory", "%"REG_a ); -#endif + + } for (w= (width&(~15)); w < width; w++) { dest[2*w+0] = src1[w]; dest[2*w+1] = src2[w]; From c7fe604cf1896f7599c23b5707fc577a93c66229 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 2 Mar 2016 11:20:07 +0100 Subject: [PATCH 822/822] doc/utils: fix typo for min() description Signed-off-by: Paul B Mahol (cherry picked from commit bdf474bcff29f5b40fe14f6fa1dbe10e69c73ab7) Signed-off-by: Timothy Gu --- doc/utils.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/utils.texi b/doc/utils.texi index 05fbcedc8b..27ca7d9918 100644 --- a/doc/utils.texi +++ b/doc/utils.texi @@ -858,7 +858,7 @@ Return 1 if @var{x} is lesser than or equal to @var{y}, 0 otherwise. Return the maximum between @var{x} and @var{y}. @item min(x, y) -Return the maximum between @var{x} and @var{y}. +Return the minimum between @var{x} and @var{y}. @item mod(x, y) Compute the remainder of division of @var{x} by @var{y}.