[FFmpeg-cvslog] avcodec/cbs_jpeg: Fix infinite loop in cbs_jpeg_split_fragment()
ffmpeg | branch: master | Michael Niedermayer | Thu Mar 19 22:05:42 2020 +0100| [a3dc67c9840f6ba6cdf6233248897146e9171cc8] | committer: Michael Niedermayer avcodec/cbs_jpeg: Fix infinite loop in cbs_jpeg_split_fragment() Fixes: Timeout Fixes: 21104/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5129580475318272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3dc67c9840f6ba6cdf6233248897146e9171cc8 --- libavcodec/cbs_jpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c index 4ff04ae52d..6959ecee7f 100644 --- a/libavcodec/cbs_jpeg.c +++ b/libavcodec/cbs_jpeg.c @@ -148,15 +148,14 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx, if (marker == JPEG_MARKER_EOI) { break; } else if (marker == JPEG_MARKER_SOS) { +next_marker = -1; for (i = start; i + 1 < frag->data_size; i++) { if (frag->data[i] != 0xff) continue; end = i; for (++i; i + 1 < frag->data_size && frag->data[i] == 0xff; i++); -if (i + 1 >= frag->data_size) { -next_marker = -1; -} else { +if (i + 1 < frag->data_size) { if (frag->data[i] == 0x00) continue; next_marker = frag->data[i]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/pnmdec: Use unsigned for maxval rescaling
ffmpeg | branch: master | Michael Niedermayer | Sat May 16 00:31:23 2020 +0200| [49459aca47d4803b2188fbf12b758bd2b01e91d7] | committer: Michael Niedermayer avcodec/pnmdec: Use unsigned for maxval rescaling Fixes: signed integer overflow: 65535 * 55335 cannot be represented in type 'int' Fixes: 21955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5669206981083136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49459aca47d4803b2188fbf12b758bd2b01e91d7 --- libavcodec/pnmdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index dbcaef3884..e03e52297f 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -132,7 +132,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, init_put_bits(&pb, ptr, linesize); for(j=0; jwidth * components; j++){ unsigned int c=0; -int v=0; +unsigned v=0; if(s->type < 4) while(s->bytestream < s->bytestream_end && (*s->bytestream < '0' || *s->bytestream > '9' )) s->bytestream++; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/ivi: Clear got_p_frame before decoding a new frame using it
ffmpeg | branch: master | Michael Niedermayer | Wed May 13 00:11:37 2020 +0200| [1d633e6a0a61118c9b2d1785d96bdebaa8c38592] | committer: Michael Niedermayer avcodec/ivi: Clear got_p_frame before decoding a new frame using it Fixes: assertion failure Fixes: 21666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5706468994318336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d633e6a0a61118c9b2d1785d96bdebaa8c38592 --- libavcodec/ivi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index 7d3749b818..c5c50fb5c1 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -1192,6 +1192,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket pkt; pkt.data = avpkt->data + (get_bits_count(&ctx->gb) >> 3); pkt.size = get_bits_left(&ctx->gb) >> 3; +ctx->got_p_frame = 0; +av_frame_unref(ctx->p_frame); ff_ivi_decode_frame(avctx, ctx->p_frame, &ctx->got_p_frame, &pkt); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/cbs_h265_syntax_template: Limit num_long_term_pics more strictly
ffmpeg | branch: master | Michael Niedermayer | Mon Apr 20 23:27:04 2020 +0200| [435fa373d1f5045b17de74934e44863e2fb3071f] | committer: Michael Niedermayer avcodec/cbs_h265_syntax_template: Limit num_long_term_pics more strictly The limit is based on hevcdec.c Fixes: 20854/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-5160442882424832 Fixes: out of array access Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=435fa373d1f5045b17de74934e44863e2fb3071f --- libavcodec/cbs_h265_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c index 55da1a0a11..06a8e1cc2a 100644 --- a/libavcodec/cbs_h265_syntax_template.c +++ b/libavcodec/cbs_h265_syntax_template.c @@ -1377,7 +1377,7 @@ static int FUNC(slice_segment_header)(CodedBitstreamContext *ctx, RWContext *rw, infer(num_long_term_sps, 0); idx_size = 0; } -ue(num_long_term_pics, 0, HEVC_MAX_LONG_TERM_REF_PICS); +ue(num_long_term_pics, 0, HEVC_MAX_REFS - current->num_long_term_sps); for (i = 0; i < current->num_long_term_sps + current->num_long_term_pics; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr()
ffmpeg | branch: master | Michael Niedermayer | Sun Apr 26 21:19:13 2020 +0200| [e9a4c4fe9918220be492a4a9d74c2293fd706be3] | committer: Michael Niedermayer avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr() Fixes: signed integer overflow: -717241856 + -1434459904 cannot be represented in type 'int' Fixes: 21405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5677143666458624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9a4c4fe9918220be492a4a9d74c2293fd706be3 --- libavcodec/wmalosslessdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index c6c13fb417..7ef7c93dbd 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -790,8 +790,8 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size) else if (s->is_channel_coded[0] || s->is_channel_coded[1]) { int icoef; for (icoef = 0; icoef < tile_size; icoef++) { -s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1; -s->channel_residues[1][icoef] += s->channel_residues[0][icoef]; +s->channel_residues[0][icoef] -= (unsigned)(s->channel_residues[1][icoef] >> 1); +s->channel_residues[1][icoef] += (unsigned) s->channel_residues[0][icoef]; } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aadec: Check toc_size to contain the minimum to demuxer uses
ffmpeg | branch: master | Michael Niedermayer | Tue Apr 7 12:04:25 2020 +0200| [daa2482871dffa9af12fa6d874a3d2dedd73f42e] | committer: Michael Niedermayer avformat/aadec: Check toc_size to contain the minimum to demuxer uses Fixes: out of array access Fixes: stack-buffer-overflow-READ-0x0831fff1 Found-by: GalyCannon Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=daa2482871dffa9af12fa6d874a3d2dedd73f42e --- libavformat/aadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aadec.c b/libavformat/aadec.c index b9dd51ebfc..63f8176a57 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -92,7 +92,7 @@ static int aa_read_header(AVFormatContext *s) avio_skip(pb, 4); // magic string toc_size = avio_rb32(pb); // TOC size avio_skip(pb, 4); // unidentified integer -if (toc_size > MAX_TOC_ENTRIES) +if (toc_size > MAX_TOC_ENTRIES || toc_size < 2) return AVERROR_INVALIDDATA; for (i = 0; i < toc_size; i++) { // read TOC avio_skip(pb, 4); // TOC entry index ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/swfenc: Fix integer overflow in frame rate handling
ffmpeg | branch: master | Michael Niedermayer | Sun Feb 16 18:32:31 2020 +0100| [31f956acadd994b8c4e22b714aaffee0f527c827] | committer: Michael Niedermayer avformat/swfenc: Fix integer overflow in frame rate handling Fixes: signed integer overflow: 3299 * 256 cannot be represented in type 'int' Fixes: ticket8184 Found-by: Suhwan Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31f956acadd994b8c4e22b714aaffee0f527c827 --- libavformat/swfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index 84f924eda5..9da4aad959 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -256,7 +256,7 @@ static int swf_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "Invalid (too large) frame rate %d/%d\n", rate, rate_base); return AVERROR(EINVAL); } -avio_wl16(pb, (rate * 256) / rate_base); /* frame rate */ +avio_wl16(pb, (rate * 256LL) / rate_base); /* frame rate */ swf->duration_pos = avio_tell(pb); avio_wl16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/tiff: Check for Tiled and Stripped TIFFs
ffmpeg | branch: master | Michael Niedermayer | Wed Feb 19 15:15:42 2020 +0100| [70faa9f618183956d42d520f516b6d0c8e3d81ce] | committer: Michael Niedermayer avcodec/tiff: Check for Tiled and Stripped TIFFs TIFF 6 spec: "Do not use both strip-oriented and tile-oriented fields in the same TIFF file." Fixes: null pointer use, crash Fixes: crash-762680f9d1b27f9b9085e12887ad44893fb2b020 Found-by: Shiziru Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70faa9f618183956d42d520f516b6d0c8e3d81ce --- libavcodec/tiff.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 5e4f424b67..010943c38c 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1758,6 +1758,7 @@ static int decode_frame(AVCodecContext *avctx, GetByteContext stripdata; int retry_for_subifd, retry_for_page; int is_dng; +int has_tile_bits, has_strip_bits; bytestream2_init(&s->gb, avpkt->data, avpkt->size); @@ -1885,6 +1886,14 @@ again: return AVERROR_INVALIDDATA; } +has_tile_bits = s->is_tiled || s->tile_byte_counts_offset || s->tile_offsets_offset || s->tile_width || s->tile_length || s->tile_count; +has_strip_bits = s->strippos || s->strips || s->stripoff || s->rps || s->sot || s->sstype || s->stripsize || s->stripsizesoff; + +if (has_tile_bits && has_strip_bits) { +av_log(avctx, AV_LOG_ERROR, "Tiled TIFF is not allowed to strip\n"); +return AVERROR_INVALIDDATA; +} + /* now we have the data and may start decoding */ if ((ret = init_image(s, &frame)) < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/bitpacked: Add codec_tags list
ffmpeg | branch: master | Michael Niedermayer | Fri Feb 7 14:17:28 2020 +0100| [a629cec58ea6c15305d983d0dbc9d1499a4665b9] | committer: Michael Niedermayer avcodec/bitpacked: Add codec_tags list This should improve coverage Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a629cec58ea6c15305d983d0dbc9d1499a4665b9 --- libavcodec/bitpacked.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c index f0b417d595..be7d1e3629 100644 --- a/libavcodec/bitpacked.c +++ b/libavcodec/bitpacked.c @@ -146,4 +146,8 @@ AVCodec ff_bitpacked_decoder = { .init = bitpacked_init_decoder, .decode = bitpacked_decode, .capabilities = AV_CODEC_CAP_EXPERIMENTAL, +.codec_tags = (const uint32_t []){ +MKTAG('U', 'Y', 'V', 'Y') +FF_CODEC_TAGS_END, +}, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE
ffmpeg | branch: master | Michael Niedermayer | Sun Feb 16 18:51:52 2020 +0100| [9874815b1aadadd7fd19aa6aabb7d9193f2f43d5] | committer: Michael Niedermayer avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE Fixes: signed integer overflow: -9223372036854775808 - 45000 cannot be represented in type 'long' Fixes: ticket8187 Found-by: Suhwan Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9874815b1aadadd7fd19aa6aabb7d9193f2f43d5 --- libavformat/mpegenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 669ff9d152..9bd0a555d4 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1210,7 +1210,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) if (s->is_dvd) { // min VOBU length 0.4 seconds (mpucoder) if (is_iframe && -(s->packet_number == 0 || +(s->packet_number == 0 || pts != AV_NOPTS_VALUE && (pts - stream->vobu_start_pts >= 36000))) { stream->bytes_to_iframe = av_fifo_size(stream->fifo); stream->align_iframe= 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/xvididct: Fix integer overflow in idct_row()
ffmpeg | branch: master | Michael Niedermayer | Sat May 2 21:25:17 2020 +0200| [620236e4d2ac46821911b99fa4551868675d4ed9] | committer: Michael Niedermayer avcodec/xvididct: Fix integer overflow in idct_row() Fixes: signed integer overflow: -1238335488 + -1003634688 cannot be represented in type 'int' Fixes: 21649/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5112005765890048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=620236e4d2ac46821911b99fa4551868675d4ed9 --- libavcodec/xvididct.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c index 14116bd6d3..360deb3244 100644 --- a/libavcodec/xvididct.c +++ b/libavcodec/xvididct.c @@ -115,24 +115,24 @@ static int idct_row(short *in, const int *const tab, int rnd) in[6] = a1; } else { const int k = c4 * in[0] + rnd; -const int a0 = k + c2 * in[2] + c4 * in[4] + c6 * in[6]; -const int a1 = k + c6 * in[2] - c4 * in[4] - c2 * in[6]; -const int a2 = k - c6 * in[2] - c4 * in[4] + c2 * in[6]; -const int a3 = k - c2 * in[2] + c4 * in[4] - c6 * in[6]; - -const int b0 = c1 * in[1] + c3 * in[3] + c5 * in[5] + c7 * in[7]; -const int b1 = c3 * in[1] - c7 * in[3] - c1 * in[5] - c5 * in[7]; -const int b2 = c5 * in[1] - c1 * in[3] + c7 * in[5] + c3 * in[7]; -const int b3 = c7 * in[1] - c5 * in[3] + c3 * in[5] - c1 * in[7]; - -in[0] = (a0 + b0) >> ROW_SHIFT; -in[1] = (a1 + b1) >> ROW_SHIFT; -in[2] = (a2 + b2) >> ROW_SHIFT; -in[3] = (a3 + b3) >> ROW_SHIFT; -in[4] = (a3 - b3) >> ROW_SHIFT; -in[5] = (a2 - b2) >> ROW_SHIFT; -in[6] = (a1 - b1) >> ROW_SHIFT; -in[7] = (a0 - b0) >> ROW_SHIFT; +const unsigned int a0 = k + c2 * in[2] + c4 * in[4] + c6 * in[6]; +const unsigned int a1 = k + c6 * in[2] - c4 * in[4] - c2 * in[6]; +const unsigned int a2 = k - c6 * in[2] - c4 * in[4] + c2 * in[6]; +const unsigned int a3 = k - c2 * in[2] + c4 * in[4] - c6 * in[6]; + +const unsigned int b0 = c1 * in[1] + c3 * in[3] + c5 * in[5] + c7 * in[7]; +const unsigned int b1 = c3 * in[1] - c7 * in[3] - c1 * in[5] - c5 * in[7]; +const unsigned int b2 = c5 * in[1] - c1 * in[3] + c7 * in[5] + c3 * in[7]; +const unsigned int b3 = c7 * in[1] - c5 * in[3] + c3 * in[5] - c1 * in[7]; + +in[0] = (int)(a0 + b0) >> ROW_SHIFT; +in[1] = (int)(a1 + b1) >> ROW_SHIFT; +in[2] = (int)(a2 + b2) >> ROW_SHIFT; +in[3] = (int)(a3 + b3) >> ROW_SHIFT; +in[4] = (int)(a3 - b3) >> ROW_SHIFT; +in[5] = (int)(a2 - b2) >> ROW_SHIFT; +in[6] = (int)(a1 - b1) >> ROW_SHIFT; +in[7] = (int)(a0 - b0) >> ROW_SHIFT; } return 1; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/dsddec: Check channels
ffmpeg | branch: master | Michael Niedermayer | Mon May 4 00:04:49 2020 +0200| [2570a8777e7095358b10f679d35641e114a2ab33] | committer: Michael Niedermayer avcodec/dsddec: Check channels Fixes: division by zero Fixes: 21677/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_MSBF_fuzzer-5712547983654912 Fixes: 21751/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_LSBF_fuzzer-5197097180856320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2570a8777e7095358b10f679d35641e114a2ab33 --- libavcodec/dsddec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c index 7c3ae15768..39837a5ad9 100644 --- a/libavcodec/dsddec.c +++ b/libavcodec/dsddec.c @@ -44,6 +44,9 @@ static av_cold int decode_init(AVCodecContext *avctx) int i; uint8_t silence; +if (!avctx->channels) +return AVERROR_INVALIDDATA; + ff_init_dsd_data(); s = av_malloc_array(sizeof(DSDContext), avctx->channels); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/cbs_jpeg: Fix infinite loop in cbs_jpeg_split_fragment()
ffmpeg | branch: release/4.2 | Michael Niedermayer | Thu Mar 19 22:05:42 2020 +0100| [209b42916869e78fc67f386fdebbe903ca8dbd72] | committer: Michael Niedermayer avcodec/cbs_jpeg: Fix infinite loop in cbs_jpeg_split_fragment() Fixes: Timeout Fixes: 21104/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5129580475318272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit a3dc67c9840f6ba6cdf6233248897146e9171cc8) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=209b42916869e78fc67f386fdebbe903ca8dbd72 --- libavcodec/cbs_jpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c index e26acdaff0..6e48b581f1 100644 --- a/libavcodec/cbs_jpeg.c +++ b/libavcodec/cbs_jpeg.c @@ -148,15 +148,14 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx, if (marker == JPEG_MARKER_EOI) { break; } else if (marker == JPEG_MARKER_SOS) { +next_marker = -1; for (i = start; i + 1 < frag->data_size; i++) { if (frag->data[i] != 0xff) continue; end = i; for (++i; i + 1 < frag->data_size && frag->data[i] == 0xff; i++); -if (i + 1 >= frag->data_size) { -next_marker = -1; -} else { +if (i + 1 < frag->data_size) { if (frag->data[i] == 0x00) continue; next_marker = frag->data[i]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE
ffmpeg | branch: release/4.2 | Michael Niedermayer | Sun Feb 16 18:51:52 2020 +0100| [ab9074c1c3fc5179f153743d869b33a7623d738b] | committer: Michael Niedermayer avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE Fixes: signed integer overflow: -9223372036854775808 - 45000 cannot be represented in type 'long' Fixes: ticket8187 Found-by: Suhwan Signed-off-by: Michael Niedermayer (cherry picked from commit 9874815b1aadadd7fd19aa6aabb7d9193f2f43d5) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab9074c1c3fc5179f153743d869b33a7623d738b --- libavformat/mpegenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 43ebc46e0e..1b0b532790 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1215,7 +1215,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) if (s->is_dvd) { // min VOBU length 0.4 seconds (mpucoder) if (is_iframe && -(s->packet_number == 0 || +(s->packet_number == 0 || pts != AV_NOPTS_VALUE && (pts - stream->vobu_start_pts >= 36000))) { stream->bytes_to_iframe = av_fifo_size(stream->fifo); stream->align_iframe= 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aadec: Check toc_size to contain the minimum to demuxer uses
ffmpeg | branch: release/4.2 | Michael Niedermayer | Tue Apr 7 12:04:25 2020 +0200| [719deee9a7744bd5e07123cf284556a1286636f3] | committer: Michael Niedermayer avformat/aadec: Check toc_size to contain the minimum to demuxer uses Fixes: out of array access Fixes: stack-buffer-overflow-READ-0x0831fff1 Found-by: GalyCannon Signed-off-by: Michael Niedermayer (cherry picked from commit daa2482871dffa9af12fa6d874a3d2dedd73f42e) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=719deee9a7744bd5e07123cf284556a1286636f3 --- libavformat/aadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aadec.c b/libavformat/aadec.c index b9dd51ebfc..63f8176a57 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -92,7 +92,7 @@ static int aa_read_header(AVFormatContext *s) avio_skip(pb, 4); // magic string toc_size = avio_rb32(pb); // TOC size avio_skip(pb, 4); // unidentified integer -if (toc_size > MAX_TOC_ENTRIES) +if (toc_size > MAX_TOC_ENTRIES || toc_size < 2) return AVERROR_INVALIDDATA; for (i = 0; i < toc_size; i++) { // read TOC avio_skip(pb, 4); // TOC entry index ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/xvididct: Fix integer overflow in idct_row()
ffmpeg | branch: release/4.2 | Michael Niedermayer | Sat May 2 21:25:17 2020 +0200| [53bfdb6fdb3686e6b65e3f94704ab137af992d09] | committer: Michael Niedermayer avcodec/xvididct: Fix integer overflow in idct_row() Fixes: signed integer overflow: -1238335488 + -1003634688 cannot be represented in type 'int' Fixes: 21649/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5112005765890048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 620236e4d2ac46821911b99fa4551868675d4ed9) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53bfdb6fdb3686e6b65e3f94704ab137af992d09 --- libavcodec/xvididct.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c index 14116bd6d3..360deb3244 100644 --- a/libavcodec/xvididct.c +++ b/libavcodec/xvididct.c @@ -115,24 +115,24 @@ static int idct_row(short *in, const int *const tab, int rnd) in[6] = a1; } else { const int k = c4 * in[0] + rnd; -const int a0 = k + c2 * in[2] + c4 * in[4] + c6 * in[6]; -const int a1 = k + c6 * in[2] - c4 * in[4] - c2 * in[6]; -const int a2 = k - c6 * in[2] - c4 * in[4] + c2 * in[6]; -const int a3 = k - c2 * in[2] + c4 * in[4] - c6 * in[6]; - -const int b0 = c1 * in[1] + c3 * in[3] + c5 * in[5] + c7 * in[7]; -const int b1 = c3 * in[1] - c7 * in[3] - c1 * in[5] - c5 * in[7]; -const int b2 = c5 * in[1] - c1 * in[3] + c7 * in[5] + c3 * in[7]; -const int b3 = c7 * in[1] - c5 * in[3] + c3 * in[5] - c1 * in[7]; - -in[0] = (a0 + b0) >> ROW_SHIFT; -in[1] = (a1 + b1) >> ROW_SHIFT; -in[2] = (a2 + b2) >> ROW_SHIFT; -in[3] = (a3 + b3) >> ROW_SHIFT; -in[4] = (a3 - b3) >> ROW_SHIFT; -in[5] = (a2 - b2) >> ROW_SHIFT; -in[6] = (a1 - b1) >> ROW_SHIFT; -in[7] = (a0 - b0) >> ROW_SHIFT; +const unsigned int a0 = k + c2 * in[2] + c4 * in[4] + c6 * in[6]; +const unsigned int a1 = k + c6 * in[2] - c4 * in[4] - c2 * in[6]; +const unsigned int a2 = k - c6 * in[2] - c4 * in[4] + c2 * in[6]; +const unsigned int a3 = k - c2 * in[2] + c4 * in[4] - c6 * in[6]; + +const unsigned int b0 = c1 * in[1] + c3 * in[3] + c5 * in[5] + c7 * in[7]; +const unsigned int b1 = c3 * in[1] - c7 * in[3] - c1 * in[5] - c5 * in[7]; +const unsigned int b2 = c5 * in[1] - c1 * in[3] + c7 * in[5] + c3 * in[7]; +const unsigned int b3 = c7 * in[1] - c5 * in[3] + c3 * in[5] - c1 * in[7]; + +in[0] = (int)(a0 + b0) >> ROW_SHIFT; +in[1] = (int)(a1 + b1) >> ROW_SHIFT; +in[2] = (int)(a2 + b2) >> ROW_SHIFT; +in[3] = (int)(a3 + b3) >> ROW_SHIFT; +in[4] = (int)(a3 - b3) >> ROW_SHIFT; +in[5] = (int)(a2 - b2) >> ROW_SHIFT; +in[6] = (int)(a1 - b1) >> ROW_SHIFT; +in[7] = (int)(a0 - b0) >> ROW_SHIFT; } return 1; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/ivi: Clear got_p_frame before decoding a new frame using it
ffmpeg | branch: release/4.2 | Michael Niedermayer | Wed May 13 00:11:37 2020 +0200| [b7fdc2d02b81d285ac1a1a21deac3bdf61569734] | committer: Michael Niedermayer avcodec/ivi: Clear got_p_frame before decoding a new frame using it Fixes: assertion failure Fixes: 21666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5706468994318336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 1d633e6a0a61118c9b2d1785d96bdebaa8c38592) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7fdc2d02b81d285ac1a1a21deac3bdf61569734 --- libavcodec/ivi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index 73fcf51b7b..48af4270cb 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -1196,6 +1196,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket pkt; pkt.data = avpkt->data + (get_bits_count(&ctx->gb) >> 3); pkt.size = get_bits_left(&ctx->gb) >> 3; +ctx->got_p_frame = 0; +av_frame_unref(ctx->p_frame); ff_ivi_decode_frame(avctx, ctx->p_frame, &ctx->got_p_frame, &pkt); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/pnmdec: Use unsigned for maxval rescaling
ffmpeg | branch: release/4.2 | Michael Niedermayer | Sat May 16 00:31:23 2020 +0200| [989a2788c094fc78e0fd209d691eae1c8ba8b2f4] | committer: Michael Niedermayer avcodec/pnmdec: Use unsigned for maxval rescaling Fixes: signed integer overflow: 65535 * 55335 cannot be represented in type 'int' Fixes: 21955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5669206981083136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 49459aca47d4803b2188fbf12b758bd2b01e91d7) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=989a2788c094fc78e0fd209d691eae1c8ba8b2f4 --- libavcodec/pnmdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index 958c5e43b0..2c98e26934 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -132,7 +132,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, init_put_bits(&pb, ptr, linesize); for(j=0; jwidth * components; j++){ unsigned int c=0; -int v=0; +unsigned v=0; if(s->type < 4) while(s->bytestream < s->bytestream_end && (*s->bytestream < '0' || *s->bytestream > '9' )) s->bytestream++; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/cbs_h265_syntax_template: Limit num_long_term_pics more strictly
ffmpeg | branch: release/4.2 | Michael Niedermayer | Mon Apr 20 23:27:04 2020 +0200| [1653a2247fd8d92aa70d0633093735e27e38dbce] | committer: Michael Niedermayer avcodec/cbs_h265_syntax_template: Limit num_long_term_pics more strictly The limit is based on hevcdec.c Fixes: 20854/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-5160442882424832 Fixes: out of array access Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 435fa373d1f5045b17de74934e44863e2fb3071f) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1653a2247fd8d92aa70d0633093735e27e38dbce --- libavcodec/cbs_h265_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c index 8043e3e7b7..71a6413518 100644 --- a/libavcodec/cbs_h265_syntax_template.c +++ b/libavcodec/cbs_h265_syntax_template.c @@ -1371,7 +1371,7 @@ static int FUNC(slice_segment_header)(CodedBitstreamContext *ctx, RWContext *rw, infer(num_long_term_sps, 0); idx_size = 0; } -ue(num_long_term_pics, 0, HEVC_MAX_LONG_TERM_REF_PICS); +ue(num_long_term_pics, 0, HEVC_MAX_REFS - current->num_long_term_sps); for (i = 0; i < current->num_long_term_sps + current->num_long_term_pics; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] Changelog: update
ffmpeg | branch: release/4.2 | Michael Niedermayer | Thu May 21 15:07:06 2020 +0200| [d3b963cc41824a3c5b2758ac896fb23e20a87875] | committer: Michael Niedermayer Changelog: update Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3b963cc41824a3c5b2758ac896fb23e20a87875 --- Changelog | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Changelog b/Changelog index 7b4366323f..95fe49f1e0 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,17 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 4.2.3 +- avcodec/pnmdec: Use unsigned for maxval rescaling +- avcodec/ivi: Clear got_p_frame before decoding a new frame using it +- avcodec/dsddec: Check channels +- avcodec/xvididct: Fix integer overflow in idct_row() +- avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr() +- avcodec/cbs_jpeg: Fix infinite loop in cbs_jpeg_split_fragment() +- avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE +- avformat/swfenc: Fix integer overflow in frame rate handling +- avformat/aadec: Check toc_size to contain the minimum to demuxer uses +- avcodec/cbs_h265_syntax_template: Limit num_long_term_pics more strictly +- ffplay: set stream_index to -1 earlier to prevent segfault - avformat/mov: Free temp buffer upon negative sample_size error. - avformat/matroskadec: Improve forward compability - avformat/matroskadec: Don't discard valid packets ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/swfenc: Fix integer overflow in frame rate handling
ffmpeg | branch: release/4.2 | Michael Niedermayer | Sun Feb 16 18:32:31 2020 +0100| [52510a50f7537917cd0880f10f0db407e56e0215] | committer: Michael Niedermayer avformat/swfenc: Fix integer overflow in frame rate handling Fixes: signed integer overflow: 3299 * 256 cannot be represented in type 'int' Fixes: ticket8184 Found-by: Suhwan Signed-off-by: Michael Niedermayer (cherry picked from commit 31f956acadd994b8c4e22b714aaffee0f527c827) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52510a50f7537917cd0880f10f0db407e56e0215 --- libavformat/swfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index f53db0fb2b..877dcfa9cb 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -256,7 +256,7 @@ static int swf_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "Invalid (too large) frame rate %d/%d\n", rate, rate_base); return AVERROR(EINVAL); } -avio_wl16(pb, (rate * 256) / rate_base); /* frame rate */ +avio_wl16(pb, (rate * 256LL) / rate_base); /* frame rate */ swf->duration_pos = avio_tell(pb); avio_wl16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/dsddec: Check channels
ffmpeg | branch: release/4.2 | Michael Niedermayer | Mon May 4 00:04:49 2020 +0200| [219c025463c4e5634129b73a72a13e0f6ab70150] | committer: Michael Niedermayer avcodec/dsddec: Check channels Fixes: division by zero Fixes: 21677/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_MSBF_fuzzer-5712547983654912 Fixes: 21751/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_LSBF_fuzzer-5197097180856320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 2570a8777e7095358b10f679d35641e114a2ab33) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=219c025463c4e5634129b73a72a13e0f6ab70150 --- libavcodec/dsddec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c index 2c5c357acc..a2e038419f 100644 --- a/libavcodec/dsddec.c +++ b/libavcodec/dsddec.c @@ -44,6 +44,9 @@ static av_cold int decode_init(AVCodecContext *avctx) int i; uint8_t silence; +if (!avctx->channels) +return AVERROR_INVALIDDATA; + ff_init_dsd_data(); s = av_malloc_array(sizeof(DSDContext), avctx->channels); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr()
ffmpeg | branch: release/4.2 | Michael Niedermayer | Sun Apr 26 21:19:13 2020 +0200| [5df443f763e2c6f5046c5ab389b746c548904ef9] | committer: Michael Niedermayer avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr() Fixes: signed integer overflow: -717241856 + -1434459904 cannot be represented in type 'int' Fixes: 21405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5677143666458624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit e9a4c4fe9918220be492a4a9d74c2293fd706be3) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5df443f763e2c6f5046c5ab389b746c548904ef9 --- libavcodec/wmalosslessdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 22596bd5f8..8eb473e3ba 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -793,8 +793,8 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size) else if (s->is_channel_coded[0] || s->is_channel_coded[1]) { int icoef; for (icoef = 0; icoef < tile_size; icoef++) { -s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1; -s->channel_residues[1][icoef] += s->channel_residues[0][icoef]; +s->channel_residues[0][icoef] -= (unsigned)(s->channel_residues[1][icoef] >> 1); +s->channel_residues[1][icoef] += (unsigned) s->channel_residues[0][icoef]; } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/decode: remove ff_decode_bsfs_uninit()
ffmpeg | branch: master | James Almer | Wed May 20 00:59:32 2020 -0300| [d3bedba97fcbc395d61c509ab41da4fec498db2b] | committer: James Almer avcodec/decode: remove ff_decode_bsfs_uninit() It's been a wrapper for a simple av_bsf_free() call since c96904f525. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3bedba97fcbc395d61c509ab41da4fec498db2b --- libavcodec/decode.c | 7 +-- libavcodec/decode.h | 6 -- libavcodec/utils.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 48a61d5419..f3327d74af 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -231,7 +231,7 @@ int ff_decode_bsfs_init(AVCodecContext *avctx) return 0; fail: -ff_decode_bsfs_uninit(avctx); +av_bsf_free(&avci->bsf); return ret; } @@ -2005,8 +2005,3 @@ void avcodec_flush_buffers(AVCodecContext *avctx) if (!avctx->refcounted_frames) av_frame_unref(avci->to_free); } - -void ff_decode_bsfs_uninit(AVCodecContext *avctx) -{ -av_bsf_free(&avctx->internal->bsf); -} diff --git a/libavcodec/decode.h b/libavcodec/decode.h index c3e0e82f4c..5565346f96 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -64,10 +64,12 @@ typedef struct FrameDecodeData { */ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); +/** + * Called during avcodec_open2() to initialize avctx->internal->bsf. + * The bsf should be freed with av_bsf_free(). + */ int ff_decode_bsfs_init(AVCodecContext *avctx); -void ff_decode_bsfs_uninit(AVCodecContext *avctx); - /** * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will * try to allocate it from hw_device_ctx. If that is not possible, an error diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 91b271a717..3255679550 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1045,7 +1045,7 @@ FF_ENABLE_DEPRECATION_WARNINGS av_packet_free(&avci->last_pkt_props); av_packet_free(&avci->ds.in_pkt); -ff_decode_bsfs_uninit(avctx); +av_bsf_free(&avci->bsf); av_buffer_unref(&avci->pool); } @@ -1106,7 +1106,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) avctx->hwaccel->uninit(avctx); av_freep(&avctx->internal->hwaccel_priv_data); -ff_decode_bsfs_uninit(avctx); +av_bsf_free(&avctx->internal->bsf); av_freep(&avctx->internal); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/cmdutils: remove lossless and intra only capability entries from print_codec()
ffmpeg | branch: master | James Almer | Mon May 18 12:55:00 2020 -0300| [cbb1760afab867bf269e4c4f5b7bb63b8c58abc7] | committer: James Almer fftools/cmdutils: remove lossless and intra only capability entries from print_codec() They are codec properties, not encoder capabilities. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbb1760afab867bf269e4c4f5b7bb63b8c58abc7 --- fftools/cmdutils.c | 4 1 file changed, 4 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 7f5a5ca664..7bec1db18b 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1423,10 +1423,6 @@ static void print_codec(const AVCodec *c) printf("threads "); if (c->capabilities & AV_CODEC_CAP_AVOID_PROBING) printf("avoidprobe "); -if (c->capabilities & AV_CODEC_CAP_INTRA_ONLY) -printf("intraonly "); -if (c->capabilities & AV_CODEC_CAP_LOSSLESS) -printf("lossless "); if (c->capabilities & AV_CODEC_CAP_HARDWARE) printf("hardware "); if (c->capabilities & AV_CODEC_CAP_HYBRID) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec: deprecate Lossless and Intra Only encoder capabilites
ffmpeg | branch: master | James Almer | Thu May 21 12:20:11 2020 -0300| [13b1bbff0be1eeb9471bd5eb9911da15f4b4ac50] | committer: James Almer avcodec: deprecate Lossless and Intra Only encoder capabilites Both are codec properties and not encoder capabilities. The relevant AVCodecDescriptor.props flags exist for this purpose. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13b1bbff0be1eeb9471bd5eb9911da15f4b4ac50 --- doc/APIchanges | 3 +++ libavcodec/audiotoolboxenc.c| 2 +- libavcodec/avcodec.h| 7 +-- libavcodec/avuienc.c| 2 +- libavcodec/dnxhdenc.c | 2 +- libavcodec/dvenc.c | 2 +- libavcodec/flacenc.c| 2 +- libavcodec/huffyuvenc.c | 4 ++-- libavcodec/jpeglsenc.c | 2 +- libavcodec/lclenc.c | 2 +- libavcodec/libopenjpegenc.c | 2 +- libavcodec/librsvgdec.c | 2 +- libavcodec/ljpegenc.c | 2 +- libavcodec/magicyuvenc.c| 2 +- libavcodec/mjpegenc.c | 2 +- libavcodec/pngenc.c | 2 +- libavcodec/proresenc_anatoliy.c | 4 ++-- libavcodec/proresenc_kostya.c | 2 +- libavcodec/r210enc.c| 3 --- libavcodec/tiffenc.c| 2 +- libavcodec/ttaenc.c | 2 +- libavcodec/utvideoenc.c | 2 +- libavcodec/v308enc.c| 1 - libavcodec/v408enc.c| 2 -- libavcodec/vaapi_encode_mjpeg.c | 3 +-- libavcodec/version.h| 5 - libavcodec/xfaceenc.c | 1 - libavcodec/y41penc.c| 1 - libavcodec/yuv4enc.c| 1 - 29 files changed, 34 insertions(+), 35 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 986ca9f206..c1ef1249a4 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-05-xx - xx - lavc 56.86.101 - avcodec.h + Deprecated AV_CODEC_CAP_INTRA_ONLY and AV_CODEC_CAP_LOSSLESS. + 2020-05-xx - xx - lavu 56.46.100 - common.h Add av_sat_add64() and av_sat_sub64() diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c index 27632decf5..e8748b3c68 100644 --- a/libavcodec/audiotoolboxenc.c +++ b/libavcodec/audiotoolboxenc.c @@ -656,7 +656,7 @@ static const uint64_t aac_at_channel_layouts[] = { FFAT_ENC(aac, AV_CODEC_ID_AAC, aac_profiles, , .channel_layouts = aac_at_channel_layouts) //FFAT_ENC(adpcm_ima_qt, AV_CODEC_ID_ADPCM_IMA_QT, NULL) -FFAT_ENC(alac, AV_CODEC_ID_ALAC, NULL, | AV_CODEC_CAP_VARIABLE_FRAME_SIZE | AV_CODEC_CAP_LOSSLESS) +FFAT_ENC(alac, AV_CODEC_ID_ALAC, NULL, | AV_CODEC_CAP_VARIABLE_FRAME_SIZE) FFAT_ENC(ilbc, AV_CODEC_ID_ILBC, NULL) FFAT_ENC(pcm_alaw, AV_CODEC_ID_PCM_ALAW, NULL) FFAT_ENC(pcm_mulaw,AV_CODEC_ID_PCM_MULAW,NULL) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c9baf859ac..4d04787b2d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -483,14 +483,17 @@ typedef struct RcOverride{ * choice for probing. */ #define AV_CODEC_CAP_AVOID_PROBING (1 << 17) + +#if FF_API_UNUSED_CODEC_CAPS /** - * Codec is intra only. + * Deprecated and unused. Use AVCodecDescriptor.props instead */ #define AV_CODEC_CAP_INTRA_ONLY 0x4000 /** - * Codec is lossless. + * Deprecated and unused. Use AVCodecDescriptor.props instead */ #define AV_CODEC_CAP_LOSSLESS 0x8000 +#endif /** * Codec is backed by a hardware implementation. Typically used to diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c index b219906706..2091309e7e 100644 --- a/libavcodec/avuienc.c +++ b/libavcodec/avuienc.c @@ -98,6 +98,6 @@ AVCodec ff_avui_encoder = { .id = AV_CODEC_ID_AVUI, .init = avui_encode_init, .encode2 = avui_encode_frame, -.capabilities = AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_INTRA_ONLY, +.capabilities = AV_CODEC_CAP_EXPERIMENTAL, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE }, }; diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 32ac90f751..fad8400c21 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -1396,7 +1396,7 @@ AVCodec ff_dnxhd_encoder = { .init = dnxhd_encode_init, .encode2= dnxhd_encode_picture, .close = dnxhd_encode_end, -.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY, +.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV422P, diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index dca57feb4f..3e98d1b38c 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -1220,7 +1220,7 @@ AVCodec ff_dvvideo_encoder = { .priv_data_size = sizeof(DVV
[FFmpeg-cvslog] fftools/ffmpeg_filter: check the codec's descriptor to see if it's lossless
ffmpeg | branch: master | James Almer | Mon May 18 12:38:35 2020 -0300| [0a3ba58b444fb8bcc53a532cf2524a3088a6ce0a] | committer: James Almer fftools/ffmpeg_filter: check the codec's descriptor to see if it's lossless Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a3ba58b444fb8bcc53a532cf2524a3088a6ce0a --- fftools/ffmpeg_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 8b5b157be7..422e1268e9 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -99,7 +99,8 @@ void choose_sample_fmt(AVStream *st, AVCodec *codec) break; } if (*p == -1) { -if((codec->capabilities & AV_CODEC_CAP_LOSSLESS) && av_get_sample_fmt_name(st->codecpar->format) > av_get_sample_fmt_name(codec->sample_fmts[0])) +const AVCodecDescriptor *desc = avcodec_descriptor_get(codec->id); +if(desc && (desc->props & AV_CODEC_PROP_LOSSLESS) && av_get_sample_fmt_name(st->codecpar->format) > av_get_sample_fmt_name(codec->sample_fmts[0])) av_log(NULL, AV_LOG_ERROR, "Conversion will not be lossless.\n"); if(av_get_sample_fmt_name(st->codecpar->format)) av_log(NULL, AV_LOG_WARNING, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] Tag n4.2.3 : FFmpeg 4.2.3 release
[ffmpeg] [branch: refs/tags/n4.2.3] Tag:fbb22323bb550cbe1701e5d30efa045d954efc86 > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=fbb22323bb550cbe1701e5d30efa045d954efc86 Tagger: Michael Niedermayer Date: Thu May 21 19:04:26 2020 +0200 FFmpeg 4.2.3 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 43521b3 web/download: Add FFmpeg 4.2.3
The branch, master has been updated via 43521b3efbb4d40326ff3f3bd8b4b7ac76fd0aeb (commit) from 53355ec1bd7b626700d75ddf700e024d945c33a2 (commit) - Log - commit 43521b3efbb4d40326ff3f3bd8b4b7ac76fd0aeb Author: Michael Niedermayer AuthorDate: Thu May 21 19:14:42 2020 +0200 Commit: Michael Niedermayer CommitDate: Thu May 21 19:14:42 2020 +0200 web/download: Add FFmpeg 4.2.3 diff --git a/src/download b/src/download index 96ebd3f..69b7f0e 100644 --- a/src/download +++ b/src/download @@ -1,10 +1,10 @@ -https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2"; class="btn btn-success"> +https://ffmpeg.org/releases/ffmpeg-4.2.3.tar.bz2"; class="btn btn-success"> Download Source Code - ffmpeg-4.2.2.tar.bz2 + ffmpeg-4.2.3.tar.bz2 More releases @@ -265,10 +265,10 @@ and much faster bug fixes such as additional features and security patches. - FFmpeg 4.2.2 "Ada" + FFmpeg 4.2.3 "Ada" -4.2.2 was released on 2019-12-31. It is the latest stable FFmpeg release +4.2.3 was released on 2020-05-21. It is the latest stable FFmpeg release from the 4.2 release branch, which was cut from master on 2019-07-21. It includes the following library versions: @@ -285,19 +285,19 @@ libpostproc55. 5.100 - Download xz tarball - PGP signature + Download xz tarball + PGP signature - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog/n4.2.2";>Changelog + https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog/n4.2.3";>Changelog https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/4.2:/RELEASE_NOTES";>Release Notes --- Summary of changes: src/download | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/http: increase BUFFER_SIZE to MAX_URL_SIZE + HTTP_HEADERS_SIZE
ffmpeg | branch: master | Joey Smith | Sun May 10 23:05:51 2020 -0600| [d29c42974487d5fa0a5c1b05a09da5c5818ab63e] | committer: Marton Balint avformat/http: increase BUFFER_SIZE to MAX_URL_SIZE + HTTP_HEADERS_SIZE Some real-world sites use an authorization header with a bearer token; when combined with lengthy request parameters to identify the video segment, it's rather trivial these days to have a request body of more than 4k bytes. MAX_URL_SIZE is hard-coded to 4k bytes in libavformat/internal.h, and HTTP_HEADERS_SIZE is 4k as well in libavformat/http.h, so this patch increases the buffer size to 8k, as that is the default request body limit in Apache, and most other httpds seem to support at least as much, if not more. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d29c42974487d5fa0a5c1b05a09da5c5818ab63e --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index 20545ed1f8..6c39da1a8b 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -46,7 +46,7 @@ /* The IO buffer size is unrelated to the max URL size in itself, but needs * to be large enough to fit the full request headers (including long * path names). */ -#define BUFFER_SIZE MAX_URL_SIZE +#define BUFFER_SIZE (MAX_URL_SIZE + HTTP_HEADERS_SIZE) #define MAX_REDIRECTS 8 #define HTTP_SINGLE 1 #define HTTP_MUTLI2 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/matroskaenc: Don't use stream side-data size
ffmpeg | branch: master | Andreas Rheinhardt | Thu May 21 23:10:51 2020 +0200| [68dd1e6a57c8645656278b70f870a85e3789ec27] | committer: Andreas Rheinhardt avformat/matroskaenc: Don't use stream side-data size av_stream_get_side_data() tells the caller whether a stream has side data of a specific type; if present it can also tell the caller the size of the side data via an optional argument. The Matroska muxer always used this optional argument, although it doesn't really need the size, as the relevant side-data are not buffers, but structures. So change this. Furthermore, relying on the size also made the code susceptible to a quirk of av_stream_get_side_data(): It only sets the size argument if it found side data of the desired type. mkv_write_video_color() checks for side-data twice with the same variable for the size without resetting the size in between; if the second type of side-data isn't present, the size will still be what it was after the first call. This was not dangerous in practice, as the check for the existence of the second side-data compared the size with the expected size, so it would only be problematic if lots of elements were to be added to AVContentLightMetadata. Reviewed-by: James Almer Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68dd1e6a57c8645656278b70f870a85e3789ec27 --- libavformat/matroskaenc.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index fccfee539a..f5968c17b4 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -835,7 +835,6 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, * plus another byte to stay clear of the end. */ uint8_t colour[(2 + 1 + 8) * 18 + (2 + 1) + 1]; AVIOContext buf, *dyn_cp = &buf; -int side_data_size = 0; int colorinfo_size; const uint8_t *side_data; @@ -868,8 +867,8 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, } side_data = av_stream_get_side_data(st, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, -&side_data_size); -if (side_data_size) { +NULL); +if (side_data) { const AVContentLightMetadata *metadata = (const AVContentLightMetadata*)side_data; put_ebml_uint(dyn_cp, MATROSKA_ID_VIDEOCOLORMAXCLL, metadata->MaxCLL); @@ -877,8 +876,8 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, } side_data = av_stream_get_side_data(st, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, -&side_data_size); -if (side_data_size == sizeof(AVMasteringDisplayMetadata)) { +NULL); +if (side_data) { ebml_master meta_element = start_ebml_master( dyn_cp, MATROSKA_ID_VIDEOCOLORMASTERINGMETA, 10 * (2 + 1 + 8)); const AVMasteringDisplayMetadata *metadata = @@ -919,14 +918,13 @@ static void mkv_write_video_projection(AVFormatContext *s, AVIOContext *pb, const AVStream *st) { ebml_master projection; -int side_data_size = 0; uint8_t private[20]; const AVSphericalMapping *spherical = (const AVSphericalMapping *)av_stream_get_side_data(st, AV_PKT_DATA_SPHERICAL, -&side_data_size); +NULL); -if (!side_data_size) +if (!spherical) return; if (spherical->projection != AV_SPHERICAL_EQUIRECTANGULAR && @@ -1028,7 +1026,6 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb, const AVDictionaryEntry *tag; MatroskaVideoStereoModeType format = MATROSKA_VIDEO_STEREOMODE_TYPE_NB; const AVStereo3D *stereo; -int side_data_size = 0; *h_width = 1; *h_height = 1; @@ -1052,8 +1049,8 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb, } stereo = (const AVStereo3D*)av_stream_get_side_data(st, AV_PKT_DATA_STEREO3D, -&side_data_size); -if (side_data_size >= sizeof(AVStereo3D)) { +NULL); +if (stereo) { switch (stereo->type) { case AV_STEREO3D_2D: format = MATROSKA_VIDEO_STEREOMODE_TYPE_MONO; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/utils: Set stream side-data size even without side-data
ffmpeg | branch: master | Andreas Rheinhardt | Fri May 22 00:08:00 2020 +0200| [38490cbeb3a48dd488f10a72efc8d8e3f8883ac4] | committer: Andreas Rheinhardt avformat/utils: Set stream side-data size even without side-data Reviewed-by: James Almer Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38490cbeb3a48dd488f10a72efc8d8e3f8883ac4 --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index e6158d8058..b12aff5eb0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5507,6 +5507,8 @@ uint8_t *av_stream_get_side_data(const AVStream *st, return st->side_data[i].data; } } +if (size) +*size = 0; return NULL; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/matroskaenc: Remove pointless casts
ffmpeg | branch: master | Andreas Rheinhardt | Thu May 21 23:57:19 2020 +0200| [72baae1395deefa64e06b6c1a88de04082695a57] | committer: Andreas Rheinhardt avformat/matroskaenc: Remove pointless casts by using a const void * pointer as an intermediate. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72baae1395deefa64e06b6c1a88de04082695a57 --- libavformat/matroskaenc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index f5968c17b4..9ad590cb93 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -836,7 +836,7 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, uint8_t colour[(2 + 1 + 8) * 18 + (2 + 1) + 1]; AVIOContext buf, *dyn_cp = &buf; int colorinfo_size; -const uint8_t *side_data; +const void *side_data; ffio_init_context(dyn_cp, colour, sizeof(colour), 1, NULL, NULL, NULL, NULL); @@ -869,8 +869,7 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, side_data = av_stream_get_side_data(st, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, NULL); if (side_data) { -const AVContentLightMetadata *metadata = -(const AVContentLightMetadata*)side_data; +const AVContentLightMetadata *metadata = side_data; put_ebml_uint(dyn_cp, MATROSKA_ID_VIDEOCOLORMAXCLL, metadata->MaxCLL); put_ebml_uint(dyn_cp, MATROSKA_ID_VIDEOCOLORMAXFALL, metadata->MaxFALL); } @@ -880,8 +879,7 @@ static void mkv_write_video_color(AVIOContext *pb, const AVStream *st, if (side_data) { ebml_master meta_element = start_ebml_master( dyn_cp, MATROSKA_ID_VIDEOCOLORMASTERINGMETA, 10 * (2 + 1 + 8)); -const AVMasteringDisplayMetadata *metadata = -(const AVMasteringDisplayMetadata*)side_data; +const AVMasteringDisplayMetadata *metadata = side_data; if (metadata->has_primaries) { put_ebml_float(dyn_cp, MATROSKA_ID_VIDEOCOLOR_RX, av_q2d(metadata->display_primaries[0][0])); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".