[FFmpeg-cvslog] avformat/dashdec: compute the segment size use current pos minus offset plus one
ffmpeg | branch: master | Steven Liu | Wed May 6 14:51:22 2020 +0800| [3523df947a64c3a102960c753e81d9d04166e6e5] | committer: Steven Liu avformat/dashdec: compute the segment size use current pos minus offset plus one because the offset should use one byte Reviewed-by: Zhao Jun Reported-by: Zhao Jun Signed-off-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3523df947a64c3a102960c753e81d9d04166e6e5 --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index bde4b0846d..ec2aadcee3 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -592,7 +592,7 @@ static struct fragment * get_Fragment(char *range) char *str_end_offset; char *str_offset = av_strtok(range, "-", &str_end_offset); seg->url_offset = strtoll(str_offset, NULL, 10); -seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset; +seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset + 1; } return seg; ___ 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/profiles: remove duplicate FF_PROFILE_RESERVED entry
ffmpeg | branch: master | Limin Wang | Tue May 5 22:43:10 2020 +0800| [a8d7393804ca9fe62f368071ef31c37da3e7d1d5] | committer: Limin Wang avcodec/profiles: remove duplicate FF_PROFILE_RESERVED entry Reviewed-by: Anton Khirnov Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8d7393804ca9fe62f368071ef31c37da3e7d1d5 --- libavcodec/profiles.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c index eaf0d68d32..e59a3a5c12 100644 --- a/libavcodec/profiles.c +++ b/libavcodec/profiles.c @@ -99,7 +99,6 @@ const AVProfile ff_mpeg2_video_profiles[] = { { FF_PROFILE_MPEG2_MAIN, "Main" }, { FF_PROFILE_MPEG2_SIMPLE, "Simple" }, { FF_PROFILE_RESERVED, "Reserved" }, -{ FF_PROFILE_RESERVED, "Reserved" }, { FF_PROFILE_UNKNOWN }, }; ___ 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/hlsenc: Remove redundant setting of output format
ffmpeg | branch: master | Andreas Rheinhardt | Sat Feb 29 02:21:34 2020 +0100| [1ec0fb56a7640f740409110536aee97c0679c35c] | committer: Andreas Rheinhardt avformat/hlsenc: Remove redundant setting of output format avformat_alloc_output_context2() already sets the oformat member, so that there is no reason to overwrite it again with the value it already has. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ec0fb56a7640f740409110536aee97c0679c35c --- libavformat/hlsenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 5695c6cc95..11b5c481b0 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -793,7 +793,6 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) if (!oc->url) return AVERROR(ENOMEM); -oc->oformat = vs->oformat; oc->interrupt_callback = s->interrupt_callback; oc->max_delay= s->max_delay; oc->opaque = s->opaque; @@ -807,7 +806,6 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) if (ret < 0) return ret; vtt_oc = vs->vtt_avf; -vtt_oc->oformat = vs->vtt_oformat; av_dict_copy(&vtt_oc->metadata, s->metadata, 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".
[FFmpeg-cvslog] avformat: implement retiming directly in mxfenc and gxfenc
ffmpeg | branch: master | Marton Balint | Tue Apr 28 00:39:40 2020 +0200| [8360fd26105f58fbec9fb8edeaa5755160c9994f] | committer: Marton Balint avformat: implement retiming directly in mxfenc and gxfenc Generic retime functionality is replaced by a few lines of code directly in the muxers which used it, which seems a lot easier to understand and this way the retiming is not dependant of the input durations. Also remove retimeinterleave, since it is not used by anything anymore. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8360fd26105f58fbec9fb8edeaa5755160c9994f --- libavformat/Makefile | 4 ++-- libavformat/gxfenc.c | 21 +++-- libavformat/mxfenc.c | 14 +++- libavformat/retimeinterleave.c | 51 -- libavformat/retimeinterleave.h | 51 -- 5 files changed, 25 insertions(+), 116 deletions(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index ec01c6c65c..5fa24cef16 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -205,7 +205,7 @@ OBJS-$(CONFIG_GIF_DEMUXER) += gifdec.o OBJS-$(CONFIG_GSM_DEMUXER) += gsmdec.o OBJS-$(CONFIG_GSM_MUXER) += rawenc.o OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o -OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o retimeinterleave.o +OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o OBJS-$(CONFIG_G722_DEMUXER) += g722.o rawdec.o OBJS-$(CONFIG_G722_MUXER)+= rawenc.o OBJS-$(CONFIG_G723_1_DEMUXER)+= g723_1.o @@ -347,7 +347,7 @@ OBJS-$(CONFIG_MUSX_DEMUXER) += musx.o OBJS-$(CONFIG_MV_DEMUXER)+= mvdec.o OBJS-$(CONFIG_MVI_DEMUXER) += mvi.o OBJS-$(CONFIG_MXF_DEMUXER) += mxfdec.o mxf.o -OBJS-$(CONFIG_MXF_MUXER) += mxfenc.o mxf.o retimeinterleave.o avc.o +OBJS-$(CONFIG_MXF_MUXER) += mxfenc.o mxf.o avc.o OBJS-$(CONFIG_MXG_DEMUXER) += mxg.o OBJS-$(CONFIG_NC_DEMUXER)+= ncdec.o OBJS-$(CONFIG_NISTSPHERE_DEMUXER)+= nistspheredec.o pcm.o diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 60468c36ce..6d4df894f6 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -27,7 +27,6 @@ #include "avformat.h" #include "internal.h" #include "gxf.h" -#include "retimeinterleave.h" #define GXF_SAMPLES_PER_FRAME 32768 #define GXF_AUDIO_PACKET_SIZE 65536 @@ -45,7 +44,7 @@ typedef struct GXFTimecode{ } GXFTimecode; typedef struct GXFStreamContext { -RetimeInterleaveContext aic; +int64_t pkt_cnt; uint32_t track_type; uint32_t sample_size; uint32_t sample_rate; @@ -815,7 +814,6 @@ static int gxf_write_header(AVFormatContext *s) return -1; } } -ff_retime_interleave_init(&sc->aic, st->time_base); /* FIXME first 10 audio tracks are 0 to 9 next 22 are A to V */ sc->media_info = media_info<<8 | ('0'+tracks[media_info]++); sc->order = s->nb_streams - st->index; @@ -1012,10 +1010,19 @@ static int gxf_compare_field_nb(AVFormatContext *s, const AVPacket *next, static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) { -if (pkt && s->streams[pkt->stream_index]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) -pkt->duration = 2; // enforce 2 fields -return ff_retime_interleave(s, out, pkt, flush, -ff_interleave_packet_per_dts, gxf_compare_field_nb); +int ret; +if (pkt) { +AVStream *st = s->streams[pkt->stream_index]; +GXFStreamContext *sc = st->priv_data; +if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) +pkt->pts = pkt->dts = sc->pkt_cnt * 2; // enforce 2 fields +else +pkt->pts = pkt->dts = sc->pkt_cnt * GXF_SAMPLES_PER_FRAME; +sc->pkt_cnt++; +if ((ret = ff_interleave_add_packet(s, pkt, gxf_compare_field_nb)) < 0) +return ret; +} +return ff_interleave_packet_per_dts(s, out, NULL, flush); } AVOutputFormat ff_gxf_muxer = { diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 63a2799b08..c3b6809e98 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -52,7 +52,6 @@ #include "libavcodec/h264_ps.h" #include "libavcodec/golomb.h" #include "libavcodec/internal.h" -#include "retimeinterleave.h" #include "avformat.h" #include "avio_internal.h" #include "internal.h" @@ -79,7 +78,7 @@ typedef struct MXFIndexEntry { } MXFIndexEntry; typedef struct MXFStreamContext { -RetimeInterleaveContext aic; +int64_t pkt_cnt; ///< pkt counter for muxed packets UID track_essence_element_key; int index; ///< index in mxf_essence_container_uls table const UID *codec_ul; @@ -2598,7 +2597,6 @@ static int mxf_write_header(AVFo
[FFmpeg-cvslog] avformat/mux: move interleaved packet functions upwards
ffmpeg | branch: master | Marton Balint | Mon Apr 27 21:07:07 2020 +0200| [7a8a5c200bd4a3960e3524d14697656c3696beea] | committer: Marton Balint avformat/mux: move interleaved packet functions upwards Will be needed later to avoid a forward declaration. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a8a5c200bd4a3960e3524d14697656c3696beea --- libavformat/mux.c | 208 +++--- 1 file changed, 104 insertions(+), 104 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index d9bf5d35ea..4c632a8dfe 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -814,110 +814,6 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) { -AVStream *st = s->streams[pkt->stream_index]; -int ret; - -if (!(s->flags & AVFMT_FLAG_AUTO_BSF)) -return 1; - -if (s->oformat->check_bitstream) { -if (!st->internal->bitstream_checked) { -if ((ret = s->oformat->check_bitstream(s, pkt)) < 0) -return ret; -else if (ret == 1) -st->internal->bitstream_checked = 1; -} -} - -if (st->internal->bsfc) { -AVBSFContext *ctx = st->internal->bsfc; -// TODO: when any bitstream filter requires flushing at EOF, we'll need to -// flush each stream's BSF chain on write_trailer. -if ((ret = av_bsf_send_packet(ctx, pkt)) < 0) { -av_log(ctx, AV_LOG_ERROR, -"Failed to send packet to filter %s for stream %d\n", -ctx->filter->name, pkt->stream_index); -return ret; -} -// TODO: when any automatically-added bitstream filter is generating multiple -// output packets for a single input one, we'll need to call this in a loop -// and write each output packet. -if ((ret = av_bsf_receive_packet(ctx, pkt)) < 0) { -if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) -return 0; -av_log(ctx, AV_LOG_ERROR, -"Failed to receive packet from filter %s for stream %d\n", -ctx->filter->name, pkt->stream_index); -if (s->error_recognition & AV_EF_EXPLODE) -return ret; -return 0; -} -} -return 1; -} - -int av_write_frame(AVFormatContext *s, AVPacket *in) -{ -AVPacket local_pkt, *pkt = &local_pkt; -int ret; - -if (!in) { -if (s->oformat->flags & AVFMT_ALLOW_FLUSH) { -ret = s->oformat->write_packet(s, NULL); -flush_if_needed(s); -if (ret >= 0 && s->pb && s->pb->error < 0) -ret = s->pb->error; -return ret; -} -return 1; -} - -if (in->flags & AV_PKT_FLAG_UNCODED_FRAME) { -pkt = in; -} else { -/* We don't own in, so we have to make sure not to modify it. - * The following avoids copying in's data unnecessarily. - * Copying side data is unavoidable as a bitstream filter - * may change it, e.g. free it on errors. */ -pkt->buf = NULL; -pkt->data = in->data; -pkt->size = in->size; -ret = av_packet_copy_props(pkt, in); -if (ret < 0) -return ret; -if (in->buf) { -pkt->buf = av_buffer_ref(in->buf); -if (!pkt->buf) { -ret = AVERROR(ENOMEM); -goto fail; -} -} -} - -ret = prepare_input_packet(s, pkt); -if (ret < 0) -goto fail; - -ret = do_packet_auto_bsf(s, pkt); -if (ret <= 0) -goto fail; - -#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX -ret = compute_muxer_pkt_fields(s, s->streams[pkt->stream_index], pkt); - -if (ret < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) -goto fail; -#endif - -ret = write_packet(s, pkt); - -fail: -// Uncoded frames using the noninterleaved codepath are also freed here -av_packet_unref(pkt); -return ret; -} - #define CHUNK_START 0x1000 int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, @@ -1186,6 +1082,110 @@ static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, in return ff_interleave_packet_per_dts(s, out, in, flush); } +static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) { +AVStream *st = s->streams[pkt->stream_index]; +int ret; + +if (!(s->flags & AVFMT_FLAG_AUTO_BSF)) +return 1; + +if (s->oformat->check_bitstream) { +if (!st->internal->bitstream_checked) { +if ((ret = s->oformat->check_bitstream(s, pkt)) < 0) +return ret; +else if (ret == 1) +st->internal->bitstream_checked = 1; +} +} + +if (st->internal->bsfc) { +AVBSFContext *ctx = st->internal->bsfc;
[FFmpeg-cvslog] avformat/mux: factorize interleaved write_packet
ffmpeg | branch: master | Marton Balint | Fri Mar 27 00:00:53 2020 +0100| [c31ba86c37d6caeed6983343b22e8dbc99dce3cf] | committer: Marton Balint avformat/mux: factorize interleaved write_packet Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c31ba86c37d6caeed6983343b22e8dbc99dce3cf --- libavformat/mux.c | 52 +--- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index 4c632a8dfe..4c282a489d 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1125,6 +1125,25 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) { return 1; } +static int interleaved_write_packet(AVFormatContext *s, AVPacket *pkt, int flush) +{ +for (;; ) { +AVPacket opkt; +int ret = interleave_packet(s, &opkt, pkt, flush); +if (ret <= 0) +return ret; + +pkt = NULL; + +ret = write_packet(s, &opkt); + +av_packet_unref(&opkt); + +if (ret < 0) +return ret; +} +} + int av_write_frame(AVFormatContext *s, AVPacket *in) { AVPacket local_pkt, *pkt = &local_pkt; @@ -1220,22 +1239,8 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame FLUSH\n"); flush = 1; } +return interleaved_write_packet(s, pkt, flush); -for (;; ) { -AVPacket opkt; -int ret = interleave_packet(s, &opkt, pkt, flush); -if (ret <= 0) -return ret; - -pkt = NULL; - -ret = write_packet(s, &opkt); - -av_packet_unref(&opkt); - -if (ret < 0) -return ret; -} fail: av_packet_unref(pkt); return ret; @@ -1245,23 +1250,8 @@ int av_write_trailer(AVFormatContext *s) { int ret, i; -for (;; ) { -AVPacket pkt; -ret = interleave_packet(s, &pkt, NULL, 1); -if (ret < 0) -goto fail; -if (!ret) -break; - -ret = write_packet(s, &pkt); - -av_packet_unref(&pkt); +ret = interleaved_write_packet(s, NULL, 1); -if (ret < 0) -goto fail; -} - -fail: if (s->oformat->write_trailer) { if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb) avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_TRAILER); ___ 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/audiointerleave: only keep the retime functionality of the audio interleaver
ffmpeg | branch: master | Marton Balint | Wed Mar 25 23:49:17 2020 +0100| [c5324d92c5f206dcdc2cf93ae237eaa7c1ad0a40] | committer: Marton Balint avformat/audiointerleave: only keep the retime functionality of the audio interleaver And rename it to retimeinterleave, use the pcm_rechunk bitstream filter for rechunking. By seperating the two functions we hopefully get cleaner code. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5324d92c5f206dcdc2cf93ae237eaa7c1ad0a40 --- configure | 2 + libavformat/Makefile | 4 +- libavformat/audiointerleave.c | 148 - libavformat/gxfenc.c | 20 ++- libavformat/mxfenc.c | 19 +-- libavformat/retimeinterleave.c | 51 +++ .../{audiointerleave.h => retimeinterleave.h} | 31 ++--- 7 files changed, 87 insertions(+), 188 deletions(-) diff --git a/configure b/configure index 080d93a129..e7162dbc56 100755 --- a/configure +++ b/configure @@ -2722,6 +2722,7 @@ fraps_decoder_select="bswapdsp huffman" g2m_decoder_deps="zlib" g2m_decoder_select="blockdsp idctdsp jpegtables" g729_decoder_select="audiodsp" +gxf_encoder_select="pcm_rechunk_bsf" h261_decoder_select="mpegvideo" h261_encoder_select="mpegvideoenc" h263_decoder_select="h263_parser h263dsp mpegvideo qpeldsp" @@ -2794,6 +2795,7 @@ mv30_decoder_select="aandcttables blockdsp" mvha_decoder_deps="zlib" mvha_decoder_select="llviddsp" mwsc_decoder_deps="zlib" +mxf_encoder_select="pcm_rechunk_bsf" mxpeg_decoder_select="mjpeg_decoder" nellymoser_decoder_select="mdct sinewin" nellymoser_encoder_select="audio_frame_queue mdct sinewin" diff --git a/libavformat/Makefile b/libavformat/Makefile index b744eb69b2..ec01c6c65c 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -205,7 +205,7 @@ OBJS-$(CONFIG_GIF_DEMUXER) += gifdec.o OBJS-$(CONFIG_GSM_DEMUXER) += gsmdec.o OBJS-$(CONFIG_GSM_MUXER) += rawenc.o OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o -OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o audiointerleave.o +OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o retimeinterleave.o OBJS-$(CONFIG_G722_DEMUXER) += g722.o rawdec.o OBJS-$(CONFIG_G722_MUXER)+= rawenc.o OBJS-$(CONFIG_G723_1_DEMUXER)+= g723_1.o @@ -347,7 +347,7 @@ OBJS-$(CONFIG_MUSX_DEMUXER) += musx.o OBJS-$(CONFIG_MV_DEMUXER)+= mvdec.o OBJS-$(CONFIG_MVI_DEMUXER) += mvi.o OBJS-$(CONFIG_MXF_DEMUXER) += mxfdec.o mxf.o -OBJS-$(CONFIG_MXF_MUXER) += mxfenc.o mxf.o audiointerleave.o avc.o +OBJS-$(CONFIG_MXF_MUXER) += mxfenc.o mxf.o retimeinterleave.o avc.o OBJS-$(CONFIG_MXG_DEMUXER) += mxg.o OBJS-$(CONFIG_NC_DEMUXER)+= ncdec.o OBJS-$(CONFIG_NISTSPHERE_DEMUXER)+= nistspheredec.o pcm.o diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c deleted file mode 100644 index 36a3288242..00 --- a/libavformat/audiointerleave.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Audio Interleaving functions - * - * Copyright (c) 2009 Baptiste Coudurier - * - * This file is part of FFmpeg. - * - * FFmpeg 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. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/fifo.h" -#include "libavutil/mathematics.h" -#include "avformat.h" -#include "audiointerleave.h" -#include "internal.h" - -void ff_audio_interleave_close(AVFormatContext *s) -{ -int i; -for (i = 0; i < s->nb_streams; i++) { -AVStream *st = s->streams[i]; -AudioInterleaveContext *aic = st->priv_data; - -if (aic && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) -av_fifo_freep(&aic->fifo); -} -} - -int ff_audio_interleave_init(AVFormatContext *s, - const int samples_per_frame, - AVRational time_base) -{ -int i; - -if (!time_base.num) { -av_log(s, AV_LOG_ERROR, "timebase not set for audio interleave\n"); -return AVERROR(EINVAL); -} -for (i = 0; i < s->nb_streams; i++) { -AVStream *st = s->str
[FFmpeg-cvslog] avformat/mux: add proper support for full N:M bitstream filtering
ffmpeg | branch: master | Marton Balint | Sat Apr 18 14:20:51 2020 +0200| [d7a0071a44ad31511bb0c59fb09b2f3358c03bfd] | committer: Marton Balint avformat/mux: add proper support for full N:M bitstream filtering Previously only 1:1 bitstream filters were supported, the end of the stream was not signalled to the bitstream filters and time base changes were ignored. This change also allows muxers to set up bitstream filters regardless of the autobsf flag during write_header instead of during check_bitstream and those bitstream filters will always be executed. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7a0071a44ad31511bb0c59fb09b2f3358c03bfd --- libavformat/mux.c | 87 +++ 1 file changed, 56 insertions(+), 31 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index fddf1f86be..41659b19c9 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1082,8 +1082,8 @@ static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, in return ff_interleave_packet_per_dts(s, out, in, flush); } -static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) { -AVStream *st = s->streams[pkt->stream_index]; +static int check_bitstream(AVFormatContext *s, AVStream *st, AVPacket *pkt) +{ int ret; if (!(s->flags & AVFMT_FLAG_AUTO_BSF)) @@ -1098,30 +1098,6 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) { } } -if (st->internal->bsfc) { -AVBSFContext *ctx = st->internal->bsfc; -// TODO: when any bitstream filter requires flushing at EOF, we'll need to -// flush each stream's BSF chain on write_trailer. -if ((ret = av_bsf_send_packet(ctx, pkt)) < 0) { -av_log(ctx, AV_LOG_ERROR, -"Failed to send packet to filter %s for stream %d\n", -ctx->filter->name, pkt->stream_index); -return ret; -} -// TODO: when any automatically-added bitstream filter is generating multiple -// output packets for a single input one, we'll need to call this in a loop -// and write each output packet. -if ((ret = av_bsf_receive_packet(ctx, pkt)) < 0) { -if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) -return 0; -av_log(ctx, AV_LOG_ERROR, -"Failed to receive packet from filter %s for stream %d\n", -ctx->filter->name, pkt->stream_index); -if (s->error_recognition & AV_EF_EXPLODE) -return ret; -return 0; -} -} return 1; } @@ -1166,6 +1142,38 @@ static int write_packet_common(AVFormatContext *s, AVStream *st, AVPacket *pkt, } } +static int write_packets_from_bsfs(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved) +{ +AVBSFContext *bsfc = st->internal->bsfc; +int ret; + +if ((ret = av_bsf_send_packet(bsfc, pkt)) < 0) { +av_log(s, AV_LOG_ERROR, +"Failed to send packet to filter %s for stream %d\n", +bsfc->filter->name, st->index); +return ret; +} + +do { +ret = av_bsf_receive_packet(bsfc, pkt); +if (ret < 0) { +if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) +return 0; +av_log(s, AV_LOG_ERROR, "Error applying bitstream filters to an output " + "packet for stream #%d: %s\n", st->index, av_err2str(ret)); +if (!(s->error_recognition & AV_EF_EXPLODE) && ret != AVERROR(ENOMEM)) +continue; +return ret; +} +av_packet_rescale_ts(pkt, bsfc->time_base_out, st->time_base); +ret = write_packet_common(s, st, pkt, interleaved); +if (ret >= 0 && !interleaved) // a successful write_packet_common already unrefed pkt for interleaved +av_packet_unref(pkt); +} while (ret >= 0); + +return ret; +} + static int write_packets_common(AVFormatContext *s, AVPacket *pkt, int interleaved) { AVStream *st = s->streams[pkt->stream_index]; @@ -1173,11 +1181,15 @@ static int write_packets_common(AVFormatContext *s, AVPacket *pkt, int interleav if (ret < 0) return ret; -ret = do_packet_auto_bsf(s, pkt); -if (ret <= 0) +ret = check_bitstream(s, st, pkt); +if (ret < 0) return ret; -return write_packet_common(s, st, pkt, interleaved); +if (st->internal->bsfc) { +return write_packets_from_bsfs(s, st, pkt, interleaved); +} else { +return write_packet_common(s, st, pkt, interleaved); +} } int av_write_frame(AVFormatContext *s, AVPacket *in) @@ -1243,9 +1255,22 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) int av_write_trailer(AVFormatContext *s) { -int ret, i; +int i, ret1, ret = 0; +AVPacket pkt = {0}; +av_init_packet(&pkt); -
[FFmpeg-cvslog] avformat/mux: factorize writing a packet
ffmpeg | branch: master | Marton Balint | Fri Mar 27 02:22:53 2020 +0100| [64063512227c4c87a7d16a1076481dc6baf19841] | committer: Marton Balint avformat/mux: factorize writing a packet In preparation for N:M bsf support. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64063512227c4c87a7d16a1076481dc6baf19841 --- libavformat/mux.c | 89 ++- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index 4c282a489d..fddf1f86be 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1144,6 +1144,42 @@ static int interleaved_write_packet(AVFormatContext *s, AVPacket *pkt, int flush } } +static int write_packet_common(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved) +{ +int ret; + +if (s->debug & FF_FDEBUG_TS) +av_log(s, AV_LOG_DEBUG, "%s size:%d dts:%s pts:%s\n", __FUNCTION__, + pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts)); + +#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX +if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) +return ret; +#endif + +if (interleaved) { +if (pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) +return AVERROR(EINVAL); +return interleaved_write_packet(s, pkt, 0); +} else { +return write_packet(s, pkt); +} +} + +static int write_packets_common(AVFormatContext *s, AVPacket *pkt, int interleaved) +{ +AVStream *st = s->streams[pkt->stream_index]; +int ret = prepare_input_packet(s, pkt); +if (ret < 0) +return ret; + +ret = do_packet_auto_bsf(s, pkt); +if (ret <= 0) +return ret; + +return write_packet_common(s, st, pkt, interleaved); +} + int av_write_frame(AVFormatContext *s, AVPacket *in) { AVPacket local_pkt, *pkt = &local_pkt; @@ -1182,22 +1218,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *in) } } -ret = prepare_input_packet(s, pkt); -if (ret < 0) -goto fail; - -ret = do_packet_auto_bsf(s, pkt); -if (ret <= 0) -goto fail; - -#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX -ret = compute_muxer_pkt_fields(s, s->streams[pkt->stream_index], pkt); - -if (ret < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) -goto fail; -#endif - -ret = write_packet(s, pkt); +ret = write_packets_common(s, pkt, 0/*non-interleaved*/); fail: // Uncoded frames using the noninterleaved codepath are also freed here @@ -1207,43 +1228,17 @@ fail: int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) { -int ret, flush = 0; +int ret; if (pkt) { -AVStream *st = s->streams[pkt->stream_index]; - -ret = prepare_input_packet(s, pkt); +ret = write_packets_common(s, pkt, 1/*interleaved*/); if (ret < 0) -goto fail; - -ret = do_packet_auto_bsf(s, pkt); -if (ret == 0) -return 0; -else if (ret < 0) -goto fail; - -if (s->debug & FF_FDEBUG_TS) -av_log(s, AV_LOG_DEBUG, "av_interleaved_write_frame size:%d dts:%s pts:%s\n", -pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts)); - -#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX -if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) -goto fail; -#endif - -if (pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { -ret = AVERROR(EINVAL); -goto fail; -} +av_packet_unref(pkt); +return ret; } else { av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame FLUSH\n"); -flush = 1; +return interleaved_write_packet(s, NULL, 1/*flush*/); } -return interleaved_write_packet(s, pkt, flush); - -fail: -av_packet_unref(pkt); -return ret; } int av_write_trailer(AVFormatContext *s) ___ 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/pcm_rechunk_bsf: add bitstream filter to rechunk pcm audio
ffmpeg | branch: master | Marton Balint | Tue Mar 24 23:24:22 2020 +0100| [2035620b7cc5a3087b4eb632fba188f89af61541] | committer: Marton Balint avcodec/pcm_rechunk_bsf: add bitstream filter to rechunk pcm audio Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2035620b7cc5a3087b4eb632fba188f89af61541 --- Changelog | 1 + doc/bitstream_filters.texi | 30 ++ libavcodec/Makefile| 1 + libavcodec/bitstream_filters.c | 1 + libavcodec/pcm_rechunk_bsf.c | 220 + libavcodec/version.h | 2 +- 6 files changed, 254 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index aed70d8da5..b75d2b6b96 100644 --- a/Changelog +++ b/Changelog @@ -65,6 +65,7 @@ version : - Cunning Developments ADPCM decoder - asubboost filter - Pro Pinball Series Soundbank demuxer +- pcm_rechunk bitstream filter version 4.2: diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 9aa2f00296..8a2f55cc41 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -548,6 +548,36 @@ ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv @section null This bitstream filter passes the packets through unchanged. +@section pcm_rechunk + +Repacketize PCM audio to a fixed number of samples per packet or a fixed packet +rate per second. This is similar to the @ref{asetnsamples,,asetnsamples audio +filter,ffmpeg-filters} but works on audio packets instead of audio frames. + +@table @option +@item nb_out_samples, n +Set the number of samples per each output audio packet. The number is intended +as the number of samples @emph{per each channel}. Default value is 1024. + +@item pad, p +If set to 1, the filter will pad the last audio packet with silence, so that it +will contain the same number of samples (or roughly the same number of samples, +see @option{frame_rate}) as the previous ones. Default value is 1. + +@item frame_rate, r +This option makes the filter output a fixed number of packets per second instead +of a fixed number of samples per packet. If the audio sample rate is not +divisible by the frame rate then the number of samples will not be constant but +will vary slightly so that each packet will start as close to the frame +boundary as possible. Using this option has precedence over @option{nb_out_samples}. +@end table + +You can generate the well known 1602-1601-1602-1601-1602 pattern of 48kHz audio +for NTSC frame rate using the @option{frame_rate} option. +@example +ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=3/1001 -f framecrc - +@end example + @section prores_metadata Modify color property metadata embedded in prores stream. diff --git a/libavcodec/Makefile b/libavcodec/Makefile index cf72f55aff..38f6f07680 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1117,6 +1117,7 @@ OBJS-$(CONFIG_MPEG2_METADATA_BSF) += mpeg2_metadata_bsf.o OBJS-$(CONFIG_NOISE_BSF) += noise_bsf.o OBJS-$(CONFIG_NULL_BSF) += null_bsf.o OBJS-$(CONFIG_OPUS_METADATA_BSF) += opus_metadata_bsf.o +OBJS-$(CONFIG_PCM_RECHUNK_BSF)+= pcm_rechunk_bsf.o OBJS-$(CONFIG_PRORES_METADATA_BSF)+= prores_metadata_bsf.o OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o OBJS-$(CONFIG_TEXT2MOVSUB_BSF)+= movsub_bsf.o diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c index f1b24baa53..359961fedd 100644 --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@ -50,6 +50,7 @@ extern const AVBitStreamFilter ff_mov2textsub_bsf; extern const AVBitStreamFilter ff_noise_bsf; extern const AVBitStreamFilter ff_null_bsf; extern const AVBitStreamFilter ff_opus_metadata_bsf; +extern const AVBitStreamFilter ff_pcm_rechunk_bsf; extern const AVBitStreamFilter ff_prores_metadata_bsf; extern const AVBitStreamFilter ff_remove_extradata_bsf; extern const AVBitStreamFilter ff_text2movsub_bsf; diff --git a/libavcodec/pcm_rechunk_bsf.c b/libavcodec/pcm_rechunk_bsf.c new file mode 100644 index 00..b528ed0c71 --- /dev/null +++ b/libavcodec/pcm_rechunk_bsf.c @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2020 Marton Balint + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Fou
[FFmpeg-cvslog] avcodec/libx264: return immediately if encode_nals return 0
ffmpeg | branch: master | Limin Wang | Sat Apr 18 12:52:48 2020 +0800| [f5e33514e7a879b09fabfeffd78402590225bf47] | committer: Limin Wang avcodec/libx264: return immediately if encode_nals return 0 x264_encoder_encode can return 0 with nnal 0. As a result, encode_nals will return 0. In this condition, it's better to return 0 immediately to avoid the following unneeded pict_type and flags setting. Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5e33514e7a879b09fabfeffd78402590225bf47 --- libavcodec/libx264.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index c6cce9ff80..c13e8a58d4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -447,6 +447,9 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, return ret; } while (!ret && !frame && x264_encoder_delayed_frames(x4->enc)); +if (!ret) +return 0; + pkt->pts = pic_out.i_pts; pkt->dts = pic_out.i_dts; ___ 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/libx264: return error if unknown picture type encountered
ffmpeg | branch: master | Limin Wang | Sat Apr 18 12:52:49 2020 +0800| [8b077511238e97d8657fb58551befc63cf5e29ed] | committer: Limin Wang avcodec/libx264: return error if unknown picture type encountered Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b077511238e97d8657fb58551befc63cf5e29ed --- libavcodec/libx264.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index c13e8a58d4..4121b2807a 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -476,7 +476,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, pict_type = AV_PICTURE_TYPE_B; break; default: -pict_type = AV_PICTURE_TYPE_NONE; +av_log(ctx, AV_LOG_ERROR, "Unknown picture type encountered.\n"); +return AVERROR_EXTERNAL; } #if FF_API_CODED_FRAME FF_DISABLE_DEPRECATION_WARNINGS ___ 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/libx265: Fix Uninitialized scalar variable
ffmpeg | branch: master | Limin Wang | Sat Apr 18 12:52:47 2020 +0800| [d8e98d93485754b746a7d1103f33a30de08022b7] | committer: Limin Wang avcodec/libx265: Fix Uninitialized scalar variable return error if unknown picture type encountered Fixes CID 1457234 Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8e98d93485754b746a7d1103f33a30de08022b7 --- libavcodec/libx265.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index e42c7b4d85..573ecc8cb0 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -550,6 +550,9 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, case X265_TYPE_BREF: pict_type = AV_PICTURE_TYPE_B; break; +default: +av_log(avctx, AV_LOG_ERROR, "Unknown picture type encountered.\n"); +return AVERROR_EXTERNAL; } #if FF_API_CODED_FRAME ___ 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/lcldec: remove the unnecessary type conversion
ffmpeg | branch: master | Limin Wang | Thu Sep 12 17:23:39 2019 +0800| [9d442102b9093405f4e2525a9f97e51fe5303a80] | committer: Limin Wang avcodec/lcldec: remove the unnecessary type conversion Reviewed-by: Carl Eugen Hoyos Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d442102b9093405f4e2525a9f97e51fe5303a80 --- libavcodec/lcldec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index c51083bdf2..2dcd249b65 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -136,7 +136,7 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret); return AVERROR_UNKNOWN; } -c->zstream.next_in = (uint8_t *)src; +c->zstream.next_in = src; c->zstream.avail_in = src_len; c->zstream.next_out = c->decomp_buf + offset; c->zstream.avail_out = c->decomp_size - offset; ___ 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/pngdec: remove the unnecessary type conversion
ffmpeg | branch: master | Limin Wang | Thu Sep 12 17:23:40 2019 +0800| [4cea39ad9b993e88413ddc4868b0b281b8a5e83e] | committer: Limin Wang avcodec/pngdec: remove the unnecessary type conversion Reviewed-by: Carl Eugen Hoyos Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4cea39ad9b993e88413ddc4868b0b281b8a5e83e --- libavcodec/pngdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 67bfc41b31..d72f9bbb80 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -415,7 +415,7 @@ static int png_decode_idat(PNGDecContext *s, int length) { int ret; s->zstream.avail_in = FFMIN(length, bytestream2_get_bytes_left(&s->gb)); -s->zstream.next_in = (unsigned char *)s->gb.buffer; +s->zstream.next_in = s->gb.buffer; bytestream2_skip(&s->gb, length); /* decode one line if possible */ @@ -454,7 +454,7 @@ static int decode_zbuf(AVBPrint *bp, const uint8_t *data, zstream.opaque = NULL; if (inflateInit(&zstream) != Z_OK) return AVERROR_EXTERNAL; -zstream.next_in = (unsigned char *)data; +zstream.next_in = data; zstream.avail_in = data_end - data; av_bprint_init(bp, 0, AV_BPRINT_SIZE_UNLIMITED); ___ 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/zmbv: remove the unnecessary type conversion
ffmpeg | branch: master | Limin Wang | Thu Sep 12 17:23:42 2019 +0800| [607b85f07e6596a4f1e56bbd5717522b41737547] | committer: Limin Wang avcodec/zmbv: remove the unnecessary type conversion Reviewed-by: Carl Eugen Hoyos Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=607b85f07e6596a4f1e56bbd5717522b41737547 --- libavcodec/zmbv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 02599bf03d..e3ccc16d0b 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -536,7 +536,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac c->decomp_len = len; } else { // ZLIB-compressed data c->zstream.total_in = c->zstream.total_out = 0; -c->zstream.next_in = (uint8_t*)buf; +c->zstream.next_in = buf; c->zstream.avail_in = len; c->zstream.next_out = c->decomp_buf; c->zstream.avail_out = c->decomp_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] avcodec/tiff: remove the unnecessary type conversion
ffmpeg | branch: master | Limin Wang | Thu Sep 12 17:23:41 2019 +0800| [1b3d5090c5b9955887ba6743084bbda1eb50439b] | committer: Limin Wang avcodec/tiff: remove the unnecessary type conversion Reviewed-by: Carl Eugen Hoyos Signed-off-by: Limin Wang > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b3d5090c5b9955887ba6743084bbda1eb50439b --- libavcodec/tiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 45cb225d0a..5e4f424b67 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -393,7 +393,7 @@ static int tiff_uncompress(uint8_t *dst, unsigned long *len, const uint8_t *src, z_stream zstream = { 0 }; int zret; -zstream.next_in = (uint8_t *)src; +zstream.next_in = src; zstream.avail_in = size; zstream.next_out = dst; zstream.avail_out = *len; ___ 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".