Re: [FFmpeg-cvslog] lavf: use initial_padding instead of deprecated delay

2014-10-14 Thread Michael Niedermayer
On Tue, Oct 14, 2014 at 12:29:38AM -0400, compn wrote:
> On Tue, 14 Oct 2014 03:41:38 +0200 (CEST)
> g...@videolan.org (Anton Khirnov) wrote:
> 
> > lavf: use initial_padding instead of deprecated delay
> >  libavformat/matroskaenc.c |7 ---
> >  libavformat/oggenc.c  |5 -
> 
> 
> shouldnt this say 'use initial_padding instead of deprecated delay in
> mkv and ogg' ?

yes but we cannot change the commit messages of merged commits


> 
> are those the only two still using delay padding ?

they and mp3 where all muxers that used it

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


signature.asc
Description: Digital signature
___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfilter/vf_pp: add gbrp support

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
17:15:56 2014 +0200| [5ee6fb758329ce3fbd52678d48eb14d1c53f89b8] | committer: 
Michael Niedermayer

avfilter/vf_pp: add gbrp support

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ee6fb758329ce3fbd52678d48eb14d1c53f89b8
---

 libavfilter/version.h |2 +-
 libavfilter/vf_pp.c   |2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/version.h b/libavfilter/version.h
index f3448ed..5d97f65 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFILTER_VERSION_MAJOR  5
 #define LIBAVFILTER_VERSION_MINOR  1
-#define LIBAVFILTER_VERSION_MICRO 105
+#define LIBAVFILTER_VERSION_MICRO 106
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/vf_pp.c b/libavfilter/vf_pp.c
index 162604d..e33ac48 100644
--- a/libavfilter/vf_pp.c
+++ b/libavfilter/vf_pp.c
@@ -79,6 +79,7 @@ static int pp_query_formats(AVFilterContext *ctx)
 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P,
 AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVJ422P,
 AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_GBRP,
 AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P,
 AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P,
 AV_PIX_FMT_GRAY8,
@@ -100,6 +101,7 @@ static int pp_config_props(AVFilterLink *inlink)
 case AV_PIX_FMT_YUVJ422P:
 case AV_PIX_FMT_YUV422P: flags |= PP_FORMAT_422; break;
 case AV_PIX_FMT_YUV411P: flags |= PP_FORMAT_411; break;
+case AV_PIX_FMT_GBRP:
 case AV_PIX_FMT_YUVJ444P:
 case AV_PIX_FMT_YUV444P: flags |= PP_FORMAT_444; break;
 case AV_PIX_FMT_YUVJ440P:

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
18:29:49 2014 +0200| [fd367668e14462b875960fd52cccaf490f24be92] | committer: 
Michael Niedermayer

avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd367668e14462b875960fd52cccaf490f24be92
---

 libavcodec/flac_parser.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index a031dbf..0e45ab0 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -724,7 +724,7 @@ static void flac_parse_close(AVCodecParserContext *c)
 curr = temp;
 }
 av_fifo_freep(&fpc->fifo_buf);
-av_free(fpc->wrap_buf);
+av_freep(&fpc->wrap_buf);
 }
 
 AVCodecParser ff_flac_parser = {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/iirfilter: Change ff_iir_filter_free_coeffs() so it clears the pointers as well

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
18:30:52 2014 +0200| [43fb16cf74718fe6c393c5f20d0bfaea4e3e8cb4] | committer: 
Michael Niedermayer

avcodec/iirfilter: Change ff_iir_filter_free_coeffs() so it clears the pointers 
as well

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43fb16cf74718fe6c393c5f20d0bfaea4e3e8cb4
---

 libavcodec/iirfilter.c |   13 +++--
 libavcodec/iirfilter.h |2 +-
 libavcodec/psymodel.c  |2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c
index a2d9d11..b47f91d 100644
--- a/libavcodec/iirfilter.c
+++ b/libavcodec/iirfilter.c
@@ -196,7 +196,7 @@ av_cold struct FFIIRFilterCoeffs* 
ff_iir_filter_init_coeffs(void *avc,
 return c;
 
 init_fail:
-ff_iir_filter_free_coeffs(c);
+ff_iir_filter_free_coeffsp(&c);
 return NULL;
 }
 
@@ -304,13 +304,14 @@ av_cold void ff_iir_filter_free_state(struct 
FFIIRFilterState *state)
 av_free(state);
 }
 
-av_cold void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs)
+av_cold void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffsp)
 {
+struct FFIIRFilterCoeffs *coeffs = *coeffsp;
 if(coeffs){
-av_free(coeffs->cx);
-av_free(coeffs->cy);
+av_freep(&coeffs->cx);
+av_freep(&coeffs->cy);
 }
-av_free(coeffs);
+av_freep(coeffsp);
 }
 
 void ff_iir_filter_init(FFIIRFilterContext *f) {
@@ -347,7 +348,7 @@ int main(void)
 for (i = 0; i < SIZE; i++)
 printf("%6d %6d\n", x[i], y[i]);
 
-ff_iir_filter_free_coeffs(fcoeffs);
+ff_iir_filter_free_coeffsp(&fcoeffs);
 ff_iir_filter_free_state(fstate);
 return 0;
 }
diff --git a/libavcodec/iirfilter.h b/libavcodec/iirfilter.h
index 4ea6642..cc9a661 100644
--- a/libavcodec/iirfilter.h
+++ b/libavcodec/iirfilter.h
@@ -104,7 +104,7 @@ struct FFIIRFilterState* ff_iir_filter_init_state(int 
order);
  *
  * @param coeffs pointer allocated with ff_iir_filter_init_coeffs()
  */
-void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs);
+void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffs);
 
 /**
  * Free filter state.
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index 22d2497..e7f3353 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -138,7 +138,7 @@ void ff_psy_preprocess(struct FFPsyPreprocessContext *ctx, 
float **audio, int ch
 av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
 {
 int i;
-ff_iir_filter_free_coeffs(ctx->fcoeffs);
+ff_iir_filter_free_coeffsp(&ctx->fcoeffs);
 if (ctx->fstate)
 for (i = 0; i < ctx->avctx->channels; i++)
 ff_iir_filter_free_state(ctx->fstate[i]);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
18:30:15 2014 +0200| [9946da49766384dd6e25585160da0b454d4a5cbc] | committer: 
Michael Niedermayer

avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9946da49766384dd6e25585160da0b454d4a5cbc
---

 libavcodec/flashsvenc.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 7ad15f1..a6d7caa 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -94,9 +94,9 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx)
 
 deflateEnd(&s->zstream);
 
-av_free(s->encbuffer);
-av_free(s->previous_frame);
-av_free(s->tmpblock);
+av_freep(&s->encbuffer);
+av_freep(&s->previous_frame);
+av_freep(&s->tmpblock);
 
 av_frame_free(&avctx->coded_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/iirfilter: Make ff_iir_filter_free_state() also zero the freed pointer

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
18:52:51 2014 +0200| [f43ac027232f6aeb826d7c29b1dfca9b3876f3ed] | committer: 
Michael Niedermayer

avcodec/iirfilter: Make ff_iir_filter_free_state() also zero the freed pointer

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f43ac027232f6aeb826d7c29b1dfca9b3876f3ed
---

 libavcodec/iirfilter.c |6 +++---
 libavcodec/iirfilter.h |6 +++---
 libavcodec/psymodel.c  |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c
index b47f91d..cb5871c 100644
--- a/libavcodec/iirfilter.c
+++ b/libavcodec/iirfilter.c
@@ -299,9 +299,9 @@ void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *c,
 }
 }
 
-av_cold void ff_iir_filter_free_state(struct FFIIRFilterState *state)
+av_cold void ff_iir_filter_free_statep(struct FFIIRFilterState **state)
 {
-av_free(state);
+av_freep(state);
 }
 
 av_cold void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffsp)
@@ -349,7 +349,7 @@ int main(void)
 printf("%6d %6d\n", x[i], y[i]);
 
 ff_iir_filter_free_coeffsp(&fcoeffs);
-ff_iir_filter_free_state(fstate);
+ff_iir_filter_free_statep(&fstate);
 return 0;
 }
 #endif /* TEST */
diff --git a/libavcodec/iirfilter.h b/libavcodec/iirfilter.h
index cc9a661..6f7bba6 100644
--- a/libavcodec/iirfilter.h
+++ b/libavcodec/iirfilter.h
@@ -107,11 +107,11 @@ struct FFIIRFilterState* ff_iir_filter_init_state(int 
order);
 void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffs);
 
 /**
- * Free filter state.
+ * Free and zero filter state.
  *
- * @param state pointer allocated with ff_iir_filter_init_state()
+ * @param state pointer to pointer allocated with ff_iir_filter_init_state()
  */
-void ff_iir_filter_free_state(struct FFIIRFilterState *state);
+void ff_iir_filter_free_statep(struct FFIIRFilterState **state);
 
 /**
  * Perform IIR filtering on signed 16-bit input samples.
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index e7f3353..059cbef 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -141,7 +141,7 @@ av_cold void ff_psy_preprocess_end(struct 
FFPsyPreprocessContext *ctx)
 ff_iir_filter_free_coeffsp(&ctx->fcoeffs);
 if (ctx->fstate)
 for (i = 0; i < ctx->avctx->channels; i++)
-ff_iir_filter_free_state(ctx->fstate[i]);
+ff_iir_filter_free_statep(&ctx->fstate[i]);
 av_freep(&ctx->fstate);
 av_free(ctx);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] movenc: Write tfdt atoms

2014-10-14 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Mon Oct  6 
23:20:50 2014 +0300| [c2c22c75cf89e2faab34d1ee1d392cfb065439ea] | committer: 
Martin Storsjö

movenc: Write tfdt atoms

These allow getting the absolute start timestamp of a fragment
without reading preceding timestamps. This fixes sync between
tracks if starting from fragments in different streams that don't
align exactly.

This also is a prerequisite for producing DASH content.

Signed-off-by: Martin Storsjö 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2c22c75cf89e2faab34d1ee1d392cfb065439ea
---

 libavformat/movenc.c |   13 +
 1 file changed, 13 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d8dc62a..d84ddbe 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2550,6 +2550,18 @@ static int mov_write_tfrf_tags(AVIOContext *pb, 
MOVMuxContext *mov,
 return 0;
 }
 
+static int mov_write_tfdt_tag(AVIOContext *pb, MOVTrack *track)
+{
+int64_t pos = avio_tell(pb);
+
+avio_wb32(pb, 0); /* size */
+ffio_wfourcc(pb, "tfdt");
+avio_w8(pb, 1); /* version */
+avio_wb24(pb, 0);
+avio_wb64(pb, track->frag_start);
+return update_size(pb, pos);
+}
+
 static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov,
   MOVTrack *track, int64_t moof_offset,
   int moof_size)
@@ -2559,6 +2571,7 @@ static int mov_write_traf_tag(AVIOContext *pb, 
MOVMuxContext *mov,
 ffio_wfourcc(pb, "traf");
 
 mov_write_tfhd_tag(pb, mov, track, moof_offset);
+mov_write_tfdt_tag(pb, track);
 mov_write_trun_tag(pb, mov, track, moof_size);
 if (mov->mode == MODE_ISM) {
 mov_write_tfxd_tag(pb, track);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
21:51:33 2014 +0200| [99c26805e9e853937aa443c5f94303a261adc01d] | committer: 
Michael Niedermayer

Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'

* commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea':
  movenc: Write tfdt atoms

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99c26805e9e853937aa443c5f94303a261adc01d
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mov: Handle tfdt atoms

2014-10-14 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Sun Oct 12 
01:24:26 2014 +0300| [a74f8121d88e0bdf0d69c22e4b3713032da9300a] | committer: 
Martin Storsjö

mov: Handle tfdt atoms

Signed-off-by: Martin Storsjö 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a74f8121d88e0bdf0d69c22e4b3713032da9300a
---

 libavformat/mov.c |   31 +++
 1 file changed, 31 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d4281dc..2b64cbf 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2618,6 +2618,36 @@ static int mov_read_trex(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 return 0;
 }
 
+static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom)
+{
+MOVFragment *frag = &c->fragment;
+AVStream *st = NULL;
+MOVStreamContext *sc;
+int version, i;
+
+for (i = 0; i < c->fc->nb_streams; i++) {
+if (c->fc->streams[i]->id == frag->track_id) {
+st = c->fc->streams[i];
+break;
+}
+}
+if (!st) {
+av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id 
%d\n", frag->track_id);
+return AVERROR_INVALIDDATA;
+}
+sc = st->priv_data;
+if (sc->pseudo_stream_id + 1 != frag->stsd_id)
+return 0;
+version = avio_r8(pb);
+avio_rb24(pb); /* flags */
+if (version) {
+sc->track_end = avio_rb64(pb);
+} else {
+sc->track_end = avio_rb32(pb);
+}
+return 0;
+}
+
 static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
 MOVFragment *frag = &c->fragment;
@@ -2870,6 +2900,7 @@ static const MOVParseTableEntry mov_default_parse_table[] 
= {
 { MKTAG('s','t','t','s'), mov_read_stts },
 { MKTAG('s','t','z','2'), mov_read_stsz }, /* compact sample size */
 { MKTAG('t','k','h','d'), mov_read_tkhd }, /* track header */
+{ MKTAG('t','f','d','t'), mov_read_tfdt },
 { MKTAG('t','f','h','d'), mov_read_tfhd }, /* track fragment header */
 { MKTAG('t','r','a','k'), mov_read_trak },
 { MKTAG('t','r','a','f'), mov_read_default },

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a'

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Oct 14 
22:23:01 2014 +0200| [5552594a4466c1c9d283cb4943aeea34a12ed969] | committer: 
Michael Niedermayer

Merge commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a'

* commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a':
  mov: Handle tfdt atoms

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5552594a4466c1c9d283cb4943aeea34a12ed969
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/mxfdec: cleanup if parsing the header metadata fails

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Oct 15 
02:20:58 2014 +0200| [676110e6d4c455acac4f234d79ab57996d43a8e7] | committer: 
Michael Niedermayer

avformat/mxfdec: cleanup if parsing the header metadata fails

Fixes memleaks
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=676110e6d4c455acac4f234d79ab57996d43a8e7
---

 libavformat/mxfdec.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 05ac0a1..94fe7d4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2294,7 +2294,8 @@ static int mxf_read_header(AVFormatContext *s)
 }
 if (res < 0) {
 av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
-return res;
+ret = res;
+goto fail;
 }
 break;
 } else {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/mxfdec: Fix termination of mxf_data_essence_container_uls

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Oct 15 
01:36:04 2014 +0200| [e3b28f10bb9b6750c97ee282a7e656d60d6d9e34] | committer: 
Michael Niedermayer

avformat/mxfdec: Fix termination of mxf_data_essence_container_uls

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3b28f10bb9b6750c97ee282a7e656d60d6d9e34
---

 libavformat/mxfdec.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index ef4c4ec..25240e7 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1012,7 +1012,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] 
= {
 
 static const MXFCodecUL mxf_data_essence_container_uls[] = {
 { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 
}, 16, 0 },
-{ { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 
}, 16, AV_CODEC_ID_NONE },
+{ { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 
},  0, AV_CODEC_ID_NONE },
 };
 
 static const char* const mxf_data_essence_descriptor[] = {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/mxfdec: Fix memleak of primer_packs

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Oct 15 
02:16:18 2014 +0200| [aae4f5108d04041bb264a9c547f05c4f0d18c9c7] | committer: 
Michael Niedermayer

avformat/mxfdec: Fix memleak of primer_packs

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aae4f5108d04041bb264a9c547f05c4f0d18c9c7
---

 libavformat/mxfdec.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 25240e7..19c6374 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -426,6 +426,10 @@ static int mxf_read_primer_pack(void *arg, AVIOContext 
*pb, int tag, int size, U
 av_log(mxf->fc, AV_LOG_ERROR, "item_num %d is too large\n", item_num);
 return AVERROR_INVALIDDATA;
 }
+if (mxf->local_tags)
+av_log(mxf->fc, AV_LOG_VERBOSE, "Multiple primer packs\n");
+av_free(mxf->local_tags);
+mxf->local_tags_count = 0;
 mxf->local_tags = av_calloc(item_num, item_len);
 if (!mxf->local_tags)
 return AVERROR(ENOMEM);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/mxfdec: Fix memleak of packages_refs

2014-10-14 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Oct 15 
02:16:18 2014 +0200| [0834f2056c7f1a0c09129802a003465e0ebcc9b8] | committer: 
Michael Niedermayer

avformat/mxfdec: Fix memleak of packages_refs

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0834f2056c7f1a0c09129802a003465e0ebcc9b8
---

 libavformat/mxfdec.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 19c6374..05ac0a1 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -624,6 +624,9 @@ static int mxf_read_content_storage(void *arg, AVIOContext 
*pb, int tag, int siz
 MXFContext *mxf = arg;
 switch (tag) {
 case 0x1901:
+if (mxf->packages_refs)
+av_log(mxf->fc, AV_LOG_VERBOSE, "Multiple packages_refs\n");
+av_free(mxf->packages_refs);
 mxf->packages_count = avio_rb32(pb);
 mxf->packages_refs = av_calloc(mxf->packages_count, sizeof(UID));
 if (!mxf->packages_refs)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog