[FFmpeg-cvslog] doc/general: update avisynth docs with a way to install just the headers using CMake
ffmpeg | branch: master | Stephen Hutchinson | Sun Apr 5 11:37:43 2020 +0200| [7b0f7a7f3b6bf09c076c23d0701bf42a2c997ca2] | committer: Marton Balint doc/general: update avisynth docs with a way to install just the headers using CMake Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b0f7a7f3b6bf09c076c23d0701bf42a2c997ca2 --- doc/general.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index a7c4b22461..4adcc9e742 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -52,8 +52,9 @@ This driver can be installed using amdgpu-pro-install script in official amd dri FFmpeg can read AviSynth scripts as input. To enable support, pass @code{--enable-avisynth} to configure after installing the headers provided by @url{https://github.com/AviSynth/AviSynthPlus, AviSynth+}. -AviSynth+ supplies a @code{GNUmakefile} to install only the headers, -as CMake does not make header-only installs an easy task. +AviSynth+ can be configured to install only the headers by either +passing @code{-DHEADERS_ONLY:bool=on} to the normal CMake-based build +system, or by using the supplied @code{GNUmakefile}. For Windows, supported AviSynth variants are @url{http://avisynth.nl, AviSynth 2.6 RC1 or higher} for 32-bit builds and ___ 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] Revert "avformat/rtp: Pass sources and block filter addresses via sdp file for rtp"
ffmpeg | branch: master | Carl Eugen Hoyos | Sun Apr 5 11:58:02 2020 +0200| [8b1f07ef518a0ad9cc6a456bc62869c76fa3461f] | committer: Carl Eugen Hoyos Revert "avformat/rtp: Pass sources and block filter addresses via sdp file for rtp" This reverts commit b71685865fe761925feedda3cd0b288224d9a509. The commit lead to the use of an uninitialized variable. Other issues were listed by Andreas Rheinhardt: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/259150.html > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b1f07ef518a0ad9cc6a456bc62869c76fa3461f --- libavformat/rtsp.c | 49 + 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index a69484d78b..cd6fc32a29 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2447,8 +2447,8 @@ static int rtp_probe(const AVProbeData *p) static int rtp_read_header(AVFormatContext *s) { uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; -char host[500], sdp[1000], filters_buf[1000]; -int ret, port, sdp_length, nc; +char host[500], sdp[500]; +int ret, port; URLContext* in = NULL; int payload_type; AVCodecParameters *par = NULL; @@ -2456,7 +2456,6 @@ static int rtp_read_header(AVFormatContext *s) AVIOContext pb; socklen_t addrlen = sizeof(addr); RTSPState *rt = s->priv_data; -const char *p; if (!ff_network_init()) return AVERROR(EIO); @@ -2514,40 +2513,13 @@ static int rtp_read_header(AVFormatContext *s) av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0, s->url); -sdp_length = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "v=0\r\nc=IN IP%d %s\r\n", - addr.ss_family == AF_INET ? 4 : 6, host); - -p = strchr(s->url, '?'); -if (p) { -static const char *filters[][2] = {{"sources", "incl"}, {"block", "excl"}, {NULL, NULL}}; -int i; -char *q; -for (i = 0; filters[i][0]; i++) { -if (av_find_info_tag(filters_buf, sizeof(filters_buf), filters[i][0], p)) { -q = filters_buf; -while ((q = strchr(q, ',')) != NULL) -*q = ' '; -nc = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "a=source-filter:%s IN IP%d %s %s\r\n", - filters[i][1], - addr.ss_family == AF_INET ? 4 : 6, host, - filters_buf); -if (nc < 0 || nc + sdp_length >= sizeof(sdp)) -goto fail_nobuf; -sdp_length += nc; -} -} -} - -nc = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "m=%s %d RTP/AVP %d\r\n", - par->codec_type == AVMEDIA_TYPE_DATA ? "application" : - par->codec_type == AVMEDIA_TYPE_VIDEO ? "video" : "audio", - port, payload_type); -if (nc < 0 || nc + sdp_length >= sizeof(sdp)) -goto fail_nobuf; -sdp_length += nc; +snprintf(sdp, sizeof(sdp), + "v=0\r\nc=IN IP%d %s\r\nm=%s %d RTP/AVP %d\r\n", + addr.ss_family == AF_INET ? 4 : 6, host, + par->codec_type == AVMEDIA_TYPE_DATA ? "application" : + par->codec_type == AVMEDIA_TYPE_VIDEO ? "video" : "audio", + port, payload_type); +av_log(s, AV_LOG_VERBOSE, "SDP:\n%s\n", sdp); avcodec_parameters_free(&par); ffio_init_context(&pb, sdp, strlen(sdp), 0, NULL, NULL, NULL, NULL); @@ -2562,9 +2534,6 @@ static int rtp_read_header(AVFormatContext *s) s->pb = NULL; return ret; -fail_nobuf: -ret = AVERROR(ENOBUFS); -av_log(s, AV_LOG_ERROR, "rtp_read_header(): not enough buffer space for sdp-headers\n"); fail: avcodec_parameters_free(&par); if (in) ___ 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] Revert "avformat/rtp: Pass sources and block filter addresses via sdp file for rtp"
ffmpeg | branch: release/4.2 | Carl Eugen Hoyos | Sun Apr 5 11:58:02 2020 +0200| [d1e8be34114d5782a5a4ea79ef0b9e92b6b37bc7] | committer: Carl Eugen Hoyos Revert "avformat/rtp: Pass sources and block filter addresses via sdp file for rtp" This reverts commit b71685865fe761925feedda3cd0b288224d9a509. The commit lead to the use of an uninitialized variable. Other issues were listed by Andreas Rheinhardt: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/259150.html (cherry picked from commit 8b1f07ef518a0ad9cc6a456bc62869c76fa3461f) In addition, it is not understandable why the patch that neither claims to fix a regression nor a security issue was backported. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1e8be34114d5782a5a4ea79ef0b9e92b6b37bc7 --- libavformat/rtsp.c | 49 + 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 9c237d5bfd..859defa592 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2447,8 +2447,8 @@ static int rtp_probe(const AVProbeData *p) static int rtp_read_header(AVFormatContext *s) { uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; -char host[500], sdp[1000], filters_buf[1000]; -int ret, port, sdp_length, nc; +char host[500], sdp[500]; +int ret, port; URLContext* in = NULL; int payload_type; AVCodecParameters *par = NULL; @@ -2456,7 +2456,6 @@ static int rtp_read_header(AVFormatContext *s) AVIOContext pb; socklen_t addrlen = sizeof(addr); RTSPState *rt = s->priv_data; -const char *p; if (!ff_network_init()) return AVERROR(EIO); @@ -2514,40 +2513,13 @@ static int rtp_read_header(AVFormatContext *s) av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0, s->url); -sdp_length = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "v=0\r\nc=IN IP%d %s\r\n", - addr.ss_family == AF_INET ? 4 : 6, host); - -p = strchr(s->url, '?'); -if (p) { -static const char *filters[][2] = {{"sources", "incl"}, {"block", "excl"}, {NULL, NULL}}; -int i; -char *q; -for (i = 0; filters[i][0]; i++) { -if (av_find_info_tag(filters_buf, sizeof(filters_buf), filters[i][0], p)) { -q = filters_buf; -while ((q = strchr(q, ',')) != NULL) -*q = ' '; -nc = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "a=source-filter:%s IN IP%d %s %s\r\n", - filters[i][1], - addr.ss_family == AF_INET ? 4 : 6, host, - filters_buf); -if (nc < 0 || nc + sdp_length >= sizeof(sdp)) -goto fail_nobuf; -sdp_length += nc; -} -} -} - -nc = snprintf(sdp + sdp_length, sizeof(sdp) - sdp_length, - "m=%s %d RTP/AVP %d\r\n", - par->codec_type == AVMEDIA_TYPE_DATA ? "application" : - par->codec_type == AVMEDIA_TYPE_VIDEO ? "video" : "audio", - port, payload_type); -if (nc < 0 || nc + sdp_length >= sizeof(sdp)) -goto fail_nobuf; -sdp_length += nc; +snprintf(sdp, sizeof(sdp), + "v=0\r\nc=IN IP%d %s\r\nm=%s %d RTP/AVP %d\r\n", + addr.ss_family == AF_INET ? 4 : 6, host, + par->codec_type == AVMEDIA_TYPE_DATA ? "application" : + par->codec_type == AVMEDIA_TYPE_VIDEO ? "video" : "audio", + port, payload_type); +av_log(s, AV_LOG_VERBOSE, "SDP:\n%s\n", sdp); avcodec_parameters_free(&par); ffio_init_context(&pb, sdp, strlen(sdp), 0, NULL, NULL, NULL, NULL); @@ -2562,9 +2534,6 @@ static int rtp_read_header(AVFormatContext *s) s->pb = NULL; return ret; -fail_nobuf: -ret = AVERROR(ENOBUFS); -av_log(s, AV_LOG_ERROR, "rtp_read_header(): not enough buffer space for sdp-headers\n"); fail: avcodec_parameters_free(&par); if (in) ___ 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] lavc/amrwbdec: Use av_samples_set_silence().
ffmpeg | branch: master | Carl Eugen Hoyos | Sun Apr 5 17:04:44 2020 +0200| [559c2e96e371f30eedccf370d4606fc86706ab75] | committer: Carl Eugen Hoyos lavc/amrwbdec: Use av_samples_set_silence(). Suggested-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=559c2e96e371f30eedccf370d4606fc86706ab75 --- libavcodec/amrwbdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index b488a5d3c7..5943bfc84e 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1122,8 +1122,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; if (ctx->fr_cur_mode == NO_DATA) { -for (i = 0; i < frame->nb_samples; i++) -buf_out[i] = 0.f; +av_samples_set_silence(&frame->data[0], 0, frame->nb_samples, 1, AV_SAMPLE_FMT_FLT); *got_frame_ptr = 1; return expected_fr_size; } ___ 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/avidec: Don't reimplement ff_free_stream()
ffmpeg | branch: master | Andreas Rheinhardt | Fri Mar 27 04:42:15 2020 +0100| [7940655d14e1741d68c364a8d027152f4f3420eb] | committer: Andreas Rheinhardt avformat/avidec: Don't reimplement ff_free_stream() Using ff_free_stream() makes the code more readable, more future-proof (the old code freed AVCodecContexts and AVCodecParameters and its substructures manually, so that there is a chance that there would be a memleak for some time if new substructures were added) and reduces code size. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7940655d14e1741d68c364a8d027152f4f3420eb --- libavformat/avidec.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 00c3978b2d..ae343e732a 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -600,21 +600,8 @@ static int avi_read_header(AVFormatContext *s) goto fail; ast = s->streams[0]->priv_data; -av_freep(&s->streams[0]->codecpar->extradata); -av_freep(&s->streams[0]->codecpar); -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS -av_freep(&s->streams[0]->codec); -FF_ENABLE_DEPRECATION_WARNINGS -#endif -if (s->streams[0]->info) -av_freep(&s->streams[0]->info->duration_error); -av_freep(&s->streams[0]->info); -if (s->streams[0]->internal) -av_freep(&s->streams[0]->internal->avctx); -av_freep(&s->streams[0]->internal); -av_freep(&s->streams[0]); -s->nb_streams = 0; +st->priv_data = NULL; +ff_free_stream(s, st); if (CONFIG_DV_DEMUXER) { avi->dv_demux = avpriv_dv_init_demux(s); if (!avi->dv_demux) ___ 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/avidec: Fix memleak when DV demuxer is disabled
ffmpeg | branch: master | Andreas Rheinhardt | Fri Mar 27 05:21:32 2020 +0100| [2084ea8c1dde97230a270155fc530b945edbf1cf] | committer: Andreas Rheinhardt avformat/avidec: Fix memleak when DV demuxer is disabled If one uses a build without dv demuxer, an AVIStream struct that is destined to be used as private data for an AVStream by the avi demuxer would leak, because it has been moved from the AVStream (that is going to be freed) and only stored in a local variable (in order to be used for another AVStream), but if the dv demuxer is disabled, the earlier code returned immediately instead. Also return a better error code in this scenario (instead of AVERROR_INVALIDDATA). Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2084ea8c1dde97230a270155fc530b945edbf1cf --- libavformat/avidec.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index ae343e732a..18402f0032 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -599,15 +599,16 @@ static int avi_read_header(AVFormatContext *s) handler != MKTAG('d', 'v', 's', 'l')) goto fail; +if (!CONFIG_DV_DEMUXER) +return AVERROR_DEMUXER_NOT_FOUND; + ast = s->streams[0]->priv_data; st->priv_data = NULL; ff_free_stream(s, st); -if (CONFIG_DV_DEMUXER) { avi->dv_demux = avpriv_dv_init_demux(s); if (!avi->dv_demux) goto fail; -} else -goto fail; + s->streams[0]->priv_data = ast; avio_skip(pb, 3 * 4); ast->scale = avio_rl32(pb); ___ 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/avidec: Fix memleak when allocating DVDemuxContext fails
ffmpeg | branch: master | Andreas Rheinhardt | Fri Mar 27 05:31:13 2020 +0100| [de0b04551da4e1470ce1c99321a768887df8c650] | committer: Andreas Rheinhardt avformat/avidec: Fix memleak when allocating DVDemuxContext fails An AVIStream (intended to be used as private data for an AVStream) would leak in this scenario. Also return a more fitting error code instead of AVERROR_INVALIDDATA. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de0b04551da4e1470ce1c99321a768887df8c650 --- libavformat/avidec.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 18402f0032..87298513c2 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -605,9 +605,12 @@ static int avi_read_header(AVFormatContext *s) ast = s->streams[0]->priv_data; st->priv_data = NULL; ff_free_stream(s, st); -avi->dv_demux = avpriv_dv_init_demux(s); -if (!avi->dv_demux) -goto fail; + +avi->dv_demux = avpriv_dv_init_demux(s); +if (!avi->dv_demux) { +av_free(ast); +return AVERROR(ENOMEM); +} s->streams[0]->priv_data = ast; avio_skip(pb, 3 * 4); ___ 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/avidec: Fix memleak with embedded GAB2 subtitles
ffmpeg | branch: master | Andreas Rheinhardt | Fri Mar 27 08:31:29 2020 +0100| [da44bbefaabeb2fdb58a03fe533a44aa150486fc] | committer: Andreas Rheinhardt avformat/avidec: Fix memleak with embedded GAB2 subtitles The code for GAB2 subtitles predates refcounting AVPackets. So in order to transfer the ownership of a packet's data pkt->data was simply stored and the packet zeroed; in the end (i.e. in the read_close-function) this data was then simply freed with av_freep(). This of course leads to a leak of an AVBufferRef and an AVBuffer. It has been fixed by keeping and eventually unreferencing the packet's buf instead. Additionally, the packet is now reset via av_packet_unref(). Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da44bbefaabeb2fdb58a03fe533a44aa150486fc --- libavformat/avidec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 87298513c2..5fc3e01aa9 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -60,7 +60,7 @@ typedef struct AVIStream { AVFormatContext *sub_ctx; AVPacket sub_pkt; -uint8_t *sub_buffer; +AVBufferRef *sub_buffer; int64_t seek_pos; } AVIStream; @@ -1116,8 +1116,9 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt) time_base = ast->sub_ctx->streams[0]->time_base; avpriv_set_pts_info(st, 64, time_base.num, time_base.den); } -ast->sub_buffer = pkt->data; -memset(pkt, 0, sizeof(*pkt)); +ast->sub_buffer = pkt->buf; +pkt->buf = NULL; +av_packet_unref(pkt); return 1; error: @@ -1909,7 +1910,7 @@ static int avi_read_close(AVFormatContext *s) av_freep(&ast->sub_ctx->pb); avformat_close_input(&ast->sub_ctx); } -av_freep(&ast->sub_buffer); +av_buffer_unref(&ast->sub_buffer); av_packet_unref(&ast->sub_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] lavf/chromaprint: Silence compilation warnings
ffmpeg | branch: master | Carl Eugen Hoyos | Tue Aug 13 12:42:27 2019 +0200| [8defd0ca7b4ac6658e6beb9dcdc0183b2d3e53d8] | committer: Carl Eugen Hoyos lavf/chromaprint: Silence compilation warnings Fixes the following warnings: libavformat/chromaprint.c:117:42: warning: passing argument 2 of ‘chromaprint_feed’ from incompatible pointer type libavformat/chromaprint.c:132:52: warning: passing argument 2 of ‘chromaprint_get_raw_fingerprint’ from incompatible pointer type libavformat/chromaprint.c:143:71: warning: passing argument 4 of ‘chromaprint_encode_fingerprint’ from incompatible pointer type > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8defd0ca7b4ac6658e6beb9dcdc0183b2d3e53d8 --- libavformat/chromaprint.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index faa92ca0db..0cd7cdeb26 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -114,14 +114,15 @@ fail: static int write_packet(AVFormatContext *s, AVPacket *pkt) { ChromaprintMuxContext *cpr = s->priv_data; -return chromaprint_feed(cpr->ctx, pkt->data, pkt->size / 2) ? 0 : AVERROR(EINVAL); +return chromaprint_feed(cpr->ctx, (const int16_t *)pkt->data, pkt->size / 2) ? 0 : AVERROR(EINVAL); } static int write_trailer(AVFormatContext *s) { ChromaprintMuxContext *cpr = s->priv_data; AVIOContext *pb = s->pb; -void *fp = NULL, *enc_fp = NULL; +void *fp = NULL; +char *enc_fp = NULL; int size, enc_size, ret = AVERROR(EINVAL); if (!chromaprint_finish(cpr->ctx)) { @@ -129,7 +130,7 @@ static int write_trailer(AVFormatContext *s) goto fail; } -if (!chromaprint_get_raw_fingerprint(cpr->ctx, &fp, &size)) { +if (!chromaprint_get_raw_fingerprint(cpr->ctx, (uint32_t **)&fp, &size)) { av_log(s, AV_LOG_ERROR, "Failed to retrieve fingerprint\n"); goto fail; } ___ 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_h264_syntax_template: fix off by 1 error with slice_group_change_cycle
ffmpeg | branch: master | Michael Niedermayer | Sun Mar 22 16:38:24 2020 +0100| [741565a1e69c45ce4848f01e45be5e66a68efa2f] | committer: Michael Niedermayer avcodec/cbs_h264_syntax_template: fix off by 1 error with slice_group_change_cycle Fixes: assertion failure Fixes: 20390/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5683400772157440 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=741565a1e69c45ce4848f01e45be5e66a68efa2f --- libavcodec/cbs_h264_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c index 878d348b94..b65460996b 100644 --- a/libavcodec/cbs_h264_syntax_template.c +++ b/libavcodec/cbs_h264_syntax_template.c @@ -1366,7 +1366,7 @@ static int FUNC(slice_header)(CodedBitstreamContext *ctx, RWContext *rw, (sps->pic_height_in_map_units_minus1 + 1); max = (pic_size + pps->slice_group_change_rate_minus1) / (pps->slice_group_change_rate_minus1 + 1); -bits = av_log2(2 * max - 1); +bits = av_ceil_log2(max + 1); u(bits, slice_group_change_cycle, 0, max); } ___ 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".