[FFmpeg-cvslog] configure: Let the libx264rgb encoder select the libx264 encoder.

2014-12-08 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Mon Dec  8 
10:43:12 2014 +0100| [3f24dacf810e214440d691dcbc7231905c736ebb] | committer: 
Carl Eugen Hoyos

configure: Let the libx264rgb encoder select the libx264 encoder.

Standalone compilation of the libx264rgb encoder does not work.

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

 configure |1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 6b0a91f..40d5428 100755
--- a/configure
+++ b/configure
@@ -2391,6 +2391,7 @@ libwavpack_encoder_deps="libwavpack"
 libwebp_encoder_deps="libwebp"
 libx264_encoder_deps="libx264"
 libx264rgb_encoder_deps="libx264"
+libx264rgb_encoder_select="libx264_encoder"
 libx265_encoder_deps="libx265"
 libxavs_encoder_deps="libxavs"
 libxvid_encoder_deps="libxvid"

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


[FFmpeg-cvslog] rtpproto: Write a warning if the input data written isn't RTP packetized

2014-12-08 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Sun Dec  7 
01:42:06 2014 +0200| [29bc7bfba288ff8572ed967a8752a1dbde7b724b] | committer: 
Martin Storsjö

rtpproto: Write a warning if the input data written isn't RTP packetized

Tell the user that the RTP muxer needs to be used to packetize
the data - using the RTP protocol on its own isn't enough.

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index d5ecfc8..1171fc2 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -411,6 +411,10 @@ static int rtp_write(URLContext *h, const uint8_t *buf, 
int size)
 if (size < 2)
 return AVERROR(EINVAL);
 
+if (buf[0] != (RTP_VERSION << 6))
+av_log(h, AV_LOG_WARNING, "Data doesn't look like RTP packets, "
+  "make sure the RTP muxer is used\n");
+
 if (s->write_to_source) {
 int fd;
 struct sockaddr_storage *source, temp_source;

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


[FFmpeg-cvslog] Merge commit '29bc7bfba288ff8572ed967a8752a1dbde7b724b'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
12:14:47 2014 +0100| [5ab467043a2b4df10e2731d3ac9ba39039386228] | committer: 
Michael Niedermayer

Merge commit '29bc7bfba288ff8572ed967a8752a1dbde7b724b'

* commit '29bc7bfba288ff8572ed967a8752a1dbde7b724b':
  rtpproto: Write a warning if the input data written isn't RTP packetized

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] arm: fft_vfp: Add a missing "endconst" when building in thumb mode

2014-12-08 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Sun Nov 16 
12:38:53 2014 +0200| [ae81576414f2d2083d3118fb4abe1ebc5a7a4c54] | committer: 
Martin Storsjö

arm: fft_vfp: Add a missing "endconst" when building in thumb mode

Signed-off-by: Martin Storsjö 

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

 libavcodec/arm/fft_vfp.S |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/arm/fft_vfp.S b/libavcodec/arm/fft_vfp.S
index 130d529..91b833b 100644
--- a/libavcodec/arm/fft_vfp.S
+++ b/libavcodec/arm/fft_vfp.S
@@ -54,6 +54,7 @@ T const fft_tab_vfp
 .word   fft32768_vfp
 .word   fft65536_vfp
 A endfunc
+T endconst
 
 function fft4_vfp
 vldrd0, [a1, #0*2*4]   @ s0,s1   = z[0]

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


[FFmpeg-cvslog] Merge commit 'ae81576414f2d2083d3118fb4abe1ebc5a7a4c54'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
12:24:43 2014 +0100| [8554a10992de7b756e555a9a2b90590490e1fad7] | committer: 
Michael Niedermayer

Merge commit 'ae81576414f2d2083d3118fb4abe1ebc5a7a4c54'

* commit 'ae81576414f2d2083d3118fb4abe1ebc5a7a4c54':
  arm: fft_vfp: Add a missing "endconst" when building in thumb mode

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'b280c6202b28b371a8d96850194fd69d7ad5dcc0'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
12:31:54 2014 +0100| [5054d2a92ba77ed6ffc597045e80a89fe8b7bdc6] | committer: 
Michael Niedermayer

Merge commit 'b280c6202b28b371a8d96850194fd69d7ad5dcc0'

* commit 'b280c6202b28b371a8d96850194fd69d7ad5dcc0':
  arm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] arm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb

2014-12-08 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Sun Nov 16 
12:46:51 2014 +0200| [b280c6202b28b371a8d96850194fd69d7ad5dcc0] | committer: 
Martin Storsjö

arm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb

Don't include the function pointer table in the code segment
in arm mode.

This shouldn't have any significant performance effect. It does
end up as a few more instructions than before, for ARM, but
only at the entry to this function, not within the fft functions
themselves.

Signed-off-by: Martin Storsjö 

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

 libavcodec/arm/fft_vfp.S |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/libavcodec/arm/fft_vfp.S b/libavcodec/arm/fft_vfp.S
index 91b833b..9c7b54e 100644
--- a/libavcodec/arm/fft_vfp.S
+++ b/libavcodec/arm/fft_vfp.S
@@ -30,14 +30,10 @@
 function ff_fft_calc_vfp, export=1
 ldr ip, [a1, #0]@ nbits
 mov a1, a2
-A   ldr pc, [pc, ip, lsl #2]
-A   .word   0
-A   .word   0
-A   .word   0
-T   movrel  a2, (fft_tab_vfp - 8)
-T   ldr pc, [a2, ip, lsl #2]
-T endfunc
-T const fft_tab_vfp
+movrel  a2, (fft_tab_vfp - 8)
+ldr pc, [a2, ip, lsl #2]
+endfunc
+const fft_tab_vfp
 .word   fft4_vfp
 .word   fft8_vfp
 .word   X(ff_fft16_vfp) @ this one alone is exported
@@ -53,8 +49,7 @@ T const fft_tab_vfp
 .word   fft16384_vfp
 .word   fft32768_vfp
 .word   fft65536_vfp
-A endfunc
-T endconst
+endconst
 
 function fft4_vfp
 vldrd0, [a1, #0*2*4]   @ s0,s1   = z[0]

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


[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 8704d12 web/security: add CVEs to 2.5, 2.4.4, 2.3.5, 2.1.6

2014-12-08 Thread gitolite
The branch, master has been updated
   via  8704d1247627a085cc7cd339a5a19e1cbc16e06c (commit)
  from  5e6ad7e618b59b6500ae171ee5f8297f2aa227f9 (commit)


- Log -
commit 8704d1247627a085cc7cd339a5a19e1cbc16e06c
Author: Michael Niedermayer 
AuthorDate: Mon Dec 8 14:48:29 2014 +0100
Commit: Michael Niedermayer 
CommitDate: Mon Dec 8 14:49:51 2014 +0100

web/security: add CVEs to 2.5, 2.4.4, 2.3.5, 2.1.6

Signed-off-by: Michael Niedermayer 

diff --git a/src/security b/src/security
index 16d0040..6d68fb8 100644
--- a/src/security
+++ b/src/security
@@ -1,7 +1,40 @@
 Please report vulnerabilities to mailto:ffmpeg-secur...@ffmpeg.org";>ffmpeg-secur...@ffmpeg.org
 
+FFmpeg 2.5
+
+2.5
+
+Fixes following vulnerabilities:
+
+
+CVE-2014-8541, 5c378d6a6df8243f06c87962b873bd563e58cd39
+CVE-2014-8542, 105654e376a736d243aef4a1d121abebce912e6b
+CVE-2014-8543, 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
+CVE-2014-8544, e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5
+CVE-2014-8545, 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6
+CVE-2014-8546, e7e5114c506957f40aafd794e06de1a7e341e9d5
+CVE-2014-8547, 8f1457864be8fb9653643519dea1c6492f1dde57
+CVE-2014-8548, c727401aa9d62335e89d118a5b4e202edf39d905
+CVE-2014-8549, 550f3e9df3410b3dd975e590042c0d83e20a8da3
+CVE-2014-9316, 0eecf40935b22644e6cd74c586057237ecfd6844
+CVE-2014-9317, 79ceaf827be0b070675d4cd0a55c3386542defd8
+CVE-2014-9318, 1d3a3b9f8907625b361420d48fe05716859620ff
+CVE-2014-9319, ea38e5a6b75706477898eb1e6582d667dbb9946c
+
+
 FFmpeg 2.4
 
+2.4.4
+
+Fixes following vulnerabilities:
+
+
+CVE-2014-9316, 8524009161b0430ba961a4e6fcd8125a695edd7c / 
0eecf40935b22644e6cd74c586057237ecfd6844
+CVE-2014-9317, f2595a6c38eeed80cd228c5db142873c95f6b4d3 / 
79ceaf827be0b070675d4cd0a55c3386542defd8
+CVE-2014-9318, 12e064d6c2ae66bd501872ab4fc2033588419f85 / 
1d3a3b9f8907625b361420d48fe05716859620ff
+CVE-2014-9319, 4b8f3c5bf34e517f8a50c5b5152985b8ef725c6b / 
ea38e5a6b75706477898eb1e6582d667dbb9946c
+
+
 2.4.2
 
 Fixes following vulnerabilities:
@@ -20,6 +53,21 @@ CVE-2014-8549, 84d26ab6eb07e22ad6ffcd8109ca1d1a0cd57bce / 
550f3e9df3410b3dd975e5
 
 FFmpeg 2.3
 
+2.3.5
+
+Fixes following vulnerabilities:
+
+
+CVE-2014-8542, e2c5f88237e74694c56a5954e579de055166f9c6 / 
105654e376a736d243aef4a1d121abebce912e6b
+CVE-2014-8543, 01817d508ba59246f203b9299a3cab13d0a78145 / 
8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
+CVE-2014-8544, c3af801c63024c2fcd7a5fbb571b6f8a9c9790dc / 
e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5
+CVE-2014-8545, 433e15bb873f7ba54d8895de7e74c43205551084 / 
3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6
+CVE-2014-8546, 693faadd30c569d772cae2c6702895745348c5bd / 
e7e5114c506957f40aafd794e06de1a7e341e9d5
+CVE-2014-8547, 6fb9bfb1a356aa4f711e7c45bbf79eaa18e4d522 / 
8f1457864be8fb9653643519dea1c6492f1dde57
+CVE-2014-8548, 1ac4ae2a32d16c97792f40df660cd8c4a9e049b2 / 
c727401aa9d62335e89d118a5b4e202edf39d905
+CVE-2014-8549, 5f7e48a113918b59b50b88a80ee0c0dfc39b6fab / 
550f3e9df3410b3dd975e590042c0d83e20a8da3
+
+
 2.3.4
 
 Fixes following vulnerabilities:
@@ -101,6 +149,28 @@ CVE-2014-2097, f58eab151214d2d35ff0973f2b3e51c5eb372da4
 
 FFmpeg 2.1
 
+2.1.6
+
+Fixes following vulnerabilities:
+
+
+
+CVE-2014-5271, 92096acc0a04c108f0393c78592269b748170d0a / 
52b81ff4635c077b2bc8b8d3637d933b6629d803
+CVE-2014-5272, f405267493c8baf900195bf7989f371b861041f6 / 
3539d6c63a16e1b2874bb037a86f317449c58770
+CVE-2014-8541, 9ec550c364835caaa928c361d009b75f25d774a9 / 
5c378d6a6df8243f06c87962b873bd563e58cd39
+CVE-2014-8542, b5298c464f0519b1f7e51f4513021fd004486543 / 
105654e376a736d243aef4a1d121abebce912e6b
+CVE-2014-8543, ce9d497755fd3a8a03221ddf3e7624630c3a14c0 / 
8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
+CVE-2014-8544, ceb9d67a0ad1a4076ef349c8756ce8b732d03a34 / 
e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5
+CVE-2014-8545, 5d852f338d5b7f5712ba8f8f27b02597686f / 
3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6
+CVE-2014-8546, 96357894ff9ac019edced85d51cf4a509c12116c / 
e7e5114c506957f40aafd794e06de1a7e341e9d5
+CVE-2014-8547, 05d7e92e4fdd04fd67ff23d931efcb02f4f4d0de / 
8f1457864be8fb9653643519dea1c6492f1dde57
+CVE-2014-8548, bf2605c35610e76bb83175407927ffca226dd6fd / 
c727401aa9d62335e89d118a5b4e202edf39d905
+CVE-2014-9316, b4ce4f94e781af9d41e557aca3f393bfb93a79cc / 
0eecf40935b22644e6cd74c586057237ecfd6844
+CVE-2014-9317, ef8fbb4878dc8059f17b9ba4ab882bcc706a58c3 / 
79ceaf827be0b070675d4cd0a55c3386542defd8
+CVE-2014-9318, 6212758c075775a9f3e5eedfa09613a1ec984424 / 
1d3a3b9f8907625b361420d48fe05716859620ff
+CVE-2014-9319, 35cfb99c15ddfbeae1f2f702091a7b8122c2d514 / 
ea38e5a6b75706477898eb1e6582d667dbb9946c
+
+
 2.1.5
 
 Fixes following vulnerabilities:

---

Summary of changes:
 src/security |   70 ++
 1 files changed, 70 insertions(+), 0 deletions(-)


hooks/post-receive
-- 

___
ffm

[FFmpeg-cvslog] avcodec/ppc/vp3dsp_altivec: POWER LE support to vp3_idct_add_altivec()

2014-12-08 Thread Rong Yan
ffmpeg | branch: master | Rong Yan  | Mon Dec  8 08:00:59 
2014 +| [9bd8f2cc32c2616c2bc010dd50f542ce6a85162b] | committer: Michael 
Niedermayer

avcodec/ppc/vp3dsp_altivec: POWER LE support to vp3_idct_add_altivec()

add GET_VDST16() macro

Signed-off-by: Michael Niedermayer 

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

 libavcodec/ppc/vp3dsp_altivec.c |   18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ppc/vp3dsp_altivec.c b/libavcodec/ppc/vp3dsp_altivec.c
index 9d81b3f..4a367b6 100644
--- a/libavcodec/ppc/vp3dsp_altivec.c
+++ b/libavcodec/ppc/vp3dsp_altivec.c
@@ -32,8 +32,13 @@
 
 static const vec_s16 constants =
 {0, 64277, 60547, 54491, 46341, 36410, 25080, 12785};
+#if HAVE_BIGENDIAN
 static const vec_u8 interleave_high =
 {0, 1, 16, 17, 4, 5, 20, 21, 8, 9, 24, 25, 12, 13, 28, 29};
+#else
+static const vec_u8 interleave_high =
+{2, 3, 18, 19, 6, 7, 22, 23, 10, 11, 26, 27, 14, 15, 30, 31};
+#endif
 
 #define IDCT_START \
 vec_s16 A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H;\
@@ -156,9 +161,18 @@ static void vp3_idct_add_altivec(uint8_t *dst, int stride, 
int16_t block[64])
 TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);
 IDCT_1D(ADD8, SHIFT4)
 
-#define ADD(a)\
+#if HAVE_BIGENDIAN
+#define GET_VDST16\
 vdst = vec_ld(0, dst);\
-vdst_16 = (vec_s16)vec_perm(vdst, zero_u8v, vdst_mask);\
+vdst_16 = (vec_s16)vec_perm(vdst, zero_u8v, vdst_mask);
+#else
+#define GET_VDST16\
+vdst = vec_vsx_ld(0,dst);\
+vdst_16 = (vec_s16)vec_mergeh(vdst, zero_u8v);
+#endif
+
+#define ADD(a)\
+GET_VDST16;\
 vdst_16 = vec_adds(a, vdst_16);\
 t = vec_packsu(vdst_16, vdst_16);\
 vec_ste((vec_u32)t, 0, (unsigned int *)dst);\

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


[FFmpeg-cvslog] avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun Dec  7 
19:53:18 2014 +0100| [41a52740d47ac0b02e99ae90ff9212cce71753e7] | committer: 
Michael Niedermayer

avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

Fixes CID1257010

Reviewed-by: Lukasz Marek 
Signed-off-by: Michael Niedermayer 

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

 libavutil/opt.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 4cf2069..af413d4 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1788,9 +1788,9 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o)
 } tmp = {0};
 int opt_size = *(int *)((void **)dst + 1);
 void *opt_ptr = *(void **)dst;
-if (!opt_ptr && (!o->default_val.str || !strlen(o->default_val.str)))
+if (!opt_size && (!o->default_val.str || !strlen(o->default_val.str)))
 return 1;
-if (opt_ptr && o->default_val.str && !strlen(o->default_val.str))
+if (!opt_size ||  !o->default_val.str || !strlen(o->default_val.str ))
 return 0;
 if (opt_size != strlen(o->default_val.str) / 2)
 return 0;

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


[FFmpeg-cvslog] avcodec/pngdec: handle 4 more bytes with SIMD for RGB64 in paeth prediction

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun Dec  7 
12:36:10 2014 +0100| [82a60de3b78f527cca80d4ccf6b62c6d6b8f628b] | committer: 
Michael Niedermayer

avcodec/pngdec: handle 4 more bytes with SIMD for RGB64 in paeth prediction

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index bc32eab..297e631 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -272,7 +272,8 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t 
*dst, int filter_type,
 if (bpp > 2 && size > 4) {
 /* would write off the end of the array if we let it process
  * the last pixel with bpp=3 */
-int w = bpp == 4 ? size : size - 3;
+int w = (bpp & 3) ? size - 3 : size;
+
 if (w > i) {
 dsp->add_paeth_prediction(dst + i, src + i, last + i, size - 
i, bpp);
 i = w;

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


[FFmpeg-cvslog] avcodec/x86/pngdsp: fix off by 1 error

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun Dec  7 
12:28:37 2014 +0100| [ed9be7dd470cd32fdb5baa886b048266f4cba28f] | committer: 
Michael Niedermayer

avcodec/x86/pngdsp: fix off by 1 error

This fixes artifacts in the last pixel of rows with some widths and pixel 
formats

Found-by: Dominique Leroux 
Tested-by: Dominique Leroux 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/pngdec.c   |2 +-
 libavcodec/x86/pngdsp.asm |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 60acd3f..bc32eab 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -274,7 +274,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t 
*dst, int filter_type,
  * the last pixel with bpp=3 */
 int w = bpp == 4 ? size : size - 3;
 if (w > i) {
-dsp->add_paeth_prediction(dst + i, src + i, last + i, w - i, 
bpp);
+dsp->add_paeth_prediction(dst + i, src + i, last + i, size - 
i, bpp);
 i = w;
 }
 }
diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index 678a032..7bd1ab5 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -157,7 +157,7 @@ cglobal add_png_paeth_prediction, 5, 7, %1, dst, src, top, 
w, bpp, end, cntr
 movh[dstq], m3
 add   dstq, bppq
 cmp   dstq, endq
-jle .loop
+jl .loop
 
 mov   dstq, [rsp]
 dec  cntrq

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


[FFmpeg-cvslog] lavc/utils: Make pix_fmt desc pointer const.

2014-12-08 Thread Carl Eugen Hoyos
ffmpeg | branch: release/2.2 | Carl Eugen Hoyos  | Thu Oct 30 
00:27:04 2014 +0100| [cd01611d7b7aa63bfce6dcb4008ac7686bc13418] | committer: 
Michael Niedermayer

lavc/utils: Make pix_fmt desc pointer const.

Fixes an "initialization discards qualifiers from pointer target type" warning.
(cherry picked from commit f05855414ed4cce97c06ba2a31f4987af47e6d4e)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8d24f0b..4969baa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -281,7 +281,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int 
*width, int *height,
 int i;
 int w_align = 1;
 int h_align = 1;
-AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
+AVPixFmtDescriptor const *desc = av_pix_fmt_desc_get(s->pix_fmt);
 
 if (desc) {
 w_align = 1 << desc->log2_chroma_w;

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


[FFmpeg-cvslog] avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Nov 
25 14:45:30 2014 +0100| [a63941eec2f92b27b75d1713d3d4fba1b38ac941] | committer: 
Michael Niedermayer

avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()

Fixes out of array read
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 3d5d95db3f5d8e2093e9e19d0c46e86f54ed2a5d)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/utils.c |5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4969baa..292d12b 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3482,6 +3482,11 @@ int avpriv_bprint_to_extradata(AVCodecContext *avctx, 
struct AVBPrint *buf)
 ret = av_bprint_finalize(buf, &str);
 if (ret < 0)
 return ret;
+if (!av_bprint_is_complete(buf)) {
+av_free(str);
+return AVERROR(ENOMEM);
+}
+
 avctx->extradata = str;
 /* Note: the string is NUL terminated (so extradata can be read as a
  * string), but the ending character is not accounted in the size (in

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


[FFmpeg-cvslog] lavu/opt: fix av_opt_get function

2014-12-08 Thread Lukasz Marek
ffmpeg | branch: release/2.2 | Lukasz Marek  | Tue 
Nov 11 21:17:58 2014 +0100| [944007921667d12fe99840710300521ea4dffd76] | 
committer: Michael Niedermayer

lavu/opt: fix av_opt_get function

Signed-off-by: Lukasz Marek 
(cherry picked from commit 173d51c982f1ecaa8d28cd0d8611164be0c9d36d)

Signed-off-by: Michael Niedermayer 

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

 libavutil/opt.c |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index f644f9b..8c58237 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -711,6 +711,10 @@ int av_opt_get(void *obj, const char *name, int 
search_flags, uint8_t **out_val)
 return AVERROR(EINVAL);
 if (!(*out_val = av_malloc(len*2 + 1)))
 return AVERROR(ENOMEM);
+if (!len) {
+*out_val[0] = '\0';
+return 0;
+}
 bin = *(uint8_t**)dst;
 for (i = 0; i < len; i++)
 snprintf(*out_val + i*2, 3, "%02X", bin[i]);
@@ -726,12 +730,14 @@ int av_opt_get(void *obj, const char *name, int 
search_flags, uint8_t **out_val)
 break;
 case AV_OPT_TYPE_DURATION:
 i64 = *(int64_t *)dst;
-ret = snprintf(buf, sizeof(buf), "%"PRIi64"d:%02d:%02d.%06d",
+ret = snprintf(buf, sizeof(buf), "%"PRIi64":%02d:%02d.%06d",
i64 / 36, (int)((i64 / 6000) % 60),
(int)((i64 / 100) % 60), (int)(i64 % 100));
 break;
 case AV_OPT_TYPE_COLOR:
-ret = snprintf(buf, sizeof(buf), "0x%02x%02x%02x%02x", ((int 
*)dst)[0], ((int *)dst)[1], ((int *)dst)[2], ((int *)dst)[3]);
+ret = snprintf(buf, sizeof(buf), "0x%02x%02x%02x%02x",
+   (int)((uint8_t *)dst)[0], (int)((uint8_t *)dst)[1],
+   (int)((uint8_t *)dst)[2], (int)((uint8_t *)dst)[3]);
 break;
 case AV_OPT_TYPE_CHANNEL_LAYOUT:
 i64 = *(int64_t *)dst;

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


[FFmpeg-cvslog] avcodec/mjpegdec: Fix context fields becoming inconsistent

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Nov 
25 13:53:06 2014 +0100| [5d6f8bab02ba6d8434188172b31a4e1ac0a00756] | committer: 
Michael Niedermayer

avcodec/mjpegdec: Fix context fields becoming inconsistent

Fixes out of array access
Fixes: 
asan_heap-oob_1ca4f85_2760_cov_19187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 0eecf40935b22644e6cd74c586057237ecfd6844)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/mjpegdec.c |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 7feeade..a811b51 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1553,6 +1553,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
 }
 
 if (id == AV_RB32("LJIF")) {
+int rgb = s->rgb;
+int pegasus_rct = s->pegasus_rct;
 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
 av_log(s->avctx, AV_LOG_INFO,
"Pegasus lossless jpeg header found\n");
@@ -1562,17 +1564,27 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
 skip_bits(&s->gb, 16); /* unknown always 0? */
 switch (i=get_bits(&s->gb, 8)) {
 case 1:
-s->rgb = 1;
-s->pegasus_rct = 0;
+rgb = 1;
+pegasus_rct = 0;
 break;
 case 2:
-s->rgb = 1;
-s->pegasus_rct = 1;
+rgb = 1;
+pegasus_rct = 1;
 break;
 default:
 av_log(s->avctx, AV_LOG_ERROR, "unknown colorspace %d\n", i);
 }
+
 len -= 9;
+if (s->got_picture)
+if (rgb != s->rgb || pegasus_rct != s->pegasus_rct) {
+av_log(s->avctx, AV_LOG_WARNING, "Mismatching LJIF tag\n");
+goto out;
+}
+
+s->rgb = rgb;
+s->pegasus_rct = pegasus_rct;
+
 goto out;
 }
 if (id == AV_RL32("colr") && len > 0) {

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


[FFmpeg-cvslog] swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Thu Nov 
20 00:43:45 2014 +0100| [de7671e4c47f14b2fd8c626bff27d330c693ad19] | committer: 
Michael Niedermayer

swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()

This avoids out of array accesses
Should fix Ticket3451

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4388e78a0f022c8572996f9ab568a39b5f716f9d)

Signed-off-by: Michael Niedermayer 

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

 libswscale/x86/rgb2rgb_template.c |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/libswscale/x86/rgb2rgb_template.c 
b/libswscale/x86/rgb2rgb_template.c
index 05c75d9..734453b 100644
--- a/libswscale/x86/rgb2rgb_template.c
+++ b/libswscale/x86/rgb2rgb_template.c
@@ -1623,6 +1623,16 @@ static inline void RENAME(rgb24toyv12)(const uint8_t 
*src, uint8_t *ydst, uint8_
 #define BGR2V_IDX "16*4+16*34"
 int y;
 const x86_reg chromWidth= width>>1;
+
+if (height > 2) {
+ff_rgb24toyv12_c(src, ydst, udst, vdst, width, 2, lumStride, 
chromStride, srcStride, rgb2yuv);
+src  += 2*srcStride;
+ydst += 2*lumStride;
+udst += chromStride;
+vdst += chromStride;
+height -= 2;
+}
+
 for (y=0; yhttp://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/flacdec: Call ff_flacdsp_init() unconditionally

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Wed Nov 
26 03:29:03 2014 +0100| [d41010b895755384e22fd918487e0c11dbc02f8e] | committer: 
Michael Niedermayer

avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit e5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b)

Conflicts:

libavcodec/flacdec.c

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

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

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index f63a918..d3b0df3 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -471,10 +471,10 @@ static int decode_frame(FLACContext *s)
 ret = allocate_buffers(s);
 if (ret < 0)
 return ret;
-ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
 s->got_streaminfo = 1;
 dump_headers(s->avctx, (FLACStreaminfo *)s);
 }
+ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
 
 //dump_headers(s->avctx, (FLACStreaminfo *)s);
 

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


[FFmpeg-cvslog] avcodec/options_table fix min of audio channels and sample rate

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Mon Nov 
 3 13:20:24 2014 +0100| [84fdfcab99aa09d957ad84aac61779f532887a51] | committer: 
Michael Niedermayer

avcodec/options_table fix min of audio channels and sample rate

Found-by: Lukasz Marek 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 206c98f303e833c9e94427c9e3f9867f85265f78)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/options_table.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index c82c104..1873a92 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -94,8 +94,8 @@ static const AVOption avcodec_options[] = {
 {"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = 
DEFAULT }, INT_MIN, INT_MAX},
 {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 
INT_MIN, INT_MAX},
 {"g", "set the group of picture (GOP) size", OFFSET(gop_size), 
AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},
-{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), 
AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|D|E},
-{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, 
{.i64 = DEFAULT }, INT_MIN, INT_MAX, A|D|E},
+{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), 
AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},
+{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, 
{.i64 = DEFAULT }, 0, INT_MAX, A|D|E},
 {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), AV_OPT_TYPE_INT, {.i64 = 
DEFAULT }, INT_MIN, INT_MAX, A|E},
 {"frame_size", NULL, OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 
INT_MIN, INT_MAX, A|E},
 {"frame_number", NULL, OFFSET(frame_number), AV_OPT_TYPE_INT, {.i64 = DEFAULT 
}, INT_MIN, INT_MAX},

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


[FFmpeg-cvslog] avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Mon Nov 
10 23:07:50 2014 +0100| [d054ec868d9665e4c8fb18371c5bb40d6ab35a4e] | committer: 
Michael Niedermayer

avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization

Fixes out of array read
Fixes: 
asan_heap-oob_2aec5b0_1828_classical_22_16_2_16000_v3c_0_exclusive_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 5dcb99033df16eccc4dbbc4a099ad64457f9f090)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/wmaprodec.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index d57c24d..19f5566 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -420,6 +420,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
 offset &= ~3;
 if (offset > s->sfb_offsets[i][band - 1])
 s->sfb_offsets[i][band++] = offset;
+
+if (offset >= subframe_len)
+break;
 }
 s->sfb_offsets[i][band - 1] = subframe_len;
 s->num_sfb[i]   = band - 1;

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


[FFmpeg-cvslog] avcodec/hevc_ps: Check num_long_term_ref_pics_sps

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Fri Nov 
28 03:46:56 2014 +0100| [4fde30ba9d050443fb14116fb206d0d37092bed0] | committer: 
Michael Niedermayer

avcodec/hevc_ps: Check num_long_term_ref_pics_sps

Fixes out of array access
Fixes: signal_sigsegv_35bd0f0_1182_cov_791726764_STRUCT_B_Samsung_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit ea38e5a6b75706477898eb1e6582d667dbb9946c)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/hevc_ps.c |5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index c8350fb..53b27bd 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -843,6 +843,11 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
 sps->long_term_ref_pics_present_flag = get_bits1(gb);
 if (sps->long_term_ref_pics_present_flag) {
 sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb);
+if (sps->num_long_term_ref_pics_sps > 31U) {
+av_log(0, AV_LOG_ERROR, "num_long_term_ref_pics_sps %d is out of 
range.\n",
+   sps->num_long_term_ref_pics_sps);
+goto err;
+}
 for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) {
 sps->lt_ref_pic_poc_lsb_sps[i]   = get_bits(gb, 
sps->log2_max_poc_lsb);
 sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb);

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


[FFmpeg-cvslog] avcodec/h264_slice: Clear table pointers to avoid stale pointers

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sun Nov 
 2 01:55:40 2014 +0100| [8b8d794800db9b0980760eb8dfb410dfbba54c2d] | committer: 
Michael Niedermayer

avcodec/h264_slice: Clear table pointers to avoid stale pointers

Might fix Ticket3889

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 547fce95858ef83f8c25ae347e3ae3b8ba437fd9)

Conflicts:

libavcodec/h264_slice.c

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

 libavcodec/h264.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 16f4896..6aa20f5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1821,6 +1821,17 @@ static int decode_update_thread_context(AVCodecContext 
*dst,
 h->mb_type_pool  = NULL;
 h->ref_index_pool= NULL;
 h->motion_val_pool   = NULL;
+h->intra4x4_pred_mode= NULL;
+h->non_zero_count= NULL;
+h->slice_table_base  = NULL;
+h->slice_table   = NULL;
+h->cbp_table = NULL;
+h->chroma_pred_mode_table = NULL;
+memset(h->mvd_table, 0, sizeof(h->mvd_table));
+h->direct_table  = NULL;
+h->list_counts   = NULL;
+h->mb2b_xy   = NULL;
+h->mb2br_xy  = NULL;
 for (i = 0; i < 2; i++) {
 h->rbsp_buffer[i] = NULL;
 h->rbsp_buffer_size[i] = 0;

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


[FFmpeg-cvslog] fix Makefile objects for pulseaudio support

2014-12-08 Thread Michael Stypa
ffmpeg | branch: release/2.2 | Michael Stypa  | Fri Nov 28 
15:54:50 2014 +0100| [3d9860f68af5d3cc588fe67ebe11eba61c180649] | committer: 
Michael Niedermayer

fix Makefile objects for pulseaudio support

Signed-off-by: Michael Niedermayer 
(cherry picked from commit cb58c771ade66afcc623250e1c7ac8191381d991)

Signed-off-by: Michael Niedermayer 

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

 libavdevice/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index ba503a3..4069b0c 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -34,7 +34,7 @@ OBJS-$(CONFIG_OPENGL_OUTDEV) += opengl_enc.o
 OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o
 OBJS-$(CONFIG_OSS_OUTDEV)+= oss_audio.o
 OBJS-$(CONFIG_PULSE_INDEV)   += pulse_audio_dec.o \
-pulse_audio_common.o
+pulse_audio_common.o timefilter.o
 OBJS-$(CONFIG_PULSE_OUTDEV)  += pulse_audio_enc.o \
 pulse_audio_common.o
 OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o

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


[FFmpeg-cvslog] avcodec/pngdec: Check IHDR/IDAT order

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Wed Nov 
26 15:45:47 2014 +0100| [d7470271c7ca3f412aac6b29fb4b8f22ad5c0238] | committer: 
Michael Niedermayer

avcodec/pngdec: Check IHDR/IDAT order

Fixes out of array access
Fixes: asan_heap-oob_20a6c26_2690_cov_3434532168_mail.png
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 79ceaf827be0b070675d4cd0a55c3386542defd8)

Conflicts:

libavcodec/pngdec.c

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

 libavcodec/pngdec.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index d4f633a..a57dece 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -565,6 +565,12 @@ static int decode_frame(AVCodecContext *avctx,
 case MKTAG('I', 'H', 'D', 'R'):
 if (length != 13)
 goto fail;
+
+if (s->state & PNG_IDAT) {
+av_log(avctx, AV_LOG_ERROR, "IHDR after IDAT\n");
+goto fail;
+}
+
 s->width  = bytestream2_get_be32(&s->gb);
 s->height = bytestream2_get_be32(&s->gb);
 if (av_image_check_size(s->width, s->height, 0, avctx)) {

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


[FFmpeg-cvslog] avformat/matroskadec: fix handling of recursive SeekHead elements

2014-12-08 Thread wm4
ffmpeg | branch: release/2.2 | wm4  | Sat Dec  6 
16:53:30 2014 +0100| [9a02be31225bef65de8f22fe56e1e0063e85126e] | committer: 
Michael Niedermayer

avformat/matroskadec: fix handling of recursive SeekHead elements

When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)

Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.

This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.

Fixes ticket #4162.

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 6551acab6877addae815decd02aeca33ba4990c8)

Signed-off-by: Michael Niedermayer 

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

 libavformat/matroskadec.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 37e0d19..cc6450e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1427,13 +1427,17 @@ static void 
matroska_execute_seekhead(MatroskaDemuxContext *matroska)
 EbmlList *seekhead_list = &matroska->seekhead;
 int64_t before_pos = avio_tell(matroska->ctx->pb);
 int i;
+int nb_elem;
 
 // we should not do any seeking in the streaming case
 if (!matroska->ctx->pb->seekable ||
 (matroska->ctx->flags & AVFMT_FLAG_IGNIDX))
 return;
 
-for (i = 0; i < seekhead_list->nb_elem; i++) {
+// do not read entries that are added while parsing seekhead entries
+nb_elem = seekhead_list->nb_elem;
+
+for (i = 0; i < nb_elem; i++) {
 MatroskaSeekhead *seekhead = seekhead_list->elem;
 if (seekhead[i].pos <= before_pos)
 continue;

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


[FFmpeg-cvslog] avformat/rmdec: Check codec_data_size

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Wed Dec 
 3 20:01:18 2014 +0100| [9e65065080f55a0be9c40bbd20354805a5e76016] | committer: 
Michael Niedermayer

avformat/rmdec: Check codec_data_size

Fixes infinite loop
Fixes Ticket4154

Signed-off-by: Michael Niedermayer 
(cherry picked from commit a6f730730b82645a9d31aad0968487cb77d6946c)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index b62f8e0..4ae5808 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -312,6 +312,9 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext 
*pb,
 int64_t codec_pos;
 int ret;
 
+if (codec_data_size < 0)
+return AVERROR_INVALIDDATA;
+
 avpriv_set_pts_info(st, 64, 1, 1000);
 codec_pos = avio_tell(pb);
 v = avio_rb32(pb);

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


[FFmpeg-cvslog] avformat/hlsenc: Free context after hls_append_segment

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sun Nov 
16 04:02:56 2014 +0100| [217f781adca310cadcc631ff5d94cca6d029ec0e] | committer: 
Michael Niedermayer

avformat/hlsenc: Free context after hls_append_segment

Fixes reading uninitialized memory

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 530eb6acf8ee867bf00728bf7efaf505da107e17)

Conflicts:

libavformat/hlsenc.c
(cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929)

Conflicts:

libavformat/hlsenc.c
(cherry picked from commit 134d3e1c0331462ea94c78a5e13a63b20d283653)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 3b50397..a370b3d 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -308,9 +308,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
 
 av_write_trailer(oc);
 avio_closep(&oc->pb);
-avformat_free_context(oc);
 av_free(hls->basename);
 append_entry(hls, hls->duration);
+avformat_free_context(oc);
+hls->avf = NULL;
 hls_window(s, 1);
 
 free_entries(hls);

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


[FFmpeg-cvslog] avcodec/rawdec: Check the return code of avpicture_get_size()

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Wed Nov 
26 18:56:39 2014 +0100| [a06432b6c315fda5a9cc69059fd106d231e7da6c] | committer: 
Michael Niedermayer

avcodec/rawdec: Check the return code of avpicture_get_size()

Fixes out of array access
Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 1d3a3b9f8907625b361420d48fe05716859620ff)

Conflicts:

libavcodec/rawdec.c

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

 libavcodec/rawdec.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index d187d23..437363d 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -136,6 +136,9 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width,
  avctx->height);
 }
+if (context->frame_size < 0)
+return context->frame_size;
+
 
 if ((avctx->extradata_size >= 9 &&
  !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) 
||

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


[FFmpeg-cvslog] avcodec/utvideodec: fix assumtation that slice_height >= 1

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Mon Nov 
10 19:44:20 2014 +0100| [4d8b82160dbc6b31c08894e4e8147411b6f6078a] | committer: 
Michael Niedermayer

avcodec/utvideodec: fix assumtation that slice_height >= 1

Fixes out of array read
Fixes: asan_heap-oob_2573085_3783_utvideo_rgba_median.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7656c4c6e66f8a787d384f027ad824cc1677fda1)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/utvideodec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 1c76773..ff69a25 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -222,7 +222,7 @@ static void restore_median(uint8_t *src, int step, int 
stride,
 A= bsrc[i];
 }
 bsrc += stride;
-if (slice_height == 1)
+if (slice_height <= 1)
 continue;
 // second line - first element has top prediction, the rest uses median
 C= bsrc[-stride];
@@ -282,7 +282,7 @@ static void restore_median_il(uint8_t *src, int step, int 
stride,
 A = bsrc[stride + i];
 }
 bsrc += stride2;
-if (slice_height == 1)
+if (slice_height <= 1)
 continue;
 // second line - first element has top prediction, the rest uses median
 C= bsrc[-stride2];

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


[FFmpeg-cvslog] avcodec/motion_est: use 2x8x8 for interlaced qpel

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Mon Dec 
 1 13:23:24 2014 +0100| [7390c2629dc24a69612bfdf92250fad3effc6d37] | committer: 
Michael Niedermayer

avcodec/motion_est: use 2x8x8 for interlaced qpel

Fixes out of array read
Fixes Ticket4121

Signed-off-by: Michael Niedermayer 
(cherry picked from commit b50e003e1cb6a215df44ffa3354603bf600b4aa3)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/motion_est.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 5ca59aa..0d44184 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -189,7 +189,13 @@ static av_always_inline int cmp_inline(MpegEncContext *s, 
const int x, const int
 int uvdxy;  /* no, it might not be used uninitialized */
 if(dxy){
 if(qpel){
-c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, 
stride); //FIXME prototype (add h)
+if (h << size == 16) {
+c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, 
stride); //FIXME prototype (add h)
+} else if (size == 0 && h == 8) {
+c->qpel_put[1][dxy](c->temp, ref[0] + x + y*stride
, stride);
+c->qpel_put[1][dxy](c->temp + 8, ref[0] + x + y*stride + 
8, stride);
+} else
+av_assert2(0);
 if(chroma){
 int cx= hx/2;
 int cy= hy/2;

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


[FFmpeg-cvslog] swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Wed Dec 
 3 20:21:56 2014 +0100| [223ae2467e3a3e39e2a79bef8942608ea82802f6] | committer: 
Michael Niedermayer

swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output

Fixes Ticket4151

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 8524558858b7e14bc50afa10233e0194f591ab9d)

Signed-off-by: Michael Niedermayer 

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

 libswscale/x86/rgb2rgb_template.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libswscale/x86/rgb2rgb_template.c 
b/libswscale/x86/rgb2rgb_template.c
index 455e7c2..05c75d9 100644
--- a/libswscale/x86/rgb2rgb_template.c
+++ b/libswscale/x86/rgb2rgb_template.c
@@ -1864,6 +1864,7 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, 
const uint8_t *src2, ui
 for (h=0; h < height; h++) {
 int w;
 
+if (width >= 16)
 #if COMPILE_TEMPLATE_SSE2
 __asm__(
 "xor  %%"REG_a", %%"REG_a"  \n\t"

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


[FFmpeg-cvslog] Update for 2.2.11

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Mon Dec 
 8 19:27:19 2014 +0100| [9f09bfe681259cfed7414f207c88f84c09d5b501] | committer: 
Michael Niedermayer

Update for 2.2.11

Signed-off-by: Michael Niedermayer 

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

 RELEASE  |2 +-
 doc/Doxyfile |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/RELEASE b/RELEASE
index 0d3ad67..0b6e431 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-2.2.10
+2.2.11
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 751aa59..c8ef923 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME   = FFmpeg
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER = 2.2.10
+PROJECT_NUMBER = 2.2.11
 
 # With the PROJECT_LOGO tag one can specify a logo or icon that is included
 # in the documentation. The maximum height of the logo should not exceed 55

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


[FFmpeg-cvslog] riff: Support decoding png in avi (ImageJ)

2014-12-08 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Dec  4 
19:13:19 2014 +| [250e077ee9eec0176a6d54a78542dc792943e71a] | committer: 
Vittorio Giovara

riff: Support decoding png in avi (ImageJ)

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

 libavformat/riff.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index b91f8f1..776a25f 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -314,6 +314,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
 { AV_CODEC_ID_TARGA,MKTAG('t', 'g', 'a', ' ') },
 { AV_CODEC_ID_PNG,  MKTAG('M', 'P', 'N', 'G') },
 { AV_CODEC_ID_PNG,  MKTAG('P', 'N', 'G', '1') },
+{ AV_CODEC_ID_PNG,  MKTAG('p', 'n', 'g', ' ') }, /* ImageJ */
 { AV_CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') },
 { AV_CODEC_ID_DIRAC,MKTAG('d', 'r', 'a', 'c') },
 { AV_CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') },

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


[FFmpeg-cvslog] Merge commit '250e077ee9eec0176a6d54a78542dc792943e71a'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
20:35:16 2014 +0100| [3cfe1d9b3e656aed8ad89d971fc98693a2f3a983] | committer: 
Michael Niedermayer

Merge commit '250e077ee9eec0176a6d54a78542dc792943e71a'

* commit '250e077ee9eec0176a6d54a78542dc792943e71a':
  riff: Support decoding png in avi (ImageJ)

See: 3668168afa1ef73928b2c6cc2a6ffa8e8ad82312
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] dpx: always write the image offset

2014-12-08 Thread Zoltan Kovacs
ffmpeg | branch: master | Zoltan Kovacs  | Fri Dec  5 
02:42:10 2014 +| [4843a9c74f77f5eb8d2b1ee648fe2ac6e2a48ec3] | committer: 
Vittorio Giovara

dpx: always write the image offset

According to the DPX file format description found at
http://www.fileformat.info/format/dpx/egff.htm the ImageElement part of
the GenericImageHeader also contains an an offset to the real image data
beside the same member that can be found in the GenericFileHeader.

Libav keeps this member empty (=0) while some applications expects it to
be filled properly. FATE test updated accordingly.

Bug-Id: 742
Signed-off-by: Vittorio Giovara 

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

 libavcodec/dpxenc.c |1 +
 tests/ref/lavf/dpx  |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 4de71cf..2b1ead3 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -144,6 +144,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 buf[802] = 2; /* linear colorimetric */
 buf[803] = s->bits_per_component;
 write16(buf + 804, s->bits_per_component == 10 ? 1 : 0); /* packing method 
*/
+write32(buf + 808, HEADER_SIZE); /* data offset */
 
 /* Image source information header */
 write32(buf + 1628, avctx->sample_aspect_ratio.num);
diff --git a/tests/ref/lavf/dpx b/tests/ref/lavf/dpx
index a9f1169..42c0a33 100644
--- a/tests/ref/lavf/dpx
+++ b/tests/ref/lavf/dpx
@@ -1,3 +1,3 @@
-808ea110635774252439722a48329d61 *./tests/data/images/dpx/02.dpx
+d2f0b4e854fda2d3b3bee84cef80593c *./tests/data/images/dpx/02.dpx
 ./tests/data/images/dpx/%02d.dpx CRC=0x28c7369b
 305792 ./tests/data/images/dpx/02.dpx

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


[FFmpeg-cvslog] Merge commit '4843a9c74f77f5eb8d2b1ee648fe2ac6e2a48ec3'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
20:53:19 2014 +0100| [c9128c2c8318a087365cd2d6de1f500b43bfc684] | committer: 
Michael Niedermayer

Merge commit '4843a9c74f77f5eb8d2b1ee648fe2ac6e2a48ec3'

* commit '4843a9c74f77f5eb8d2b1ee648fe2ac6e2a48ec3':
  dpx: always write the image offset

Conflicts:
libavcodec/dpxenc.c
tests/ref/lavf/dpx

See: 361319d0f49475bc14c744194870f9bab78a8a83
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] vf_frei0r: do not increment string if it reached the end

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Dec  5 02:15:09 2014 +| [d0b224054f13bf57244694a3ff092cfef68d66f9] | 
committer: Vittorio Giovara

vf_frei0r: do not increment string if it reached the end

Bug-Id: 778
CC: libav-sta...@libav.org

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

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

diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 771443d..0122b8d 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -149,7 +149,8 @@ static int set_params(AVFilterContext *ctx, const char 
*params)
 if (*params) {
 if (!(param = av_get_token(¶ms, "|")))
 return AVERROR(ENOMEM);
-params++;   /* skip ':' */
+if (*params)
+params++;   /* skip ':' */
 ret = set_param(ctx, info, i, param);
 av_free(param);
 if (ret < 0)

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


[FFmpeg-cvslog] Merge commit '90411b333d6b6bb69d8937117b9250785730dc53'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
21:02:42 2014 +0100| [879ea06bc5572a739712d0b5e291f1b04bf16e33] | committer: 
Michael Niedermayer

Merge commit '90411b333d6b6bb69d8937117b9250785730dc53'

* commit '90411b333d6b6bb69d8937117b9250785730dc53':
  Allow reading of growing avi files (currently being written)

Conflicts:
libavformat/avidec.c
tests/ref/fate/cvid-partial

See: e42a3dd123c47efd7921f93d4a1f6f53c196ad4a
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'd0b224054f13bf57244694a3ff092cfef68d66f9'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
21:04:58 2014 +0100| [6b4cbfec757a1a3be48bc08489afc47b9cd18a0e] | committer: 
Michael Niedermayer

Merge commit 'd0b224054f13bf57244694a3ff092cfef68d66f9'

* commit 'd0b224054f13bf57244694a3ff092cfef68d66f9':
  vf_frei0r: do not increment string if it reached the end

See: 02a6ee51685eb74f7a878dd49553ecc1f8da9fb2
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Allow reading of growing avi files (currently being written)

2014-12-08 Thread Joakim Plate
ffmpeg | branch: master | Joakim Plate  | Fri Dec  5 03:06:50 
2014 +| [90411b333d6b6bb69d8937117b9250785730dc53] | committer: Vittorio 
Giovara

Allow reading of growing avi files (currently being written)

This uses the RIFF header stored size to figure out the expected AVI
file size, instead of the actual file. To work fully it requires handling
failed avio_seek() instead of assuming they always succeed.

Some fate file has been cut off and contains half a frame at the end which
previously was not output during demuxing. This frame is now output to
encoder, thus the fate diff update.

Bug-Id: 261
Signed-off-by: Vittorio Giovara 

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

 libavformat/avidec.c |8 
 tests/ref/fate/aasc  |1 +
 tests/ref/fate/cllc-argb |1 +
 tests/ref/fate/cllc-rgb  |1 +
 tests/ref/fate/cllc-yuy2-noblock |1 +
 tests/ref/fate/cvid-partial  |1 +
 tests/ref/fate/fic-avi   |1 +
 tests/ref/fate/truemotion1-24|1 +
 tests/ref/fate/vp5   |1 +
 tests/ref/fate/zmbv-8bit |1 +
 10 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index c24a6c4..e7202de 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -151,7 +151,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int 
frame_num)
 AVIStream *ast;
 int i;
 int64_t last_pos = -1;
-int64_t filesize = avio_size(s->pb);
+int64_t filesize = avi->fsize;
 
 av_dlog(s,
 "longs_pre_entry:%d index_type:%d entries_in_use:%d "
@@ -374,7 +374,7 @@ static int avi_read_header(AVFormatContext *s)
 return ret;
 
 avi->fsize = avio_size(pb);
-if (avi->fsize <= 0)
+if (avi->fsize <= 0 || avi->fsize < avi->riff_end)
 avi->fsize = avi->riff_end == 8 ? INT64_MAX : avi->riff_end;
 
 /* first list tag */
@@ -402,7 +402,7 @@ static int avi_read_header(AVFormatContext *s)
 if (size)
 avi->movi_end = avi->movi_list + size + (size & 1);
 else
-avi->movi_end = avio_size(pb);
+avi->movi_end = avi->fsize;
 av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
 goto end_of_header;
 } else if (tag1 == MKTAG('I', 'N', 'F', 'O'))
@@ -774,7 +774,7 @@ static int avi_read_header(AVFormatContext *s)
 if (s->error_recognition & AV_EF_EXPLODE)
 goto fail;
 avi->movi_list = avio_tell(pb) - 4;
-avi->movi_end  = avio_size(pb);
+avi->movi_end  = avi->fsize;
 goto end_of_header;
 }
 /* skip tag */
diff --git a/tests/ref/fate/aasc b/tests/ref/fate/aasc
index 57d59a9..83f83b9 100644
--- a/tests/ref/fate/aasc
+++ b/tests/ref/fate/aasc
@@ -22,3 +22,4 @@
 0, 20, 20,1,   168000, 0x7a2b1006
 0, 21, 21,1,   168000, 0xc7ca1345
 0, 22, 22,1,   168000, 0x8841c413
+0, 23, 23,1,   168000, 0xbaed0290
diff --git a/tests/ref/fate/cllc-argb b/tests/ref/fate/cllc-argb
index 0283863..4a5dce5 100644
--- a/tests/ref/fate/cllc-argb
+++ b/tests/ref/fate/cllc-argb
@@ -3,3 +3,4 @@
 0,  1,  1,1,  3686400, 0x66a45032
 0,  2,  2,1,  3686400, 0xdf0c861f
 0,  3,  3,1,  3686400, 0xa4a68cdb
+0,  4,  4,1,  3686400, 0xb5f9526e
diff --git a/tests/ref/fate/cllc-rgb b/tests/ref/fate/cllc-rgb
index 06d54da..b4ca055 100644
--- a/tests/ref/fate/cllc-rgb
+++ b/tests/ref/fate/cllc-rgb
@@ -13,3 +13,4 @@
 0, 11, 11,1,   921600, 0x4d7488fa
 0, 12, 12,1,   921600, 0x16b9c9c9
 0, 13, 13,1,   921600, 0xa0a4f77f
+0, 14, 14,1,   921600, 0xf61a5501
diff --git a/tests/ref/fate/cllc-yuy2-noblock b/tests/ref/fate/cllc-yuy2-noblock
index 2cb9e78..6ad59d5 100644
--- a/tests/ref/fate/cllc-yuy2-noblock
+++ b/tests/ref/fate/cllc-yuy2-noblock
@@ -14,3 +14,4 @@
 0, 12, 12,1,   614400, 0x2d8fd7cc
 0, 13, 13,1,   614400, 0xd9dfc2ef
 0, 14, 14,1,   614400, 0xaf95cef0
+0, 15, 15,1,   614400, 0x6dcf5ed6
diff --git a/tests/ref/fate/cvid-partial b/tests/ref/fate/cvid-partial
index 71596b4..907ef4a 100644
--- a/tests/ref/fate/cvid-partial
+++ b/tests/ref/fate/cvid-partial
@@ -77,3 +77,4 @@
 0, 75, 75,1,   112400, 0xe4394f1f
 0, 76, 76,1,   112400, 0x8ca8649f
 0, 77, 77,1,   112400, 0x804d44eb
+0, 78, 78,1,   112400, 0x3864488b
diff --git a/tests/ref/fate/fic-avi b/tests/ref/fate/fic-avi
index e2b26a3..cc4ea5

[FFmpeg-cvslog] h264: increase MAX_SLICES to 32

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Dec  5 03:46:13 2014 +| [6fd91fa11909f27902498648680dbb3d13f1f175] | 
committer: Vittorio Giovara

h264: increase MAX_SLICES to 32

H264 streams from CounterPath Bria and some Cisco phones need an
increased pool for correct decoding.

Bug-Id: 645
Sample-Id: bria-h264.mka

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

 libavcodec/h264.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index cd4bf87..047937a 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -63,7 +63,7 @@
  * The maximum number of slices supported by the decoder.
  * must be a power of 2
  */
-#define MAX_SLICES 16
+#define MAX_SLICES 32
 
 #ifdef ALLOW_INTERLACE
 #define MB_MBAFF(h)h->mb_mbaff

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


[FFmpeg-cvslog] Merge commit '6fd91fa11909f27902498648680dbb3d13f1f175'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
21:38:07 2014 +0100| [74622ad320bbd3e01674224e67b59b09f22c38d6] | committer: 
Michael Niedermayer

Merge commit '6fd91fa11909f27902498648680dbb3d13f1f175'

* commit '6fd91fa11909f27902498648680dbb3d13f1f175':
  h264: increase MAX_SLICES to 32

The available sample decodes correctly before, but the reporter of the bug
claims that this change reduces artifacts. This is thus merged
If someone has samples that decode differently depending in the MAX_SLICES
value, please open a ticket on trac.
Also this change should be reverted if it turns out that the artifacts
that where seen had a different cause

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '35384934d6e27e0334060a23a0c83a3cb5cef198'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
21:59:08 2014 +0100| [82f0f0482ed67f32414df7791e26cc473cdcb3bb] | committer: 
Michael Niedermayer

Merge commit '35384934d6e27e0334060a23a0c83a3cb5cef198'

* commit '35384934d6e27e0334060a23a0c83a3cb5cef198':
  mov: cosmetics: reorder the list of tags

Conflicts:
libavformat/mov.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mov: cosmetics: reorder the list of tags

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Dec  3 02:41:43 2014 +| [35384934d6e27e0334060a23a0c83a3cb5cef198] | 
committer: Vittorio Giovara

mov: cosmetics: reorder the list of tags

Alphabetically order the list by the tag to facilitate the insertion of
new ones.

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

 libavformat/mov.c |   58 ++---
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 95c7106..48909df 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -260,45 +260,45 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
 int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL;
 
 switch (atom.type) {
-case MKTAG(0xa9,'n','a','m'): key = "title"; break;
-case MKTAG(0xa9,'a','u','t'):
-case MKTAG(0xa9,'A','R','T'): key = "artist";break;
 case MKTAG( 'a','A','R','T'): key = "album_artist";break;
-case MKTAG(0xa9,'w','r','t'): key = "composer";  break;
-case MKTAG( 'c','p','r','t'):
-case MKTAG(0xa9,'c','p','y'): key = "copyright"; break;
-case MKTAG(0xa9,'c','m','t'):
-case MKTAG(0xa9,'i','n','f'): key = "comment";   break;
-case MKTAG(0xa9,'a','l','b'): key = "album"; break;
-case MKTAG(0xa9,'d','a','y'): key = "date";  break;
-case MKTAG(0xa9,'g','e','n'): key = "genre"; break;
+case MKTAG( 'c','p','r','t'): key = "copyright"; break;
+case MKTAG( 'd','e','s','c'): key = "description"; break;
+case MKTAG( 'd','i','s','k'): key = "disc";
+parse = mov_metadata_track_or_disc_number; break;
 case MKTAG( 'g','n','r','e'): key = "genre";
 parse = mov_metadata_gnre; break;
-case MKTAG(0xa9,'t','o','o'):
-case MKTAG(0xa9,'s','w','r'): key = "encoder";   break;
-case MKTAG(0xa9,'e','n','c'): key = "encoder";   break;
-case MKTAG(0xa9,'x','y','z'): key = "location";  break;
-case MKTAG( 'd','e','s','c'): key = "description";break;
+case MKTAG( 'h','d','v','d'): key = "hd_video";
+parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 'l','d','e','s'): key = "synopsis";  break;
-case MKTAG( 't','v','s','h'): key = "show";  break;
-case MKTAG( 't','v','e','n'): key = "episode_id";break;
-case MKTAG( 't','v','n','n'): key = "network";   break;
+case MKTAG( 'l','o','c','i'):
+return mov_metadata_loci(c, pb, atom.size);
+case MKTAG( 'p','g','a','p'): key = "gapless_playback";
+parse = mov_metadata_int8_no_padding; break;
+case MKTAG( 's','t','i','k'): key = "media_type";
+parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 't','r','k','n'): key = "track";
 parse = mov_metadata_track_or_disc_number; break;
-case MKTAG( 'd','i','s','k'): key = "disc";
-parse = mov_metadata_track_or_disc_number; break;
+case MKTAG( 't','v','e','n'): key = "episode_id"; break;
 case MKTAG( 't','v','e','s'): key = "episode_sort";
 parse = mov_metadata_int8_bypass_padding; break;
+case MKTAG( 't','v','n','n'): key = "network";   break;
+case MKTAG( 't','v','s','h'): key = "show";  break;
 case MKTAG( 't','v','s','n'): key = "season_number";
 parse = mov_metadata_int8_bypass_padding; break;
-case MKTAG( 's','t','i','k'): key = "media_type";
-parse = mov_metadata_int8_no_padding; break;
-case MKTAG( 'h','d','v','d'): key = "hd_video";
-parse = mov_metadata_int8_no_padding; break;
-case MKTAG( 'p','g','a','p'): key = "gapless_playback";
-parse = mov_metadata_int8_no_padding; break;
-case MKTAG( 'l','o','c','i'):
-return mov_metadata_loci(c, pb, atom.size);
+case MKTAG(0xa9,'A','R','T'): key = "artist";break;
+case MKTAG(0xa9,'a','l','b'): key = "album"; break;
+case MKTAG(0xa9,'a','u','t'): key = "artist";break;
+case MKTAG(0xa9,'c','m','t'): key = "comment";   break;
+case MKTAG(0xa9,'c','p','y'): key = "copyright"; break;
+case MKTAG(0xa9,'d','a','y'): key = "date";  break;
+case MKTAG(0xa9,'e','n','c'): key = "encoder";   break;
+case MKTAG(0xa9,'g','e','n'): key = "genre"; break;
+case MKTAG(0xa9,'i','n','f'): key = "comment";   break;
+case MKTAG(0xa9,'n','a','m'): key = "title"; break;
+case MKTAG(0xa9,'s','w','r'): key = "encoder";   break;
+case MKTAG(0xa9,'t','o','o'): key = "encoder";   break;
+case MKTAG(0xa9,'w','r','t'): key = "composer";  break;
+case MKTAG(0xa9,'x','y','z'): key = "location";  break;
 }
 
 if (c->itunes_metadata && atom.size > 8) {

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


[FFmpeg-cvslog] mov: parse @PRM and @PRQ metadata tags

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Dec  3 02:42:29 2014 +| [174c5fde90060faab67796a5eaef742630f1db6e] | 
committer: Vittorio Giovara

mov: parse @PRM and @PRQ metadata tags

These tags describe the product and quicktime library version respectively.
They originate from Adobe Premiere, but also some other programs use them.
Contrary to other tags, they contain 'raw' data which is not to be
interpreted as iso639 or mac strings.

Based on a patch by Peter Ross .

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

 libavformat/mov.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 48909df..5950c42 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -258,8 +258,11 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 uint16_t langcode = 0;
 uint32_t data_type = 0, str_size, str_size_alloc;
 int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL;
+int raw = 0;
 
 switch (atom.type) {
+case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break;
+case MKTAG( '@','P','R','Q'): key = "quicktime_version"; raw = 1; break;
 case MKTAG( 'a','A','R','T'): key = "album_artist";break;
 case MKTAG( 'c','p','r','t'): key = "copyright"; break;
 case MKTAG( 'd','e','s','c'): key = "description"; break;
@@ -318,7 +321,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 }
 }
 } else return 0;
-} else if (atom.size > 4 && key && !c->itunes_metadata) {
+} else if (atom.size > 4 && key && !c->itunes_metadata && !raw) {
 str_size = avio_rb16(pb); // string length
 langcode = avio_rb16(pb);
 ff_mov_lang_to_iso639(langcode, language);
@@ -337,7 +340,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 return AVERROR_INVALIDDATA;
 
 // allocate twice as much as worst-case
-str_size_alloc = str_size * 2;
+str_size_alloc = raw ? str_size + 1 : str_size * 2;
 str = av_malloc(str_size_alloc);
 if (!str)
 return AVERROR(ENOMEM);
@@ -345,7 +348,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 if (parse)
 parse(c, pb, str_size, key);
 else {
-if (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode 
== 0x7fff))) { // MAC Encoded
+if (!raw && (data_type == 3 || (data_type == 0 && (langcode < 0x400 || 
langcode == 0x7fff { // MAC Encoded
 mov_read_mac_string(c, pb, str_size, str, str_size_alloc);
 } else {
 avio_read(pb, str, str_size);

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


[FFmpeg-cvslog] Merge commit '174c5fde90060faab67796a5eaef742630f1db6e'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
22:13:23 2014 +0100| [420aebf0c585e54468e631460065448c9bb6ccb5] | committer: 
Michael Niedermayer

Merge commit '174c5fde90060faab67796a5eaef742630f1db6e'

* commit '174c5fde90060faab67796a5eaef742630f1db6e':
  mov: parse @PRM and @PRQ metadata tags

Conflicts:
libavformat/mov.c

See: f540851ce320bc69621ea70b89857c54129c82c2
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mov: parse XMP metadata on demand

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Dec  3 02:43:24 2014 +| [b704b648f9ecb830874627db958a37e004107d1b] | 
committer: Vittorio Giovara

mov: parse XMP metadata on demand

The Extensible Metadata Platform tag can contain various kind of data
which are not strictly related to the video file, such as history of edits
and saves from the project file. So display XMP metadata only when the
user explicitly requires it.

Based on a patch by Marek Fort .

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

 libavformat/isom.h|1 +
 libavformat/mov.c |4 
 libavformat/version.h |2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index 7e60d8c..c24b962 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -157,6 +157,7 @@ typedef struct MOVContext {
 int chapter_track;
 int64_t next_root_atom; ///< offset of the next root atom
 int export_all;
+int export_xmp;
 } MOVContext;
 
 int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5950c42..8124d69 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -263,6 +263,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 switch (atom.type) {
 case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break;
 case MKTAG( '@','P','R','Q'): key = "quicktime_version"; raw = 1; break;
+case MKTAG( 'X','M','P','_'):
+if (c->export_xmp) { key = "xmp"; raw = 1; } break;
 case MKTAG( 'a','A','R','T'): key = "album_artist";break;
 case MKTAG( 'c','p','r','t'): key = "copyright"; break;
 case MKTAG( 'd','e','s','c'): key = "description"; break;
@@ -3431,6 +3433,8 @@ static int mov_read_seek(AVFormatContext *s, int 
stream_index, int64_t sample_ti
 static const AVOption mov_options[] = {
 { "export_all", "Export unrecognized metadata entries", OFFSET(export_all),
 AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS },
+{ "export_xmp", "Export full XMP metadata", OFFSET(export_xmp),
+AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS },
 { NULL },
 };
 
diff --git a/libavformat/version.h b/libavformat/version.h
index b4d31dd..16c5e2e 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR 56
 #define LIBAVFORMAT_VERSION_MINOR  7
-#define LIBAVFORMAT_VERSION_MICRO  1
+#define LIBAVFORMAT_VERSION_MICRO  2
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \

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


[FFmpeg-cvslog] Merge commit 'b704b648f9ecb830874627db958a37e004107d1b'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
22:33:38 2014 +0100| [0dcebe26209fbda0bac54789406e0a30c3a08247] | committer: 
Michael Niedermayer

Merge commit 'b704b648f9ecb830874627db958a37e004107d1b'

* commit 'b704b648f9ecb830874627db958a37e004107d1b':
  mov: parse XMP metadata on demand

Conflicts:
libavformat/isom.h
libavformat/version.h

See: 054c506e3da35471ea92dbedcaaf720d0754f04e

The default is left unchanged at enabled
We can change the default if people prefer but i do not want to do that
in a merge.

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] fate: add libavcodec/options-test

2014-12-08 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Thu Dec  4 
00:28:52 2014 +0100| [4acc717a05f27752a728c231f9df9dcd042c92d3] | committer: 
Lukasz Marek

fate: add libavcodec/options-test

Signed-off-by: Lukasz Marek 

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

 tests/fate/libavcodec.mak |4 +
 tests/ref/fate/libavcodec-options |  161 +
 2 files changed, 165 insertions(+)

diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak
index 138a1b2..dad33bc 100644
--- a/tests/fate/libavcodec.mak
+++ b/tests/fate/libavcodec.mak
@@ -13,6 +13,10 @@ FATE_LIBAVCODEC-$(CONFIG_IIRFILTER) += fate-iirfilter
 fate-iirfilter: libavcodec/iirfilter-test$(EXESUF)
 fate-iirfilter: CMD = run libavcodec/iirfilter-test
 
+FATE_LIBAVCODEC-yes += fate-libavcodec-options
+fate-libavcodec-options: libavcodec/options-test$(EXESUF)
+fate-libavcodec-options: CMD = run libavcodec/options-test
+
 FATE_LIBAVCODEC-$(CONFIG_RANGECODER) += fate-rangecoder
 fate-rangecoder: libavcodec/rangecoder-test$(EXESUF)
 fate-rangecoder: CMD = run libavcodec/rangecoder-test
diff --git a/tests/ref/fate/libavcodec-options 
b/tests/ref/fate/libavcodec-options
new file mode 100644
index 000..ecdcac5
--- /dev/null
+++ b/tests/ref/fate/libavcodec-options
@@ -0,0 +1,161 @@
+testing avcodec_copy_context()
+dummy_v1_codec -> dummy_v1_codec
+closed:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+opened:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v1_codec -> dummy_v2_codec
+closed:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v2_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+opened:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v2_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+dummy_v1_codec -> dummy_v3_codec
+closed:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v3_codec: 128x128 prv: set
+opened:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v3_codec: 128x128 prv: set
+dummy_v1_codec -> dummy_v4_codec
+closed:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v4_codec: 128x128 prv: null
+opened:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v4_codec: 128x128 prv: null
+dummy_v1_codec -> NULL
+closed:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+NULL  : 128x128 prv: null
+opened:
+dummy_v1_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+NULL  : 128x128 prv: null
+dummy_v2_codec -> dummy_v1_codec
+closed:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v1_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+opened:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v1_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+dummy_v2_codec -> dummy_v2_codec
+closed:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+opened:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v2_codec -> dummy_v3_codec
+closed:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v3_codec: 128x128 prv: set
+opened:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v3_codec: 128x128 prv: set
+dummy_v2_codec -> dummy_v4_codec
+closed:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v4_codec: 128x128 prv: null
+opened:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+dummy_v4_codec: 128x128 prv: null
+dummy_v2_codec -> NULL
+closed:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+NULL  : 128x128 prv: null
+opened:
+dummy_v2_codec: 128x128 prv: set opts: 1500100900 i'm src default value
+NULL  : 128x128 prv: null
+dummy_v3_codec -> dummy_v1_codec
+closed:
+dummy_v3_codec: 128x128 prv: set
+dummy_v1_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+opened:
+dummy_v3_codec: 128x128 prv: set
+dummy_v1_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+dummy_v3_codec -> dummy_v2_codec
+closed:
+dummy_v3_codec: 128x128 prv: set
+dummy_v2_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+opened:
+dummy_v3_codec: 128x128 prv: set
+dummy_v2_codec: 128x128 prv: set opts: 667 i'm dest value before copy
+dummy_v3_codec -> dummy_v3_codec
+closed:
+dummy_v3_codec: 128x128 prv: set
+dummy_v3_codec: 128x128 prv: set
+opened:
+dummy_v3_codec: 

[FFmpeg-cvslog] lavc/options: add test for avcodec_copy_context

2014-12-08 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Thu Dec  4 
00:06:40 2014 +0100| [72732307d9f2b9ffa82ab8503edb062db872c702] | committer: 
Lukasz Marek

lavc/options: add test for avcodec_copy_context

This test doesn't cover every possible issue with this function.
It covers options management only.

Signed-off-by: Lukasz Marek 

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

 libavcodec/Makefile  |2 +
 libavcodec/options.c |  171 ++
 2 files changed, 173 insertions(+)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index fa0f53d..48c3a85 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -858,6 +858,8 @@ SKIPHEADERS-$(CONFIG_VDA)  += vda.h 
vda_internal.h
 SKIPHEADERS-$(CONFIG_VDPAU)+= vdpau.h vdpau_internal.h
 
 TESTPROGS = imgconvert  \
+options \
+
 
 TESTPROGS-$(CONFIG_CABAC) += cabac
 TESTPROGS-$(CONFIG_FFT)   += fft fft-fixed fft-fixed32
diff --git a/libavcodec/options.c b/libavcodec/options.c
index d184846..17dca08 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -309,3 +309,174 @@ const AVClass *avcodec_get_subtitle_rect_class(void)
 {
 return &av_subtitle_rect_class;
 }
+
+#ifdef TEST
+static int dummy_init(AVCodecContext *ctx)
+{
+//TODO: this code should set every possible pointer that could be set by 
codec and is not an option;
+ctx->extradata_size = 8;
+ctx->extradata = av_malloc(ctx->extradata_size);
+ctx->coded_frame = av_frame_alloc();
+return 0;
+}
+
+static int dummy_close(AVCodecContext *ctx)
+{
+av_freep(&ctx->extradata);
+ctx->extradata_size = 0;
+av_frame_free(&ctx->coded_frame);
+return 0;
+}
+
+static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame 
*frame, int *got_packet)
+{
+return AVERROR(ENOSYS);
+}
+
+typedef struct Dummy12Context {
+AVClass  *av_class;
+int  num;
+char*str;
+} Dummy12Context;
+
+typedef struct Dummy3Context {
+void *fake_av_class;
+int  num;
+char*str;
+} Dummy3Context;
+
+#define OFFSET(x) offsetof(Dummy12Context, x)
+#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
+static const AVOption dummy_options[] = {
+{ "str", "set str", OFFSET(str), AV_OPT_TYPE_STRING, { .str = "i'm src 
default value" }, 0, 0, VE},
+{ "num", "set num", OFFSET(num), AV_OPT_TYPE_INT,{ .i64 = 1500100900 
},0, INT_MAX, VE},
+{ NULL },
+};
+
+static const AVClass dummy_v1_class = {
+.class_name = "dummy_v1_class",
+.item_name  = av_default_item_name,
+.option = dummy_options,
+.version= LIBAVUTIL_VERSION_INT,
+};
+
+static const AVClass dummy_v2_class = {
+.class_name = "dummy_v2_class",
+.item_name  = av_default_item_name,
+.option = dummy_options,
+.version= LIBAVUTIL_VERSION_INT,
+};
+
+/* codec with options */
+AVCodec dummy_v1_encoder = {
+.name = "dummy_v1_codec",
+.type = AVMEDIA_TYPE_VIDEO,
+.id   = AV_CODEC_ID_NONE - 1,
+.encode2  = dummy_encode,
+.init = dummy_init,
+.close= dummy_close,
+.priv_class   = &dummy_v1_class,
+.priv_data_size   = sizeof(Dummy12Context),
+};
+
+/* codec with options, different class */
+AVCodec dummy_v2_encoder = {
+.name = "dummy_v2_codec",
+.type = AVMEDIA_TYPE_VIDEO,
+.id   = AV_CODEC_ID_NONE - 2,
+.encode2  = dummy_encode,
+.init = dummy_init,
+.close= dummy_close,
+.priv_class   = &dummy_v2_class,
+.priv_data_size   = sizeof(Dummy12Context),
+};
+
+/* codec with priv data, but no class */
+AVCodec dummy_v3_encoder = {
+.name = "dummy_v3_codec",
+.type = AVMEDIA_TYPE_VIDEO,
+.id   = AV_CODEC_ID_NONE - 3,
+.encode2  = dummy_encode,
+.init = dummy_init,
+.close= dummy_close,
+.priv_data_size   = sizeof(Dummy3Context),
+};
+
+/* codec without priv data */
+AVCodec dummy_v4_encoder = {
+.name = "dummy_v4_codec",
+.type = AVMEDIA_TYPE_VIDEO,
+.id   = AV_CODEC_ID_NONE - 4,
+.encode2  = dummy_encode,
+.init = dummy_init,
+.close= dummy_close,
+};
+
+static void test_copy_print_codec(const AVCodecContext *ctx)
+{
+printf("%-14s: %dx%d prv: %s",
+   ctx->codec ? ctx->codec->name : "NULL",
+   ctx->width, ctx->height,
+   ctx->priv_data ? "set" : "null");
+if (ctx->codec && ctx->codec->priv_class && ctx->codec->priv_data_size) {
+int64_t i64;
+char *str = NULL;
+av_opt_get_int(ctx->priv_data, "num", 0, &i64);
+av_o

[FFmpeg-cvslog] Merge commit 'e2e07dbaab1f17e995842b7eacec4665d44c3d14'

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  8 
23:01:42 2014 +0100| [885e74622e3f3be31aebee35540339c7652e723f] | committer: 
Michael Niedermayer

Merge commit 'e2e07dbaab1f17e995842b7eacec4665d44c3d14'

* commit 'e2e07dbaab1f17e995842b7eacec4665d44c3d14':
  mov: expand the list of parsed metadata tags

Conflicts:
libavformat/mov.c

See: 543f3db9784348499a1ac1088373e2fb9100d4c0
See: dadf668df20e041b330fa4d3c5feb32a3f495d32
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mov: expand the list of parsed metadata tags

2014-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Nov 28 23:25:20 2014 +| [e2e07dbaab1f17e995842b7eacec4665d44c3d14] | 
committer: Vittorio Giovara

mov: expand the list of parsed metadata tags

Based on L-Smash code by Yusuke Nakamura .

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8124d69..44e26fe 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -266,19 +266,39 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
 case MKTAG( 'X','M','P','_'):
 if (c->export_xmp) { key = "xmp"; raw = 1; } break;
 case MKTAG( 'a','A','R','T'): key = "album_artist";break;
+case MKTAG( 'a','k','I','D'): key = "account_type";
+parse = mov_metadata_int8_no_padding; break;
+case MKTAG( 'a','p','I','D'): key = "account_id"; break;
+case MKTAG( 'c','a','t','g'): key = "category"; break;
+case MKTAG( 'c','p','i','l'): key = "compilation";
+parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 'c','p','r','t'): key = "copyright"; break;
 case MKTAG( 'd','e','s','c'): key = "description"; break;
 case MKTAG( 'd','i','s','k'): key = "disc";
 parse = mov_metadata_track_or_disc_number; break;
+case MKTAG( 'e','g','i','d'): key = "episode_uid";
+parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 'g','n','r','e'): key = "genre";
 parse = mov_metadata_gnre; break;
 case MKTAG( 'h','d','v','d'): key = "hd_video";
 parse = mov_metadata_int8_no_padding; break;
+case MKTAG( 'k','e','y','w'): key = "keywords";  break;
 case MKTAG( 'l','d','e','s'): key = "synopsis";  break;
 case MKTAG( 'l','o','c','i'):
 return mov_metadata_loci(c, pb, atom.size);
+case MKTAG( 'p','c','s','t'): key = "podcast";
+parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 'p','g','a','p'): key = "gapless_playback";
 parse = mov_metadata_int8_no_padding; break;
+case MKTAG( 'p','u','r','d'): key = "purchase_date"; break;
+case MKTAG( 'r','t','n','g'): key = "rating";
+parse = mov_metadata_int8_no_padding; break;
+case MKTAG( 's','o','a','a'): key = "sort_album_artist"; break;
+case MKTAG( 's','o','a','l'): key = "sort_album";   break;
+case MKTAG( 's','o','a','r'): key = "sort_artist";  break;
+case MKTAG( 's','o','c','o'): key = "sort_composer"; break;
+case MKTAG( 's','o','n','m'): key = "sort_name";break;
+case MKTAG( 's','o','s','n'): key = "sort_show";break;
 case MKTAG( 's','t','i','k'): key = "media_type";
 parse = mov_metadata_int8_no_padding; break;
 case MKTAG( 't','r','k','n'): key = "track";
@@ -298,8 +318,11 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 case MKTAG(0xa9,'d','a','y'): key = "date";  break;
 case MKTAG(0xa9,'e','n','c'): key = "encoder";   break;
 case MKTAG(0xa9,'g','e','n'): key = "genre"; break;
+case MKTAG(0xa9,'g','r','p'): key = "grouping";  break;
 case MKTAG(0xa9,'i','n','f'): key = "comment";   break;
+case MKTAG(0xa9,'l','y','r'): key = "lyrics";break;
 case MKTAG(0xa9,'n','a','m'): key = "title"; break;
+case MKTAG(0xa9,'s','t','3'): key = "subtitle";  break;
 case MKTAG(0xa9,'s','w','r'): key = "encoder";   break;
 case MKTAG(0xa9,'t','o','o'): key = "encoder";   break;
 case MKTAG(0xa9,'w','r','t'): key = "composer";  break;

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


Re: [FFmpeg-cvslog] Merge commit '6fd91fa11909f27902498648680dbb3d13f1f175'

2014-12-08 Thread Carl Eugen Hoyos
Michael Niedermayer  videolan.org> writes:

> * commit '6fd91fa11909f27902498648680dbb3d13f1f175':
>   h264: increase MAX_SLICES to 32

You had fixed this bug in 716c1f7b

Carl Eugen

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


[FFmpeg-cvslog] configure: use use_pkg_config() instead of check_pkg_config() for libsmbclient

2014-12-08 Thread Moritz Barsnick
ffmpeg | branch: master | Moritz Barsnick  | Mon Dec  8 
16:08:20 2014 +0100| [754f4957d7a7e5be0df0e9de1d31aebeecdc4476] | committer: 
Michael Niedermayer

configure: use use_pkg_config() instead of check_pkg_config() for libsmbclient

This ensures that the CFLAGS and LDFLAGS are actually applied.
Fixes an incorrect change introduced with the clean-up in commit
cfcaf6b38e39ed6e788abb1a5a44f23660dce2f6.

Reviewed-by: Nicolas George 
Signed-off-by: Michael Niedermayer 

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

 configure |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 40d5428..0933210 100755
--- a/configure
+++ b/configure
@@ -4887,7 +4887,7 @@ enabled libquvi   && require_pkg_config libquvi 
quvi/quvi.h quvi_init
 enabled librtmp   && require_pkg_config librtmp librtmp/rtmp.h 
RTMP_Socket
 enabled libschroedinger   && require_pkg_config schroedinger-1.0 
schroedinger/schro.h schro_init
 enabled libshine  && require_pkg_config shine shine/layer3.h 
shine_encode_buffer
-enabled libsmbclient  && { check_pkg_config smbclient libsmbclient.h 
smbc_init ||
+enabled libsmbclient  && { use_pkg_config smbclient libsmbclient.h 
smbc_init ||
require smbclient libsmbclient.h smbc_init 
-lsmbclient; }
 enabled libsoxr   && require libsoxr soxr.h soxr_create -lsoxr
 enabled libssh&& require_pkg_config libssh libssh/sftp.h sftp_init

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


[FFmpeg-cvslog] avdevice/xcbgrab: check xcb_query_pointer_reply_t pointer before use

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  9 
01:54:51 2014 +0100| [e86df0206f06b8d1e97e2b60db8f74a398d53127] | committer: 
Michael Niedermayer

avdevice/xcbgrab: check xcb_query_pointer_reply_t pointer before use

Fixes CID1254668

Signed-off-by: Michael Niedermayer 

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

 libavdevice/xcbgrab.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index f2b9135..ca85186 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -106,12 +106,17 @@ static int xcbgrab_reposition(AVFormatContext *s,
   xcb_get_geometry_reply_t *geo)
 {
 XCBGrabContext *c = s->priv_data;
-int x = c->x, y = c->y, p_x = p->win_x, p_y = p->win_y;
+int x, y, p_x, p_y;
 int w = c->width, h = c->height, f = c->follow_mouse;
 
 if (!p || !geo)
 return AVERROR(EIO);
 
+x = c->x;
+y = c->y;
+p_x = p->win_x;
+p_y = p->win_y;
+
 if (f == FOLLOW_CENTER) {
 x = p_x - w / 2;
 y = p_y - h / 2;

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


[FFmpeg-cvslog] avformat/utils: Compute the current pts of mpeg1/2 I/ P frames from the next frame when available

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  9 
03:34:20 2014 +0100| [dd70470d72758b4e94b17c6808a5ed0c9e8fe097] | committer: 
Michael Niedermayer

avformat/utils: Compute the current pts of mpeg1/2 I/P frames from the next 
frame when available

Signed-off-by: Michael Niedermayer 

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

 libavformat/utils.c |8 
 1 file changed, 8 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index f70223b..3246da6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1102,6 +1102,14 @@ static void compute_pkt_fields(AVFormatContext *s, 
AVStream *st,
 st->last_IP_duration = pkt->duration;
 if (pkt->dts != AV_NOPTS_VALUE)
 st->cur_dts = pkt->dts + st->last_IP_duration;
+if (pkt->dts != AV_NOPTS_VALUE &&
+pkt->pts == AV_NOPTS_VALUE &&
+st->last_IP_duration > 0 &&
+(st->cur_dts - next_dts) <= 1 &&
+next_dts != next_pts &&
+next_pts != AV_NOPTS_VALUE)
+pkt->pts = next_dts;
+
 st->last_IP_duration = pkt->duration;
 st->last_IP_pts  = pkt->pts;
 /* Cannot compute PTS if not present (we can compute it only

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


[FFmpeg-cvslog] avformat/utils: Pass the next pts/dts to compute_pkt_fields() when available

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  9 
03:33:44 2014 +0100| [9e561410c08ebe128e0be86f7b4492dc7bc87bb2] | committer: 
Michael Niedermayer

avformat/utils: Pass the next pts/dts to compute_pkt_fields() when available

Signed-off-by: Michael Niedermayer 

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

 libavformat/utils.c |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 798c612..f70223b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -974,7 +974,8 @@ static void update_initial_durations(AVFormatContext *s, 
AVStream *st,
 }
 
 static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
-   AVCodecParserContext *pc, AVPacket *pkt)
+   AVCodecParserContext *pc, AVPacket *pkt,
+   int64_t next_dts, int64_t next_pts)
 {
 int num, den, presentation_delayed, delay, i;
 int64_t offset;
@@ -1176,11 +1177,13 @@ static int parse_packet(AVFormatContext *s, AVPacket 
*pkt, int stream_index)
 got_output = 1;
 } else if (!size && st->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) {
 // preserve 0-size sync packets
-compute_pkt_fields(s, st, st->parser, pkt);
+compute_pkt_fields(s, st, st->parser, pkt, AV_NOPTS_VALUE, 
AV_NOPTS_VALUE);
 }
 
 while (size > 0 || (pkt == &flush_pkt && got_output)) {
 int len;
+int64_t next_pts = pkt->pts;
+int64_t next_dts = pkt->dts;
 
 av_init_packet(&out_pkt);
 len = av_parser_parse2(st->parser, st->codec,
@@ -1233,7 +1236,7 @@ static int parse_packet(AVFormatContext *s, AVPacket 
*pkt, int stream_index)
 if (st->parser->key_frame == -1 && st->parser->pict_type 
==AV_PICTURE_TYPE_NONE && (pkt->flags&AV_PKT_FLAG_KEY))
 out_pkt.flags |= AV_PKT_FLAG_KEY;
 
-compute_pkt_fields(s, st, st->parser, &out_pkt);
+compute_pkt_fields(s, st, st->parser, &out_pkt, next_dts, next_pts);
 
 if (out_pkt.data == pkt->data && out_pkt.size == pkt->size) {
 out_pkt.buf = pkt->buf;
@@ -1352,7 +1355,7 @@ static int read_frame_internal(AVFormatContext *s, 
AVPacket *pkt)
 if (!st->need_parsing || !st->parser) {
 /* no parsing needed: we just output the packet as is */
 *pkt = cur_pkt;
-compute_pkt_fields(s, st, NULL, pkt);
+compute_pkt_fields(s, st, NULL, pkt, AV_NOPTS_VALUE, 
AV_NOPTS_VALUE);
 if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&
 (pkt->flags & AV_PKT_FLAG_KEY) && pkt->dts != AV_NOPTS_VALUE) {
 ff_reduce_index(s, st->index);

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


[FFmpeg-cvslog] ffserver_config: check strchr() return for NULL

2014-12-08 Thread Reynaldo H. Verdejo Pinochet
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet 
 | Mon Dec  8 12:42:39 2014 -0300| 
[f95cfff07765912676cc613b55e2234b5d70f1bd] | committer: Reynaldo H. Verdejo 
Pinochet

ffserver_config: check strchr() return for NULL

Should fix FFmpeg Coverity Scan issue #1257013

Signed-off-by: Reynaldo H. Verdejo Pinochet 

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

 ffserver_config.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index ccc35d7..51e3f49 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -520,7 +520,13 @@ static int ffserver_save_avoption(const char *opt, const 
char *arg, int type, FF
 //explicit private option
 snprintf(buff, sizeof(buff), "%s", opt);
 codec_name = buff;
-option = strchr(buff, ':');
+if(!(option = strchr(buff, ':'))){
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"Syntax error. Unmatched ':'\n");
+return -1;
+
+}
 buff[option - buff] = '\0';
 option++;
 if ((ret = ffserver_set_codec(ctx, codec_name, config)) < 0)

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


[FFmpeg-cvslog] ffserver_config: break lines at 80 chars

2014-12-08 Thread Reynaldo H. Verdejo Pinochet
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet 
 | Mon Dec  8 17:25:35 2014 -0300| 
[b4c69b7ea8c0683f5a4b659d055132db328a1351] | committer: Reynaldo H. Verdejo 
Pinochet

ffserver_config: break lines at 80 chars

Add braces when needed and drop redundant parethesis while at it.

Signed-off-by: Reynaldo H. Verdejo Pinochet 

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

 ffserver_config.c |  168 +
 1 file changed, 105 insertions(+), 63 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index 6c7b9b8..d17b57e 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -132,7 +132,8 @@ void ffserver_parse_acl_row(FFServerStream *stream, 
FFServerStream* feed,
 ffserver_get_arg(arg, sizeof(arg), &p);
 
 if (resolve_host(&acl.first, arg)) {
-fprintf(stderr, "%s:%d: ACL refers to invalid host or IP address 
'%s'\n",
+fprintf(stderr,
+"%s:%d: ACL refers to invalid host or IP address '%s'\n",
 filename, line_num, arg);
 errors++;
 } else
@@ -196,7 +197,8 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 av_opt_set_dict2(av, opts, AV_OPT_SEARCH_CHILDREN);
 if (av_dict_count(*opts))
 av_log(NULL, AV_LOG_WARNING,
-   "Something is wrong, %d options are not set!\n", 
av_dict_count(*opts));
+   "Something is wrong, %d options are not set!\n",
+   av_dict_count(*opts));
 
 if (config->stream_use_defaults) {
 //TODO: reident
@@ -262,8 +264,8 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 if (!av_dict_get(recommended, "rc_eq", NULL, 0)) {
 av->rc_eq = av_strdup("tex^qComp");
 av_dict_set(&recommended, "rc_eq", "tex^qComp", 0);
-WARNING("Setting default value for video rate control equation = 
%s. "
-"Use NoDefaults to disable it.\n",
+WARNING("Setting default value for video rate control equation = "
+"%s. Use NoDefaults to disable it.\n",
 av->rc_eq);
 }
 if (!av_dict_get(recommended, "maxrate", NULL, 0)) {
@@ -289,16 +291,19 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 switch(av->codec_type) {
 case AVMEDIA_TYPE_AUDIO:
 if (av->bit_rate == 0)
-report_config_error(config->filename, config->line_num, 
AV_LOG_ERROR,
-&config->errors, "audio bit rate is not 
set\n");
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"audio bit rate is not set\n");
 if (av->sample_rate == 0)
-report_config_error(config->filename, config->line_num, 
AV_LOG_ERROR,
-&config->errors, "audio sample rate is not 
set\n");
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"audio sample rate is not set\n");
 break;
 case AVMEDIA_TYPE_VIDEO:
 if (av->width == 0 || av->height == 0)
-report_config_error(config->filename, config->line_num, 
AV_LOG_ERROR,
-&config->errors, "video size is not 
set\n");
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"video size is not set\n");
 break;
 default:
 av_assert0(0);
@@ -315,13 +320,15 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 stream->streams[stream->nb_streams++] = st;
 }
 
-static int ffserver_set_codec(AVCodecContext *ctx, const char *codec_name, 
FFServerConfig *config)
+static int ffserver_set_codec(AVCodecContext *ctx, const char *codec_name,
+  FFServerConfig *config)
 {
 int ret;
 AVCodec *codec = avcodec_find_encoder_by_name(codec_name);
 if (!codec || codec->type != ctx->codec_type) {
 report_config_error(config->filename, config->line_num, AV_LOG_ERROR,
-&config->errors, "Invalid codec name: '%s'\n", 
codec_name);
+&config->errors,
+"Invalid codec name: '%s'\n", codec_name);
 return 0;
 }
 if (ctx->codec_id == AV_CODEC_ID_NONE && !ctx->priv_data) {
@@ -330,8 +337,10 @@ static int ffserver_set_codec(AVCodecContext *ctx, const 
char *codec_name, FFSer
 ctx->codec = codec;
 }
 if (ctx->codec_id != codec->id)
-report_config_error(config->filename, config->line_num, AV_LOG_ERROR, 
&config->errors,
-

[FFmpeg-cvslog] ffserver_config: improve error/warning messages

2014-12-08 Thread Reynaldo H. Verdejo Pinochet
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet 
 | Mon Dec  8 14:12:36 2014 -0300| 
[b28d5877826c89cbf8b3f6ad9ba3e57307a2f33b] | committer: Reynaldo H. Verdejo 
Pinochet

ffserver_config: improve error/warning messages

Fix grammar and quote user-supplied values.

Signed-off-by: Reynaldo H. Verdejo Pinochet 

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

 ffserver_config.c |   71 +++--
 1 file changed, 36 insertions(+), 35 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index 51e3f49..6c7b9b8 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -124,7 +124,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, 
FFServerStream* feed,
 else if (av_strcasecmp(arg, "deny") == 0)
 acl.action = IP_DENY;
 else {
-fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n",
+fprintf(stderr, "%s:%d: ACL action '%s' should be ALLOW or DENY.\n",
 filename, line_num, arg);
 errors++;
 }
@@ -163,7 +163,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, 
FFServerStream* feed,
 else if (ext_acl)
 naclp = &ext_acl;
 else {
-fprintf(stderr, "%s:%d: ACL found not in  or \n",
+fprintf(stderr, "%s:%d: ACL found not in  or \n",
 filename, line_num);
 errors++;
 }
@@ -321,7 +321,7 @@ static int ffserver_set_codec(AVCodecContext *ctx, const 
char *codec_name, FFSer
 AVCodec *codec = avcodec_find_encoder_by_name(codec_name);
 if (!codec || codec->type != ctx->codec_type) {
 report_config_error(config->filename, config->line_num, AV_LOG_ERROR,
-&config->errors, "Invalid codec name: %s\n", 
codec_name);
+&config->errors, "Invalid codec name: '%s'\n", 
codec_name);
 return 0;
 }
 if (ctx->codec_id == AV_CODEC_ID_NONE && !ctx->priv_data) {
@@ -331,7 +331,7 @@ static int ffserver_set_codec(AVCodecContext *ctx, const 
char *codec_name, FFSer
 }
 if (ctx->codec_id != codec->id)
 report_config_error(config->filename, config->line_num, AV_LOG_ERROR, 
&config->errors,
-"Inconsistent configuration: trying to set %s 
codec option, but %s codec is used previously\n",
+"Inconsistent configuration: trying to set '%s' 
codec option, but '%s' codec is used previously\n",
 codec_name, avcodec_get_name(ctx->codec_id));
 return 0;
 }
@@ -543,7 +543,7 @@ static int ffserver_save_avoption(const char *opt, const 
char *arg, int type, FF
 o = av_opt_find(ctx, option, NULL, 0, 0);
 if (!o) {
 report_config_error(config->filename, config->line_num, AV_LOG_ERROR,
-&config->errors, "Option not found: %s\n", opt);
+&config->errors, "Option not found: '%s'\n", opt);
 if (!hinted && ctx->codec_id == AV_CODEC_ID_NONE) {
 hinted = 1;
 report_config_error(config->filename, config->line_num, 
AV_LOG_ERROR, NULL,
@@ -560,7 +560,7 @@ static int ffserver_save_avoption(const char *opt, const 
char *arg, int type, FF
 return av_dict_set(dict, option, arg, AV_DICT_APPEND);
 report_config_error(config->filename, config->line_num, AV_LOG_ERROR,
 &config->errors,
-"Redeclaring value of the option %s, previous value: %s\n",
+"Redeclaring value of option '%s'. Previous value was: 
'%s'.\n",
 opt, e->value);
 } else if (av_dict_set(dict, option, arg, 0) < 0) {
 return AVERROR(ENOMEM);
@@ -583,21 +583,21 @@ static int ffserver_parse_config_global(FFServerConfig 
*config, const char *cmd,
 char arg[1024];
 if (!av_strcasecmp(cmd, "Port") || !av_strcasecmp(cmd, "HTTPPort")) {
 if (!av_strcasecmp(cmd, "Port"))
-WARNING("Port option is deprecated, use HTTPPort instead\n");
+WARNING("Port option is deprecated. Use HTTPPort instead.\n");
 ffserver_get_arg(arg, sizeof(arg), p);
 ffserver_set_int_param(&val, arg, 0, 1, 65535, config,
 "Invalid port: %s\n", arg);
 if (val < 1024)
-WARNING("Trying to use IETF assigned system port: %d\n", val);
+WARNING("Trying to use IETF assigned system port: '%d'\n", val);
 config->http_addr.sin_port = htons(val);
 } else if (!av_strcasecmp(cmd, "HTTPBindAddress") || !av_strcasecmp(cmd, 
"BindAddress")) {
 if (!av_strcasecmp(cmd, "BindAddress"))
-WARNING("BindAddress option is deprecated, use HTTPBindAddress 
instead\n");
+WARNING("BindAddress option is deprecated. Use HTTPBindAddress 
instead.\n");
 ffserver_get_arg(arg, sizeof(arg), p);
 if (resolve_host(&config->http_addr.sin_addr, arg))
-ER

[FFmpeg-cvslog] ffserver_config: reflow add_codec()

2014-12-08 Thread Reynaldo H. Verdejo Pinochet
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet 
 | Mon Dec  8 18:32:22 2014 -0300| 
[720dffb843aa780d25b7be224c63ffc0aba13671] | committer: Reynaldo H. Verdejo 
Pinochet

ffserver_config: reflow add_codec()

Signed-off-by: Reynaldo H. Verdejo Pinochet 

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

 ffserver_config.c |   52 
 1 file changed, 28 insertions(+), 24 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index d17b57e..017af48 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -195,13 +195,38 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 av_dict_copy(&recommended, *opts, 0);
 av_opt_set_dict2(av->priv_data, opts, AV_OPT_SEARCH_CHILDREN);
 av_opt_set_dict2(av, opts, AV_OPT_SEARCH_CHILDREN);
+
 if (av_dict_count(*opts))
 av_log(NULL, AV_LOG_WARNING,
"Something is wrong, %d options are not set!\n",
av_dict_count(*opts));
 
-if (config->stream_use_defaults) {
-//TODO: reident
+if (!config->stream_use_defaults) {
+switch(av->codec_type) {
+case AVMEDIA_TYPE_AUDIO:
+if (av->bit_rate == 0)
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"audio bit rate is not set\n");
+if (av->sample_rate == 0)
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"audio sample rate is not set\n");
+break;
+case AVMEDIA_TYPE_VIDEO:
+if (av->width == 0 || av->height == 0)
+report_config_error(config->filename, config->line_num,
+AV_LOG_ERROR, &config->errors,
+"video size is not set\n");
+break;
+default:
+av_assert0(0);
+}
+goto done;
+}
+
+/* stream_use_defaults = true */
+
 /* compute default parameters */
 switch(av->codec_type) {
 case AVMEDIA_TYPE_AUDIO:
@@ -287,29 +312,8 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 default:
 abort();
 }
-} else {
-switch(av->codec_type) {
-case AVMEDIA_TYPE_AUDIO:
-if (av->bit_rate == 0)
-report_config_error(config->filename, config->line_num,
-AV_LOG_ERROR, &config->errors,
-"audio bit rate is not set\n");
-if (av->sample_rate == 0)
-report_config_error(config->filename, config->line_num,
-AV_LOG_ERROR, &config->errors,
-"audio sample rate is not set\n");
-break;
-case AVMEDIA_TYPE_VIDEO:
-if (av->width == 0 || av->height == 0)
-report_config_error(config->filename, config->line_num,
-AV_LOG_ERROR, &config->errors,
-"video size is not set\n");
-break;
-default:
-av_assert0(0);
-}
-}
 
+done:
 st = av_mallocz(sizeof(AVStream));
 if (!st)
 return;

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


[FFmpeg-cvslog] avformat/utils: fix calculating the absolute difference of timestamps

2014-12-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  9 
05:31:30 2014 +0100| [a5e5959d52860678d028df07ad1351a11aaf47f7] | committer: 
Michael Niedermayer

avformat/utils: fix calculating the absolute difference of timestamps

we dont use FFABS(a-b) as that could result in undefined behavior if it 
overflows

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3246da6..3447b35 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1105,7 +1105,7 @@ static void compute_pkt_fields(AVFormatContext *s, 
AVStream *st,
 if (pkt->dts != AV_NOPTS_VALUE &&
 pkt->pts == AV_NOPTS_VALUE &&
 st->last_IP_duration > 0 &&
-(st->cur_dts - next_dts) <= 1 &&
+((uint64_t)st->cur_dts - (uint64_t)next_dts + 1) <= 2 &&
 next_dts != next_pts &&
 next_pts != AV_NOPTS_VALUE)
 pkt->pts = next_dts;

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