[FFmpeg-cvslog] avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers()
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 12 14:46:19 2014 +0100| [ad2deb02e5d8bfd67c99c6409cd1d0992984fdc7] | committer: Michael Niedermayer avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers() Reviewed-by: Reimar Döffinger Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad2deb02e5d8bfd67c99c6409cd1d0992984fdc7 --- libavcodec/vorbis_parser.c |2 +- libavcodec/vorbisdec.c |2 +- libavcodec/vp3.c |2 +- libavcodec/xiph.c |2 +- libavcodec/xiph.h |2 +- libavformat/matroskaenc.c |2 +- libavformat/oggenc.c |2 +- libavformat/sdp.c |2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c index b99f115..547fd47 100644 --- a/libavcodec/vorbis_parser.c +++ b/libavcodec/vorbis_parser.c @@ -184,7 +184,7 @@ bad_header: static int vorbis_parse_init(AVVorbisParseContext *s, const uint8_t *extradata, int extradata_size) { -uint8_t *header_start[3]; +const uint8_t *header_start[3]; int header_len[3]; int ret; diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index fb16099..09a863f 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1017,7 +1017,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avctx) vorbis_context *vc = avctx->priv_data; uint8_t *headers = avctx->extradata; int headers_len= avctx->extradata_size; -uint8_t *header_start[3]; +const uint8_t *header_start[3]; int header_len[3]; GetBitContext *gb = &vc->gb; int hdr_type, ret; diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 8aca83a..0e37f0d 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2437,7 +2437,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) Vp3DecodeContext *s = avctx->priv_data; GetBitContext gb; int ptype; -uint8_t *header_start[3]; +const uint8_t *header_start[3]; int header_len[3]; int i; diff --git a/libavcodec/xiph.c b/libavcodec/xiph.c index 49b978d..d072224 100644 --- a/libavcodec/xiph.c +++ b/libavcodec/xiph.c @@ -22,7 +22,7 @@ #include "xiph.h" int avpriv_split_xiph_headers(const uint8_t *extradata, int extradata_size, - int first_header_size, uint8_t *header_start[3], + int first_header_size, const uint8_t *header_start[3], int header_len[3]) { int i; diff --git a/libavcodec/xiph.h b/libavcodec/xiph.h index b8ddbbe..1741a51 100644 --- a/libavcodec/xiph.h +++ b/libavcodec/xiph.h @@ -37,7 +37,7 @@ * @return On error a negative value is returned, on success zero. */ int avpriv_split_xiph_headers(const uint8_t *extradata, int extradata_size, - int first_header_size, uint8_t *header_start[3], + int first_header_size, const uint8_t *header_start[3], int header_len[3]); #endif /* AVCODEC_XIPH_H */ diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index e8e8da0..c781c8a 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -491,7 +491,7 @@ static int64_t mkv_write_cues(AVFormatContext *s, mkv_cues *cues, mkv_track *tra static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec) { -uint8_t *header_start[3]; +const uint8_t *header_start[3]; int header_len[3]; int first_header_size; int j; diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index f3413c5..3929311 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -508,7 +508,7 @@ static int ogg_write_header(AVFormatContext *s) if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size, st->codec->codec_id == AV_CODEC_ID_VORBIS ? 30 : 42, - oggstream->header, oggstream->header_len) < 0) { + (const uint8_t**)oggstream->header, oggstream->header_len) < 0) { av_log(s, AV_LOG_ERROR, "Extradata corrupted\n"); av_freep(&st->priv_data); return AVERROR_INVALIDDATA; diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 5bf9de6..fadabbe 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -348,7 +348,7 @@ static char *extradata2config(AVCodecContext *c) static char *xiph_extradata2config(AVCodecContext *c) { char *config, *encoded_config; -uint8_t *header_start[3]; +const uint8_t *header_start[3]; int headers_len, header_len[3], config_len; int first_header_size; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_sendcmd: Use av_freep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 15:54:45 2014 +0100| [eb055295bda0d1bcf6aba55db1a31c11fc5db1bd] | committer: Michael Niedermayer avfilter/f_sendcmd: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb055295bda0d1bcf6aba55db1a31c11fc5db1bd --- libavfilter/f_sendcmd.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index c30f49f..20d9fd1 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -431,11 +431,11 @@ static av_cold void uninit(AVFilterContext *ctx) Interval *interval = &sendcmd->intervals[i]; for (j = 0; j < interval->nb_commands; j++) { Command *cmd = &interval->commands[j]; -av_free(cmd->target); -av_free(cmd->command); -av_free(cmd->arg); +av_freep(&cmd->target); +av_freep(&cmd->command); +av_freep(&cmd->arg); } -av_free(interval->commands); +av_freep(&interval->commands); } av_freep(&sendcmd->intervals); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_dctdnoiz: use av_freep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 15:56:32 2014 +0100| [6de2f027cd60c99e1628baf5bb4aeea4b5008217] | committer: Michael Niedermayer avfilter/vf_dctdnoiz: use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6de2f027cd60c99e1628baf5bb4aeea4b5008217 --- libavfilter/vf_dctdnoiz.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index a9017b1..5cce9cb 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -732,14 +732,14 @@ static av_cold void uninit(AVFilterContext *ctx) int i; DCTdnoizContext *s = ctx->priv; -av_free(s->weights); +av_freep(&s->weights); for (i = 0; i < 2; i++) { -av_free(s->cbuf[i][0]); -av_free(s->cbuf[i][1]); -av_free(s->cbuf[i][2]); +av_freep(&s->cbuf[i][0]); +av_freep(&s->cbuf[i][1]); +av_freep(&s->cbuf[i][2]); } for (i = 0; i < s->nb_threads; i++) { -av_free(s->slices[i]); +av_freep(&s->slices[i]); av_expr_free(s->expr[i]); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/aviobuf: Check that avio_seek() target is non negative
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 17:26:11 2014 +0100| [ed86dbd05d61363dc1c0d33f3267e2177c985fdd] | committer: Michael Niedermayer avformat/aviobuf: Check that avio_seek() target is non negative Fixes out of array access Suggested-by: Andrew Scherkus Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed86dbd05d61363dc1c0d33f3267e2177c985fdd --- libavformat/aviobuf.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index f374314..0b0748e 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -223,6 +223,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) return offset1; offset += offset1; } +if (offset < 0) +return AVERROR(EINVAL); + offset1 = offset - pos; if (!s->must_flush && (!s->direct || !s->seek) && offset1 >= 0 && offset1 <= buffer_size) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mp3dec: Name the dummy variable as what it is, to avoid confusion
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 20:08:13 2014 +0100| [8ddfc00ab7ac3691464b33fa83107dcfdabaf1ee] | committer: Michael Niedermayer avformat/mp3dec: Name the dummy variable as what it is, to avoid confusion Found-by: nattyzs Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ddfc00ab7ac3691464b33fa83107dcfdabaf1ee --- libavformat/mp3dec.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index c4c1bb7..519d046 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -58,7 +58,7 @@ typedef struct { static int mp3_read_probe(AVProbeData *p) { int max_frames, first_frames = 0; -int fsize, frames, sample_rate; +int fsize, frames; uint32_t header; const uint8_t *buf, *buf0, *buf2, *end; AVCodecContext avctx; @@ -77,8 +77,9 @@ static int mp3_read_probe(AVProbeData *p) continue; for(frames = 0; buf2 < end; frames++) { +int dummy; header = AV_RB32(buf2); -fsize = avpriv_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); +fsize = avpriv_mpa_decode_header(&avctx, header, &dummy, &dummy, &dummy, &dummy); if(fsize < 0) break; buf2 += fsize; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference ()
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 19:46:31 2014 +0100| [a29524bf2e197dd8d582445de0fe17f03b79f79d] | committer: Michael Niedermayer avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference() Fixes Ticket3686 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a29524bf2e197dd8d582445de0fe17f03b79f79d --- libavformat/utils.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 9328d6b..a883745 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -594,6 +594,8 @@ static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_in int default_stream_index = av_find_default_stream_index(s); if (s->streams[default_stream_index]->pts_wrap_reference == AV_NOPTS_VALUE) { for (i = 0; i < s->nb_streams; i++) { +if (av_find_program_from_stream(s, NULL, i)) +continue; s->streams[i]->pts_wrap_reference = pts_wrap_reference; s->streams[i]->pts_wrap_behavior = pts_wrap_behavior; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'e10e6651b50b4087f08813f3e503620db7413d3a'
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 22:05:13 2014 +0100| [add040ff01cd325dde30e43bda5d603c99f27e8a] | committer: Michael Niedermayer Merge commit 'e10e6651b50b4087f08813f3e503620db7413d3a' * commit 'e10e6651b50b4087f08813f3e503620db7413d3a': thread: use "" instead of <> for including the w32pthreads wrapper See: 32eadfe453c32788ea57968e6e80f673f434739d Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=add040ff01cd325dde30e43bda5d603c99f27e8a --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vdpau: revector macro to reduce line span
ffmpeg | branch: master | Rémi Denis-Courmont | Sat Dec 13 18:42:19 2014 +0200| [8b51bcfed75721e0d20832e5a90e1d585318c9d9] | committer: Anton Khirnov vdpau: revector macro to reduce line span Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b51bcfed75721e0d20832e5a90e1d585318c9d9 --- libavcodec/vdpau.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 93b53dd..fd3ae62 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -264,45 +264,46 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx, int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile) { -#define PROFILE(prof) \ -do {\ -*profile = prof;\ -return 0; \ +#define PROFILE(prof) \ +do { \ +*profile = VDP_DECODER_PROFILE_##prof; \ +return 0; \ } while (0) switch (avctx->codec_id) { -case AV_CODEC_ID_MPEG1VIDEO: PROFILE(VDP_DECODER_PROFILE_MPEG1); +case AV_CODEC_ID_MPEG1VIDEO: PROFILE(MPEG1); case AV_CODEC_ID_MPEG2VIDEO: switch (avctx->profile) { -case FF_PROFILE_MPEG2_MAIN: PROFILE(VDP_DECODER_PROFILE_MPEG2_MAIN); -case FF_PROFILE_MPEG2_SIMPLE: PROFILE(VDP_DECODER_PROFILE_MPEG2_SIMPLE); +case FF_PROFILE_MPEG2_MAIN:PROFILE(MPEG2_MAIN); +case FF_PROFILE_MPEG2_SIMPLE: PROFILE(MPEG2_SIMPLE); default: return AVERROR(EINVAL); } -case AV_CODEC_ID_H263: PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_ASP); +case AV_CODEC_ID_H263: PROFILE(MPEG4_PART2_ASP); case AV_CODEC_ID_MPEG4: switch (avctx->profile) { -case FF_PROFILE_MPEG4_SIMPLE: PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_SP); -case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_ASP); +case FF_PROFILE_MPEG4_SIMPLE: PROFILE(MPEG4_PART2_SP); +case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: PROFILE(MPEG4_PART2_ASP); default: return AVERROR(EINVAL); } case AV_CODEC_ID_H264: switch (avctx->profile & ~FF_PROFILE_H264_INTRA) { -case FF_PROFILE_H264_BASELINE: PROFILE(VDP_DECODER_PROFILE_H264_BASELINE); +case FF_PROFILE_H264_BASELINE: PROFILE(H264_BASELINE); case FF_PROFILE_H264_CONSTRAINED_BASELINE: -case FF_PROFILE_H264_MAIN: PROFILE(VDP_DECODER_PROFILE_H264_MAIN); -case FF_PROFILE_H264_HIGH: PROFILE(VDP_DECODER_PROFILE_H264_HIGH); +case FF_PROFILE_H264_MAIN: PROFILE(H264_MAIN); +case FF_PROFILE_H264_HIGH: PROFILE(H264_HIGH); default: return AVERROR(EINVAL); } case AV_CODEC_ID_WMV3: case AV_CODEC_ID_VC1: switch (avctx->profile) { -case FF_PROFILE_VC1_SIMPLE: PROFILE(VDP_DECODER_PROFILE_VC1_SIMPLE); -case FF_PROFILE_VC1_MAIN: PROFILE(VDP_DECODER_PROFILE_VC1_MAIN); -case FF_PROFILE_VC1_ADVANCED: PROFILE(VDP_DECODER_PROFILE_VC1_ADVANCED); +case FF_PROFILE_VC1_SIMPLE:PROFILE(VC1_SIMPLE); +case FF_PROFILE_VC1_MAIN: PROFILE(VC1_MAIN); +case FF_PROFILE_VC1_ADVANCED: PROFILE(VC1_ADVANCED); default: return AVERROR(EINVAL); } } return AVERROR(EINVAL); +#undef PROFILE } AVVDPAUContext *av_vdpau_alloc_context(void) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '8b51bcfed75721e0d20832e5a90e1d585318c9d9'
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 22:07:08 2014 +0100| [0b30d186f1a2ddee583e7917cd0a48ca113849ab] | committer: Michael Niedermayer Merge commit '8b51bcfed75721e0d20832e5a90e1d585318c9d9' * commit '8b51bcfed75721e0d20832e5a90e1d585318c9d9': vdpau: revector macro to reduce line span Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b30d186f1a2ddee583e7917cd0a48ca113849ab --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] thread: use "" instead of <> for including the w32pthreads wrapper
ffmpeg | branch: master | Anton Khirnov | Mon Dec 1 14:15:36 2014 +0100| [e10e6651b50b4087f08813f3e503620db7413d3a] | committer: Anton Khirnov thread: use "" instead of <> for including the w32pthreads wrapper Found-by: Dave Yeo > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e10e6651b50b4087f08813f3e503620db7413d3a --- libavutil/thread.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/thread.h b/libavutil/thread.h index 07e3d4a..3556544 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -29,7 +29,7 @@ #if HAVE_PTHREADS #include #else -#include +#include "compat/w32pthreads.h" #endif #define AVMutex pthread_mutex_t ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '8502c1e9ff9c1dbb6e467630c048d098f4064021'
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 22:14:36 2014 +0100| [3f679f73a2eee1937bd58e6ec5739d29b1a05e7f] | committer: Michael Niedermayer Merge commit '8502c1e9ff9c1dbb6e467630c048d098f4064021' * commit '8502c1e9ff9c1dbb6e467630c048d098f4064021': vdpau: add mapping for H.264 Extended profile Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f679f73a2eee1937bd58e6ec5739d29b1a05e7f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vdpau: add mapping for H.264 Extended profile
ffmpeg | branch: master | Rémi Denis-Courmont | Sat Dec 13 18:42:20 2014 +0200| [8502c1e9ff9c1dbb6e467630c048d098f4064021] | committer: Anton Khirnov vdpau: add mapping for H.264 Extended profile Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8502c1e9ff9c1dbb6e467630c048d098f4064021 --- libavcodec/vdpau.c |3 +++ libavcodec/vdpau_h264.c |5 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index fd3ae62..1e891ed 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -291,6 +291,9 @@ do { \ case FF_PROFILE_H264_CONSTRAINED_BASELINE: case FF_PROFILE_H264_MAIN: PROFILE(H264_MAIN); case FF_PROFILE_H264_HIGH: PROFILE(H264_HIGH); +#ifdef VDP_DECODER_PROFILE_H264_EXTENDED +case FF_PROFILE_H264_EXTENDED: PROFILE(H264_EXTENDED); +#endif default: return AVERROR(EINVAL); } case AV_CODEC_ID_WMV3: diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c index 4103328..d18a970 100644 --- a/libavcodec/vdpau_h264.c +++ b/libavcodec/vdpau_h264.c @@ -219,6 +219,11 @@ static int vdpau_h264_init(AVCodecContext *avctx) case FF_PROFILE_H264_HIGH: profile = VDP_DECODER_PROFILE_H264_HIGH; break; +#ifdef VDP_DECODER_PROFILE_H264_EXTENDED +case FF_PROFILE_H264_EXTENDED: +profile = VDP_DECODER_PROFILE_H264_EXTENDED; +break; +#endif default: return AVERROR(ENOTSUP); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816'
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 22:22:19 2014 +0100| [27f2e211aa6d0f9b5b4e4c04d3a3567423085d49] | committer: Michael Niedermayer Merge commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816' * commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816': vdpau: add mapping for H.264 Constrained Baseline profile and fallback Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27f2e211aa6d0f9b5b4e4c04d3a3567423085d49 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vdpau: add mapping for H.264 Constrained Baseline profile and fallback
ffmpeg | branch: master | Rémi Denis-Courmont | Sat Dec 13 18:42:21 2014 +0200| [559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816] | committer: Anton Khirnov vdpau: add mapping for H.264 Constrained Baseline profile and fallback Old VDPAU drivers do not support this newly defined profile, so falling back to Main profile is necessary for backward binary compatibility. Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816 --- libavcodec/vdpau.c |9 + libavcodec/vdpau_h264.c |4 2 files changed, 13 insertions(+) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 1e891ed..ccb3352 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -125,6 +125,15 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, status = decoder_query_caps(vdctx->device, profile, &supported, &max_level, &max_mb, &max_width, &max_height); +#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE +if (status != VDP_STATUS_OK && profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE) { +/* Run-time backward compatibility for libvdpau 0.8 and earlier */ +profile = VDP_DECODER_PROFILE_H264_MAIN; +status = decoder_query_caps(vdctx->device, profile, &supported, +&max_level, &max_mb, +&max_width, &max_height); +} +#endif if (status != VDP_STATUS_OK) return vdpau_error(status); diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c index d18a970..5ed1fff 100644 --- a/libavcodec/vdpau_h264.c +++ b/libavcodec/vdpau_h264.c @@ -213,6 +213,10 @@ static int vdpau_h264_init(AVCodecContext *avctx) profile = VDP_DECODER_PROFILE_H264_BASELINE; break; case FF_PROFILE_H264_CONSTRAINED_BASELINE: +#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE +profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE; +break; +#endif case FF_PROFILE_H264_MAIN: profile = VDP_DECODER_PROFILE_H264_MAIN; break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avconv: Use the mpeg12 private option scan_offset
ffmpeg | branch: master | Julien Ramseier | Sun Dec 14 02:00:04 2014 +0100| [fd665f7f48fa7db89eb9a93ac33919f6adc40f9d] | committer: Anton Khirnov avconv: Use the mpeg12 private option scan_offset Introduced in aed790070486b1b01b48106310d9d0ca1730e459 Bug-Id: debian/773055 CC: libav-sta...@libav.org Signed-off-by: Luca Barbato Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd665f7f48fa7db89eb9a93ac33919f6adc40f9d --- avconv_opt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avconv_opt.c b/avconv_opt.c index 2d06912..6d43bc1 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1825,7 +1825,7 @@ static int opt_target(void *optctx, const char *opt, const char *arg) opt_default(NULL, "maxrate", "2516000"); opt_default(NULL, "minrate", "0"); // 1145000; opt_default(NULL, "bufsize", "1835008"); // 224*1024*8; -opt_default(NULL, "flags", "+scan_offset"); +opt_default(NULL, "scan_offset", "1"); opt_default(NULL, "b:a", "224000"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'fd665f7f48fa7db89eb9a93ac33919f6adc40f9d'
ffmpeg | branch: master | Michael Niedermayer | Sun Dec 14 22:53:23 2014 +0100| [829099545bf32c28236f8caa5558b81d25efcf91] | committer: Michael Niedermayer Merge commit 'fd665f7f48fa7db89eb9a93ac33919f6adc40f9d' * commit 'fd665f7f48fa7db89eb9a93ac33919f6adc40f9d': avconv: Use the mpeg12 private option scan_offset Conflicts: ffmpeg_opt.c See: e479013ae41050ad9b76429d8c6ab70684cddc93 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=829099545bf32c28236f8caa5558b81d25efcf91 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavd/avdevice: use better option types for caps options
ffmpeg | branch: master | Lukasz Marek | Sat Dec 13 20:25:42 2014 +0100| [279412c83340584a32f08a4afa0f81fb50061853] | committer: Lukasz Marek lavd/avdevice: use better option types for caps options Using dedicated types allows to use format/layout names, not just raw int values. Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=279412c83340584a32f08a4afa0f81fb50061853 --- libavdevice/avdevice.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 755f251..fda3cd0 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -32,16 +32,16 @@ const AVOption av_device_capabilities[] = { { "codec", "codec", OFFSET(codec), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_ID_NONE}, AV_CODEC_ID_NONE, INT_MAX, E|D|A|V }, -{ "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_INT, -{.i64 = AV_SAMPLE_FMT_NONE}, -1, INT_MAX, E|D|A }, +{ "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_SAMPLE_FMT, +{.i64 = AV_SAMPLE_FMT_NONE}, AV_SAMPLE_FMT_NONE, INT_MAX, E|D|A }, { "sample_rate", "sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, E|D|A }, { "channels", "channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, E|D|A }, -{ "channel_layout", "channel layout", OFFSET(channel_layout), AV_OPT_TYPE_INT64, +{ "channel_layout", "channel layout", OFFSET(channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64 = -1}, -1, INT_MAX, E|D|A }, -{ "pixel_format", "pixel format", OFFSET(pixel_format), AV_OPT_TYPE_INT, -{.i64 = AV_PIX_FMT_NONE}, -1, INT_MAX, E|D|V }, +{ "pixel_format", "pixel format", OFFSET(pixel_format), AV_OPT_TYPE_PIXEL_FMT, +{.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, INT_MAX, E|D|V }, { "window_size", "window size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, -1, INT_MAX, E|D|V }, { "frame_size", "frame size", OFFSET(frame_width), AV_OPT_TYPE_IMAGE_SIZE, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cmdutils: use macros for device test
ffmpeg | branch: master | Lukasz Marek | Sat Dec 13 19:54:39 2014 +0100| [00dc2859f050133bf273236bb1b45eb477a1e2ed] | committer: Lukasz Marek cmdutils: use macros for device test Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00dc2859f050133bf273236bb1b45eb477a1e2ed --- cmdutils.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmdutils.c b/cmdutils.c index b68dae9..4e0a406 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1213,12 +1213,7 @@ static int is_device(const AVClass *avclass) { if (!avclass) return 0; -return avclass->category == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT || - avclass->category == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT || - avclass->category == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT || - avclass->category == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT || - avclass->category == AV_CLASS_CATEGORY_DEVICE_OUTPUT || - avclass->category == AV_CLASS_CATEGORY_DEVICE_INPUT; +return AV_IS_INPUT_DEVICE(avclass->category) || AV_IS_OUTPUT_DEVICE(avclass->category); } static int show_formats_devices(void *optctx, const char *opt, const char *arg, int device_only) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavd/alsa-audio-common: mark default device in device list
ffmpeg | branch: master | Lukasz Marek | Sat Dec 13 19:46:15 2014 +0100| [b3311f3cc9ffaaf7dd7806bf46a056a43c8b9371] | committer: Lukasz Marek lavd/alsa-audio-common: mark default device in device list Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3311f3cc9ffaaf7dd7806bf46a056a43c8b9371 --- libavdevice/alsa-audio-common.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c index 749897f..b7f5313 100644 --- a/libavdevice/alsa-audio-common.c +++ b/libavdevice/alsa-audio-common.c @@ -379,6 +379,8 @@ int ff_alsa_get_device_list(AVDeviceInfoList *device_list, snd_pcm_stream_t stre &device_list->nb_devices, new_device)) < 0) { goto fail; } +if (!strcmp(new_device->device_name, "default")) +device_list->default_device = device_list->nb_devices - 1; new_device = NULL; } fail: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/dv: Use av_freep() to avoid leaving stale pointers in memory
ffmpeg | branch: master | Michael Niedermayer | Mon Dec 15 00:16:49 2014 +0100| [4efdb29c75ba57cb119c04f303fd74e2fd0f0368] | committer: Michael Niedermayer avformat/dv: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4efdb29c75ba57cb119c04f303fd74e2fd0f0368 --- libavformat/dv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 4b8593d..0a893f4 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -580,7 +580,7 @@ static int dv_read_seek(AVFormatContext *s, int stream_index, static int dv_read_close(AVFormatContext *s) { RawDVContext *c = s->priv_data; -av_free(c->dv_demux); +av_freep(&c->dv_demux); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vp9/x86: 32bit and sse2 support for vp9 inverse transform assembly
ffmpeg | branch: master | Ronald S. Bultje | Mon Dec 15 00:25:10 2014 +0100| [fd77fbb3900665ae8d0d1d8bbf9345822efc3d30] | committer: Michael Niedermayer vp9/x86: 32bit and sse2 support for vp9 inverse transform assembly Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd77fbb3900665ae8d0d1d8bbf9345822efc3d30 --- libavcodec/x86/vp9dsp_init.c | 75 +- libavcodec/x86/vp9itxfm.asm | 2381 ++ 2 files changed, 1737 insertions(+), 719 deletions(-) diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c index 2790024..06e77a8 100644 --- a/libavcodec/x86/vp9dsp_init.c +++ b/libavcodec/x86/vp9dsp_init.c @@ -186,11 +186,18 @@ itxfm_func(iadst, idct, size, opt); \ itxfm_func(idct, iadst, size, opt); \ itxfm_func(iadst, iadst, size, opt) +itxfm_func(idct, idct, 4, mmxext); +itxfm_func(idct, iadst, 4, sse2); +itxfm_func(iadst, idct, 4, sse2); +itxfm_func(iadst, iadst, 4, sse2); itxfm_funcs(4, ssse3); +itxfm_funcs(8, sse2); itxfm_funcs(8, ssse3); itxfm_funcs(8, avx); +itxfm_funcs(16, sse2); itxfm_funcs(16, ssse3); itxfm_funcs(16, avx); +itxfm_func(idct, idct, 32, sse2); itxfm_func(idct, idct, 32, ssse3); itxfm_func(idct, idct, 32, avx); itxfm_func(iwht, iwht, 4, mmx); @@ -352,6 +359,7 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp) if (EXTERNAL_MMXEXT(cpu_flags)) { init_fpel(4, 1, 4, avg, mmxext); init_fpel(3, 1, 8, avg, mmxext); +dsp->itxfm_add[TX_4X4][DCT_DCT] = ff_vp9_idct_idct_4x4_add_mmxext; } if (EXTERNAL_SSE(cpu_flags)) { @@ -365,6 +373,21 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp) init_fpel(1, 1, 32, avg, sse2); init_fpel(0, 1, 64, avg, sse2); init_lpf(sse2); +dsp->itxfm_add[TX_4X4][ADST_DCT] = ff_vp9_idct_iadst_4x4_add_sse2; +dsp->itxfm_add[TX_4X4][DCT_ADST] = ff_vp9_iadst_idct_4x4_add_sse2; +dsp->itxfm_add[TX_4X4][ADST_ADST] = ff_vp9_iadst_iadst_4x4_add_sse2; +dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_sse2; +dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_sse2; +dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_sse2; +dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_sse2; +dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_sse2; +dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_sse2; +dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_sse2; +dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_sse2; +dsp->itxfm_add[TX_32X32][ADST_ADST] = +dsp->itxfm_add[TX_32X32][ADST_DCT] = +dsp->itxfm_add[TX_32X32][DCT_ADST] = +dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_sse2; dsp->intra_pred[TX_16X16][VERT_PRED] = ff_vp9_ipred_v_16x16_sse2; dsp->intra_pred[TX_32X32][VERT_PRED] = ff_vp9_ipred_v_32x32_sse2; } @@ -376,20 +399,18 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp) dsp->itxfm_add[TX_4X4][ADST_DCT] = ff_vp9_idct_iadst_4x4_add_ssse3; dsp->itxfm_add[TX_4X4][DCT_ADST] = ff_vp9_iadst_idct_4x4_add_ssse3; dsp->itxfm_add[TX_4X4][ADST_ADST] = ff_vp9_iadst_iadst_4x4_add_ssse3; -if (ARCH_X86_64) { -dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_ssse3; -dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_ssse3; -dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_ssse3; -dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_ssse3; -dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_ssse3; -dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_ssse3; -dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_ssse3; -dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_ssse3; -dsp->itxfm_add[TX_32X32][ADST_ADST] = -dsp->itxfm_add[TX_32X32][ADST_DCT] = -dsp->itxfm_add[TX_32X32][DCT_ADST] = -dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_ssse3; -} +dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_ssse3; +dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_ssse3; +dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_ssse3; +dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_ssse3; +dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_ssse3; +dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_ssse3; +dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_ssse3; +dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_ssse3; +dsp->itxfm_add[TX_32X32][ADST_ADST] = +d
[FFmpeg-cvslog] lavf/mxfdec: Factorize mxf_read_close().
ffmpeg | branch: master | Carl Eugen Hoyos | Mon Dec 15 01:31:12 2014 +0100| [27bdfd29f14afc283a093372e1527fc293f7ef8b] | committer: Carl Eugen Hoyos lavf/mxfdec: Factorize mxf_read_close(). This will allow to fix leaks in a subsequent commit. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27bdfd29f14afc283a093372e1527fc293f7ef8b --- libavformat/mxfdec.c | 62 +++--- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 6c104b9..894eac7 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -282,6 +282,38 @@ static const uint8_t mxf_sony_mpeg4_extradata[] = { 0x06,0x0e,0x2b,0x #define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y))) +static void mxf_free_metadataset(MXFMetadataSet **ctx) +{ +MXFIndexTableSegment *seg; +switch ((*ctx)->type) { +case Descriptor: +av_freep(&((MXFDescriptor *)*ctx)->extradata); +break; +case MultipleDescriptor: +av_freep(&((MXFDescriptor *)*ctx)->sub_descriptors_refs); +break; +case Sequence: +av_freep(&((MXFSequence *)*ctx)->structural_components_refs); +break; +case EssenceGroup: +av_freep(&((MXFEssenceGroup *)*ctx)->structural_components_refs); +break; +case SourcePackage: +case MaterialPackage: +av_freep(&((MXFPackage *)*ctx)->tracks_refs); +av_freep(&((MXFPackage *)*ctx)->name); +break; +case IndexTableSegment: +seg = (MXFIndexTableSegment *)*ctx; +av_freep(&seg->temporal_offset_entries); +av_freep(&seg->flag_entries); +av_freep(&seg->stream_offset_entries); +default: +break; +} +av_freep(ctx); +} + static int64_t klv_decode_ber_length(AVIOContext *pb) { uint64_t size = avio_r8(pb); @@ -2831,7 +2863,6 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) static int mxf_read_close(AVFormatContext *s) { MXFContext *mxf = s->priv_data; -MXFIndexTableSegment *seg; int i; av_freep(&mxf->packages_refs); @@ -2840,34 +2871,7 @@ static int mxf_read_close(AVFormatContext *s) s->streams[i]->priv_data = NULL; for (i = 0; i < mxf->metadata_sets_count; i++) { -switch (mxf->metadata_sets[i]->type) { -case Descriptor: -av_freep(&((MXFDescriptor *)mxf->metadata_sets[i])->extradata); -break; -case MultipleDescriptor: -av_freep(&((MXFDescriptor *)mxf->metadata_sets[i])->sub_descriptors_refs); -break; -case Sequence: -av_freep(&((MXFSequence *)mxf->metadata_sets[i])->structural_components_refs); -break; -case EssenceGroup: -av_freep(&((MXFEssenceGroup *)mxf->metadata_sets[i])->structural_components_refs); -break; -case SourcePackage: -case MaterialPackage: -av_freep(&((MXFPackage *)mxf->metadata_sets[i])->tracks_refs); -av_freep(&((MXFPackage *)mxf->metadata_sets[i])->name); -break; -case IndexTableSegment: -seg = (MXFIndexTableSegment *)mxf->metadata_sets[i]; -av_freep(&seg->temporal_offset_entries); -av_freep(&seg->flag_entries); -av_freep(&seg->stream_offset_entries); -break; -default: -break; -} -av_freep(&mxf->metadata_sets[i]); +mxf_free_metadataset(mxf->metadata_sets + i); } av_freep(&mxf->partitions); av_freep(&mxf->metadata_sets); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mxfdec: Fix memleaks reading corrupt files.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon Dec 15 01:33:13 2014 +0100| [4373a25d94dba2cb361aa18e8d70806e1894df81] | committer: Carl Eugen Hoyos lavf/mxfdec: Fix memleaks reading corrupt files. Fixes ticket #4173. Reviewed-by: Tomas Härdin > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4373a25d94dba2cb361aa18e8d70806e1894df81 --- libavformat/mxfdec.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 894eac7..4715169 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -863,8 +863,11 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg if (!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, sizeof(*segment->temporal_offset_entries))) || !(segment->flag_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) || -!(segment->stream_offset_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->stream_offset_entries +!(segment->stream_offset_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->stream_offset_entries { +av_freep(&segment->temporal_offset_entries); +av_freep(&segment->flag_entries); return AVERROR(ENOMEM); +} for (i = 0; i < segment->nb_index_entries; i++) { segment->temporal_offset_entries[i] = avio_r8(pb); @@ -2168,16 +2171,20 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF } } } -if (ctx_size && tag == 0x3C0A) +if (ctx_size && tag == 0x3C0A) { avio_read(pb, ctx->uid, 16); -else if ((ret = read_child(ctx, pb, tag, size, uid, -1)) < 0) +} else if ((ret = read_child(ctx, pb, tag, size, uid, -1)) < 0) { +mxf_free_metadataset(&ctx); return ret; +} /* Accept the 64k local set limit being exceeded (Avid). Don't accept * it extending past the end of the KLV though (zzuf5.mxf). */ if (avio_tell(pb) > klv_end) { -if (ctx_size) -av_free(ctx); +if (ctx_size) { +ctx->type = type; +mxf_free_metadataset(&ctx); +} av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x extends past end of local set @ %#"PRIx64"\n", @@ -2565,7 +2572,8 @@ static int mxf_read_header(AVFormatContext *s) /* FIXME avoid seek */ if (!essence_offset) { av_log(s, AV_LOG_ERROR, "no essence\n"); -return AVERROR_INVALIDDATA; +ret = AVERROR_INVALIDDATA; +goto fail; } avio_seek(s->pb, essence_offset, SEEK_SET); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vp9/x86: sse2 MC assembly.
ffmpeg | branch: master | Ronald S. Bultje | Sun Dec 14 20:13:24 2014 -0500| [cae893f692bf848872b2e37be5ddb9d8a24644eb] | committer: Michael Niedermayer vp9/x86: sse2 MC assembly. Also a slight change to the ssse3 code, which prevents a theoretical overflow in the sharp filter. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cae893f692bf848872b2e37be5ddb9d8a24644eb --- libavcodec/x86/vp9dsp_init.c | 183 --- libavcodec/x86/vp9mc.asm | 246 ++ 2 files changed, 323 insertions(+), 106 deletions(-) diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c index 06e77a8..37173fb 100644 --- a/libavcodec/x86/vp9dsp_init.c +++ b/libavcodec/x86/vp9dsp_init.c @@ -49,31 +49,33 @@ fpel_func(avg, 32, avx2); fpel_func(avg, 64, avx2); #undef fpel_func -#define mc_func(avg, sz, dir, opt) \ +#define mc_func(avg, sz, dir, opt, type, f_sz) \ void ff_vp9_##avg##_8tap_1d_##dir##_##sz##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ const uint8_t *src, ptrdiff_t src_stride, \ - int h, const int8_t (*filter)[32]) -#define mc_funcs(sz, opt) \ -mc_func(put, sz, h, opt); \ -mc_func(avg, sz, h, opt); \ -mc_func(put, sz, v, opt); \ -mc_func(avg, sz, v, opt) - -mc_funcs(4, ssse3); -mc_funcs(8, ssse3); + int h, const type (*filter)[f_sz]) +#define mc_funcs(sz, opt, type, fsz) \ +mc_func(put, sz, h, opt, type, fsz); \ +mc_func(avg, sz, h, opt, type, fsz); \ +mc_func(put, sz, v, opt, type, fsz); \ +mc_func(avg, sz, v, opt, type, fsz) + +mc_funcs(4, mmxext, int16_t, 8); +mc_funcs(8, sse2, int16_t, 8); +mc_funcs(4, ssse3, int8_t, 32); +mc_funcs(8, ssse3, int8_t, 32); #if ARCH_X86_64 -mc_funcs(16, ssse3); -mc_funcs(32, avx2); +mc_funcs(16, ssse3, int8_t, 32); +mc_funcs(32, avx2, int8_t, 32); #endif #undef mc_funcs #undef mc_func -#define mc_rep_func(avg, sz, hsz, dir, opt) \ +#define mc_rep_func(avg, sz, hsz, dir, opt, type, f_sz) \ static av_always_inline void \ ff_vp9_##avg##_8tap_1d_##dir##_##sz##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ const uint8_t *src, ptrdiff_t src_stride, \ -int h, const int8_t (*filter)[32]) \ +int h, const type (*filter)[f_sz]) \ { \ ff_vp9_##avg##_8tap_1d_##dir##_##hsz##_##opt(dst, dst_stride, src, \ src_stride, h, filter); \ @@ -81,95 +83,103 @@ ff_vp9_##avg##_8tap_1d_##dir##_##sz##_##opt(uint8_t *dst, ptrdiff_t dst_stride, src_stride, h, filter); \ } -#define mc_rep_funcs(sz, hsz, opt) \ -mc_rep_func(put, sz, hsz, h, opt); \ -mc_rep_func(avg, sz, hsz, h, opt); \ -mc_rep_func(put, sz, hsz, v, opt); \ -mc_rep_func(avg, sz, hsz, v, opt) +#define mc_rep_funcs(sz, hsz, opt, type, fsz) \ +mc_rep_func(put, sz, hsz, h, opt, type, fsz); \ +mc_rep_func(avg, sz, hsz, h, opt, type, fsz); \ +mc_rep_func(put, sz, hsz, v, opt, type, fsz); \ +mc_rep_func(avg, sz, hsz, v, opt, type, fsz) +mc_rep_funcs(16, 8, sse2, int16_t, 8); #if ARCH_X86_32 -mc_rep_funcs(16, 8, ssse3); +mc_rep_funcs(16, 8, ssse3, int8_t, 32); #endif -mc_rep_funcs(32, 16, ssse3); -mc_rep_funcs(64, 32, ssse3); +mc_rep_funcs(32, 16, sse2, int16_t, 8); +mc_rep_funcs(32, 16, ssse3, int8_t, 32); +mc_rep_funcs(64, 32, sse2, int16_t, 8); +mc_rep_funcs(64, 32, ssse3, int8_t, 32); #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL -mc_rep_funcs(64, 32, avx2); +mc_rep_funcs(64, 32, avx2, int8_t, 32); #endif #undef mc_rep_funcs #undef mc_rep_func extern const int8_t ff_filters_ssse3[3][15][4][32]; +extern const int16_t ff_filters_sse2[3][15][8][8]; -#define filter_8tap_2d_fn(op, sz, f, fname, align, opt) \ +#define filter_8tap_2d_fn(op, sz, f, f_opt, fname, align, opt) \ static void op##_8tap_##fname##_##sz##hv_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ const uint8_t *src, ptrdiff_t src_stride, \ int h, int mx, int my) \ { \ LOCAL_ALIGNED_##align(uint8_t, temp, [71 * 64]); \ ff_vp9_put_8tap_1d_h_##sz##_##opt(temp, 64, src - 3 * src_stride, src_stride, \ - h + 7, ff_filters_ssse3[f][mx - 1]); \ + h + 7, ff_filters_##f_opt[f][mx - 1]); \ ff_vp9_##op##_8tap_1d_v_##sz##_##opt(dst, dst_stride, temp + 3 * 64, 64, \ - h, ff_filters_ssse3[f][my - 1]); \ + h, ff_filters_##f_opt[f][my - 1]); \ } -#define filters_8tap_2d_fn(op, sz, align, opt) \ -filter_8tap_2d_fn(op, sz, FILTER_8TAP_REGULAR, regular, align, opt) \ -filter_8tap_2d_fn(op, sz, FILTER_8TAP_S
[FFmpeg-cvslog] configure: Set the default for --shlibdir to --libdir.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon Dec 15 02:49:12 2014 +0100| [4fa42e04ed48a2a9ec5bff6cff9355e410dda574] | committer: Carl Eugen Hoyos configure: Set the default for --shlibdir to --libdir. Fixes ticket #4183. Reviewed-by: Ivan Kalvachev > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fa42e04ed48a2a9ec5bff6cff9355e410dda574 --- configure |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e2e3619..0ec1a7c 100755 --- a/configure +++ b/configure @@ -84,7 +84,7 @@ Standard options: --datadir=DIRinstall data files in DIR [PREFIX/share/ffmpeg] --docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg] --libdir=DIR install libs in DIR [PREFIX/lib] - --shlibdir=DIR install shared libs in DIR [PREFIX/lib] + --shlibdir=DIR install shared libs in DIR [LIBDIR] --incdir=DIR install includes in DIR [PREFIX/include] --mandir=DIR install man page in DIR [PREFIX/share/man] --enable-rpath use rpath to allow installing libraries in paths @@ -2685,7 +2685,7 @@ docdir_default='${prefix}/share/doc/ffmpeg' incdir_default='${prefix}/include' libdir_default='${prefix}/lib' mandir_default='${prefix}/share/man' -shlibdir_default="$libdir_default" +shlibdir_default='${LIBDIR}' # toolchain ar_default="ar" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavu/frame: fix malloc error path in av_frame_copy_props()
ffmpeg | branch: master | wm4 | Mon Dec 15 04:32:58 2014 +0100| [a400edbb6d00c0211de38e4f1b4f593681db91d8] | committer: Michael Niedermayer lavu/frame: fix malloc error path in av_frame_copy_props() The error path frees all side data, but forgets to reset the side data count. This can blow up later in av_frame_unref() and free_side_data(). Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a400edbb6d00c0211de38e4f1b4f593681db91d8 --- libavutil/frame.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index 4ee0630..5c9aa29 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -503,6 +503,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) free_side_data(&dst->side_data[i]); } av_freep(&dst->side_data); +dst->nb_side_data = 0; return AVERROR(ENOMEM); } memcpy(sd_dst->data, sd_src->data, sd_src->size); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog