[vlc-commits] vdpau/avcodec: fix build for older ffmpeg

2014-02-17 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Feb  5 
16:51:28 2014 -0500| [a49ee406b24b8455fcf4bcd883d7ad6b6bd0745f] | committer: 
Rafaël Carré

vdpau/avcodec: fix build for older ffmpeg

Signed-off-by: Rafaël Carré fun...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a49ee406b24b8455fcf4bcd883d7ad6b6bd0745f
---

 modules/hw/vdpau/avcodec.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 7081dee..a6eab23 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -37,6 +37,7 @@
 #include vlc_xlib.h
 #include vlc_vdpau.h
 #include ../../codec/avcodec/va.h
+#include ../../codec/avcodec/avcommon_compat.h
 
 static int Open(vlc_va_t *, int, const es_format_t *);
 static void Close(vlc_va_t *);
@@ -279,7 +280,7 @@ static int Open(vlc_va_t *va, int codec, const es_format_t 
*fmt)
 if (unlikely(sys == NULL))
return VLC_ENOMEM;
 
-#if (LIBAVCODEC_VERSION_INT = AV_VERSION_INT(55, 26, 0))
+#if LIBAVCODEC_VERSION_CHECK(55, 26, 0, 42, 100)
 sys-context = av_vdpau_alloc_context();
 #else
 sys-context = calloc(1, sizeof (*sys-context));

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: add encoder

2014-02-20 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Feb 14 
02:16:37 2014 -0500| [858f38cf3d59c18724657339ad762c6c87e8889c] | committer: 
Tristan Matthews

png: add encoder

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=858f38cf3d59c18724657339ad762c6c87e8889c
---

 modules/codec/png.c |  200 +--
 1 file changed, 194 insertions(+), 6 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index b4d6ef4..6a20b82 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -33,12 +33,31 @@
 #include vlc_codec.h
 #include png.h
 
+/* PNG_SYS_COMMON_MEMBERS:
+ * members common to encoder and decoder descriptors
+ */
+#define PNG_SYS_COMMON_MEMBERS  \
+/**@{*/ \
+bool b_error;   \
+vlc_object_t *p_obj;\
+/**@}*/ \
+
+/*
+ * png common descriptor
+ */
+struct png_sys_t
+{
+PNG_SYS_COMMON_MEMBERS
+};
+
+typedef struct png_sys_t png_sys_t;
+
 /*
  * decoder_sys_t : png decoder descriptor
  */
 struct decoder_sys_t
 {
-bool b_error;
+PNG_SYS_COMMON_MEMBERS
 };
 
 /*
@@ -49,6 +68,20 @@ static void CloseDecoder  ( vlc_object_t * );
 
 static picture_t *DecodeBlock  ( decoder_t *, block_t ** );
 
+/*
+ * png encoder descriptor
+ */
+struct encoder_sys_t
+{
+PNG_SYS_COMMON_MEMBERS
+int i_blocksize;
+};
+
+static int  OpenEncoder(vlc_object_t *);
+static void CloseEncoder(vlc_object_t *);
+
+static block_t *EncodeBlock(encoder_t *, picture_t *);
+
 /*
  * Module descriptor
  */
@@ -59,6 +92,14 @@ vlc_module_begin ()
 set_capability( decoder, 1000 )
 set_callbacks( OpenDecoder, CloseDecoder )
 add_shortcut( png )
+
+/* encoder submodule */
+add_submodule()
+add_shortcut(png)
+set_section(N_(Encoding), NULL)
+set_description(N_(PNG video encoder))
+set_capability(encoder, 1000)
+set_callbacks(OpenEncoder, CloseEncoder)
 vlc_module_end ()
 
 /*
@@ -78,6 +119,8 @@ static int OpenDecoder( vlc_object_t *p_this )
 if( ( p_dec-p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )
 return VLC_ENOMEM;
 
+p_dec-p_sys-p_obj = p_this;
+
 /* Set output properties */
 p_dec-fmt_out.i_cat = VIDEO_ES;
 p_dec-fmt_out.i_codec = VLC_CODEC_RGBA;
@@ -101,17 +144,40 @@ static void user_read( png_structp p_png, png_bytep data, 
png_size_t i_length )
 p_block-i_buffer -= i_length;
 }
 
+static void user_flush( png_structp p_png )
+{
+/* noop */
+(void) p_png;
+}
+
+static void user_write( png_structp p_png, png_bytep data, png_size_t i_length 
)
+{
+block_t *p_block = (block_t *)png_get_io_ptr( p_png );
+if( i_length  p_block-i_buffer ) {
+char err_str[64];
+snprintf( err_str, sizeof(err_str),
+  block size %zu too small for %zu encoded bytes,
+  p_block-i_buffer, i_length );
+png_error( p_png, err_str );
+return;
+}
+
+memcpy( p_block-p_buffer, data, i_length );
+p_block-p_buffer += i_length;
+p_block-i_buffer -= i_length;
+}
+
 static void user_error( png_structp p_png, png_const_charp error_msg )
 {
-decoder_t *p_dec = (decoder_t *)png_get_error_ptr( p_png );
-p_dec-p_sys-b_error = true;
-msg_Err( p_dec, %s, error_msg );
+png_sys_t *p_sys = (png_sys_t *)png_get_error_ptr( p_png );
+p_sys-b_error = true;
+msg_Err( p_sys-p_obj, %s, error_msg );
 }
 
 static void user_warning( png_structp p_png, png_const_charp warning_msg )
 {
-decoder_t *p_dec = (decoder_t *)png_get_error_ptr( p_png );
-msg_Warn( p_dec, %s, warning_msg );
+png_sys_t *p_sys = (png_sys_t *)png_get_error_ptr( p_png );
+msg_Warn( p_sys-p_obj, %s, warning_msg );
 }
 
 /
@@ -253,3 +319,125 @@ static void CloseDecoder( vlc_object_t *p_this )
 
 free( p_sys );
 }
+
+static int OpenEncoder(vlc_object_t *p_this)
+{
+encoder_t *p_enc = (encoder_t *) p_this;
+
+if( p_enc-fmt_out.i_codec != VLC_CODEC_PNG )
+return VLC_EGENERIC;
+
+/* Allocate the memory needed to store the encoder's structure */
+p_enc-p_sys = malloc( sizeof(encoder_sys_t) );
+if( p_enc-p_sys  == NULL )
+return VLC_ENOMEM;
+
+p_enc-p_sys-p_obj = p_this;
+
+p_enc-p_sys-i_blocksize = 3 * p_enc-fmt_in.video.i_visible_width

[vlc-commits] png: split up assignment and comparison

2014-02-20 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Feb 20 
09:09:32 2014 -0500| [84b9f9ceae3ab1d8e98ff1e7f426c4f90c05eebe] | committer: 
Tristan Matthews

png: split up assignment and comparison

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84b9f9ceae3ab1d8e98ff1e7f426c4f90c05eebe
---

 modules/codec/png.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 6a20b82..4381f47 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -116,7 +116,8 @@ static int OpenDecoder( vlc_object_t *p_this )
 }
 
 /* Allocate the memory needed to store the decoder's structure */
-if( ( p_dec-p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )
+p_dec-p_sys = malloc( sizeof(decoder_sys_t) );
+if( p_dec-p_sys == NULL )
 return VLC_ENOMEM;
 
 p_dec-p_sys-p_obj = p_this;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Qt: animators: fix reorder warning

2014-02-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Feb 27 
16:36:33 2014 -0500| [ab870c51419e2e89db872940d1a21823fc2f4251] | committer: 
Tristan Matthews

Qt: animators: fix reorder warning

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab870c51419e2e89db872940d1a21823fc2f4251
---

 modules/gui/qt4/util/animators.hpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt4/util/animators.hpp 
b/modules/gui/qt4/util/animators.hpp
index 947ac1b..2daee4b 100644
--- a/modules/gui/qt4/util/animators.hpp
+++ b/modules/gui/qt4/util/animators.hpp
@@ -90,8 +90,8 @@ protected slots:
 void updateDelegate();
 
 private:
-BasicAnimator *animator;
 QAbstractItemView *view;
+BasicAnimator *animator;
 QPersistentModelIndex index;
 };
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: set pts and dts

2014-03-18 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tristan.matth...@savoirfairelinux.com 
| Tue Mar 18 11:56:58 2014 -0400| [1928d1bfdd9cf3ae79a47d16e7e8b8d22161651d] | 
committer: Tristan Matthews

png: encoder: set pts and dts

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1928d1bfdd9cf3ae79a47d16e7e8b8d22161651d
---

 modules/codec/png.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 4381f47..54a90fc 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -422,6 +422,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 /* restore original buffer position */
 p_block-p_buffer = p_start;
 p_block-i_buffer = i_start;
+
+p_block-i_dts = p_block-i_pts = p_pic-date;
+
 return p_block;
 
  error:

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: set visible_ width/height

2014-03-18 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Mar 18 
13:30:15 2014 -0400| [4c156e1054ce76bf305ae103646ce92ed6295e7b] | committer: 
Tristan Matthews

png: set visible_ width/height

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c156e1054ce76bf305ae103646ce92ed6295e7b
---

 modules/codec/png.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 54a90fc..d03e15a 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -251,8 +251,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 
 /* Set output properties */
 p_dec-fmt_out.i_codec = VLC_CODEC_RGBA;
-p_dec-fmt_out.video.i_width = i_width;
-p_dec-fmt_out.video.i_height = i_height;
+p_dec-fmt_out.video.i_visible_width = p_dec-fmt_out.video.i_width = 
i_width;
+p_dec-fmt_out.video.i_visible_height = p_dec-fmt_out.video.i_height = 
i_height;
 p_dec-fmt_out.video.i_sar_num = 1;
 p_dec-fmt_out.video.i_sar_den = 1;
 p_dec-fmt_out.video.i_rmask = 0x00ff;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: flac: use CLOCK_FREQ

2014-03-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Mar 21 
11:28:37 2014 -0400| [d9aed41951193e487823a660936555d879db72e3] | committer: 
Tristan Matthews

demux: flac: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9aed41951193e487823a660936555d879db72e3
---

 modules/demux/flac.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 7340d07..ff066d9 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -548,7 +548,7 @@ static void ParseSeekTable( demux_t *p_demux, const uint8_t 
*p_data, int i_data,
 continue;
 
 s = vlc_seekpoint_New();
-s-i_time_offset = i_sample * INT64_C(100)/i_sample_rate;
+s-i_time_offset = i_sample * CLOCK_FREQ / i_sample_rate;
 s-i_byte_offset = GetQWBE( p_data[4+18*i+8] );
 
 /* Check for duplicate entry */

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] lpcm bd: fix 24 bit stereo decoding

2014-03-25 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Mar 25 
01:14:21 2014 -0400| [84d7b2761dd9a033e0f0df7e6a3943e6e53990d7] | committer: 
Tristan Matthews

lpcm bd: fix 24 bit stereo decoding

Fixes #10265

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84d7b2761dd9a033e0f0df7e6a3943e6e53990d7
---

 modules/codec/lpcm.c |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index eb9793f..24c8555 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -1117,10 +1117,12 @@ static void BdExtract( block_t *p_aout_buffer, block_t 
*p_block,
 if (i_bits == 16) {
 swab( p_src, p_dst, (i_channels + i_channels_padding) * i_bits 
/ 8 );
 } else {
-p_dst[0] = 0;
-p_dst[1] = p_src[2];
-p_dst[2] = p_src[1];
-p_dst[3] = p_src[0];
+for (unsigned i = 0; i  i_channels; ++i) {
+p_dst[i * 4] = 0;
+p_dst[1 + (i * 4)] = p_src[2 + (i * 3)];
+p_dst[2 + (i * 4)] = p_src[1 + (i * 3)];
+p_dst[3 + (i * 4)] = p_src[i * 3];
+}
 }
 #endif
 p_src += (i_channels + i_channels_padding) * i_bits / 8;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Contribs: update libass to 0.11.1

2014-03-25 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Mar 25 
14:05:29 2014 -0400| [cf3eec8b6f0dc796f1b85a1c1710f95e485ba59c] | committer: 
Tristan Matthews

Contribs: update libass to 0.11.1

libass is now hosted on github

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf3eec8b6f0dc796f1b85a1c1710f95e485ba59c
---

 contrib/src/ass/SHA512SUMS |2 +-
 contrib/src/ass/rules.mak  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/src/ass/SHA512SUMS b/contrib/src/ass/SHA512SUMS
index b7e578b..8d589d9 100644
--- a/contrib/src/ass/SHA512SUMS
+++ b/contrib/src/ass/SHA512SUMS
@@ -1 +1 @@
-450141f5de5125696edbd44019e5eccb8b34f6173692c50abbc3b82b565221d4454760489469542dc4e2a51c7f952b4a565f2e9468b3fa8550a62e2eb1836b77
  libass-0.10.2.tar.gz
+e40dc0bdc7a12d4515122026dba7cb8b98b9a114eb23a9c36444a8d7bc1b6ec3d8876e113238a5ba5acd39faec5d302d191a14de59478ab4c1c66be58ffa3654
  libass-0.11.1.tar.gz
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index 507064a..e9f30df 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -1,6 +1,6 @@
 # ASS
-ASS_VERSION := 0.10.2
-ASS_URL := http://libass.googlecode.com/files/libass-$(ASS_VERSION).tar.gz
+ASS_VERSION := 0.11.1
+ASS_URL := 
https://github.com/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz
 
 PKGS += ass
 ifeq ($(call need_pkg,libass),)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec encoder: get bytes per pixel from context if needed

2014-04-02 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Apr  2 
02:18:33 2014 -0400| [f5a53d4ee1316bd42fbf7d62721901f24a5899be] | committer: 
Tristan Matthews

avcodec encoder: get bytes per pixel from context if needed

Falling back to 3 bytes broke the buffer allocation for BMP with ffmpeg, which
defaults to RGBA.

Fixes #9687

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5a53d4ee1316bd42fbf7d62721901f24a5899be
---

 modules/codec/avcodec/encoder.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index df77340..9bfe238 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1017,7 +1017,11 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
  * bits_per_pixel value, without having to assume anything.
  */
 const int bytesPerPixel = p_enc-fmt_out.video.i_bits_per_pixel ?
- p_enc-fmt_out.video.i_bits_per_pixel / 8 : 3;
+ p_enc-fmt_out.video.i_bits_per_pixel / 8 :
+ p_sys-p_context-bits_per_coded_sample ?
+ p_sys-p_context-bits_per_coded_sample / 8 :
+ 3;
+
 const int blocksize = __MAX( FF_MIN_BUFFER_SIZE,bytesPerPixel * 
p_sys-p_context-height * p_sys-p_context-width + 200 );
 block_t *p_block = block_Alloc( blocksize );
 if( unlikely(p_block == NULL) )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] scene: remove unused include

2014-04-03 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Apr  3 
13:32:32 2014 -0400| [360326dbf1a31ebf3f9ac713860550249c89d32e] | committer: 
Tristan Matthews

scene: remove unused include

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=360326dbf1a31ebf3f9ac713860550249c89d32e
---

 modules/video_filter/scene.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c
index 23d2783..3b8ad6f 100644
--- a/modules/video_filter/scene.c
+++ b/modules/video_filter/scene.c
@@ -35,7 +35,6 @@
 
 #include vlc_common.h
 #include vlc_plugin.h
-#include vlc_block.h
 
 #include vlc_filter.h
 #include filter_picture.h

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] visual: don't crash on empty buffers

2014-04-09 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Apr  8 
14:19:58 2014 -0400| [6c4493a71679f3995b81c828511a65896b6af88d] | committer: 
Tristan Matthews

visual: don't crash on empty buffers

Fixes #10533

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6c4493a71679f3995b81c828511a65896b6af88d
---

 modules/visualization/glspectrum.c |5 +
 modules/visualization/visual/effects.c |   10 ++
 2 files changed, 15 insertions(+)

diff --git a/modules/visualization/glspectrum.c 
b/modules/visualization/glspectrum.c
index d3b40cc..023b0c7 100644
--- a/modules/visualization/glspectrum.c
+++ b/modules/visualization/glspectrum.c
@@ -447,6 +447,11 @@ static void *Thread( void *p_data )
 int16_t  *p_buffs; /* int16_t converted buffer 
*/
 int16_t  *p_s16_buff;  /* int16_t converted buffer 
*/
 
+if (!block-i_nb_samples) {
+msg_Err(p_filter, no samples yet);
+goto release;
+}
+
 /* Allocate the buffer only if the number of samples change */
 if (block-i_nb_samples != p_sys-i_prev_nb_samples)
 {
diff --git a/modules/visualization/visual/effects.c 
b/modules/visualization/visual/effects.c
index ca2e1bd..c043cb0 100644
--- a/modules/visualization/visual/effects.c
+++ b/modules/visualization/visual/effects.c
@@ -119,6 +119,11 @@ static int spectrum_Run(visual_effect_t * p_effect, 
vlc_object_t *p_aout,
 int16_t  *p_buffs;/* int16_t converted buffer */
 int16_t  *p_s16_buff; /* int16_t converted buffer */
 
+if (!p_buffer-i_nb_samples) {
+msg_Err(p_aout, no samples yet);
+return -1;
+}
+
 /* Create p_data if needed */
 if( !p_data )
 {
@@ -451,6 +456,11 @@ static int spectrometer_Run(visual_effect_t * p_effect, 
vlc_object_t *p_aout,
 int16_t  *p_buffs;/* int16_t converted buffer */
 int16_t  *p_s16_buff;/* int16_t converted buffer */
 
+if (!p_buffer-i_nb_samples) {
+msg_Err(p_aout, no samples yet);
+return -1;
+}
+
 /* Create the data struct if needed */
 spectrometer_data *p_data = p_effect-p_data;
 if( !p_data )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] speex: deduce mode from rate when decoding rtp

2014-04-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Mon Apr 21 
00:29:54 2014 -0400| [08feb323f481d9fbfa914fea1d48d09581d8475e] | committer: 
Tristan Matthews

speex: deduce mode from rate when decoding rtp

Fixes #5178

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08feb323f481d9fbfa914fea1d48d09581d8475e
---

 modules/codec/speex.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index f366055..90d773a 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -650,9 +650,12 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, 
block_t **pp_block )
 msg_Err( p_dec, Could not allocate a Speex header.);
 return NULL;
 }
-speex_init_header( p_sys-p_header,p_sys-rtp_rate,1,speex_nb_mode );
+
+const SpeexMode *mode = speex_lib_get_mode((p_sys-rtp_rate / 8000)  
1);
+
+speex_init_header( p_sys-p_header,p_sys-rtp_rate, 1, mode );
 speex_bits_init( p_sys-bits );
-p_sys-p_state = speex_decoder_init( speex_nb_mode );
+p_sys-p_state = speex_decoder_init( mode );
 if ( !p_sys-p_state )
 {
 msg_Err( p_dec, Could not allocate a Speex decoder. );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] speex: cosmetics

2014-04-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Mon Apr 21 
11:12:17 2014 -0400| [cb792fd5de45691b088e30371f2f8f06fa5f0f4e] | committer: 
Tristan Matthews

speex: cosmetics

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb792fd5de45691b088e30371f2f8f06fa5f0f4e
---

 modules/codec/speex.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 90d773a..cbfb84a 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -558,18 +558,18 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet 
*p_oggpacket,
 i_pcm_output_size = p_sys-p_header-frame_size;
 p_frame_holder = (short*)xmalloc( sizeof(short)*i_pcm_output_size 
);
 
-speex_bits_read_from( p_sys-bits, (char*)p_oggpacket-packet,
+speex_bits_read_from( p_sys-bits, (char*)p_oggpacket-packet,
 p_oggpacket-bytes);
-i_bits_before = speex_bits_remaining( p_sys-bits );
+i_bits_before = speex_bits_remaining( p_sys-bits );
 speex_decode_int(p_sys-p_state, p_sys-bits, p_frame_holder);
 i_bits_after = speex_bits_remaining( p_sys-bits );
 
-i_bits_in_speex_frame = i_bits_before - i_bits_after;
+i_bits_in_speex_frame = i_bits_before - i_bits_after;
 i_bytes_in_speex_frame = ( i_bits_in_speex_frame +
 (8 - (i_bits_in_speex_frame % 8)) )
-/ 8;
+/ 8;
 
-p_new_block = block_Alloc( i_bytes_in_speex_frame );
+p_new_block = block_Alloc( i_bytes_in_speex_frame );
 memset( p_new_block-p_buffer, 0xff, i_bytes_in_speex_frame );
 
 /*
@@ -644,7 +644,7 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, 
block_t **pp_block )
 */
 if ( p_sys-bits.buf_size==0 )
 {
-p_sys-p_header = (SpeexHeader *)malloc(sizeof(SpeexHeader));
+p_sys-p_header = malloc(sizeof(SpeexHeader));
 if ( !p_sys-p_header )
 {
 msg_Err( p_dec, Could not allocate a Speex header.);
@@ -654,7 +654,7 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, 
block_t **pp_block )
 const SpeexMode *mode = speex_lib_get_mode((p_sys-rtp_rate / 8000)  
1);
 
 speex_init_header( p_sys-p_header,p_sys-rtp_rate, 1, mode );
-speex_bits_init( p_sys-bits );
+speex_bits_init( p_sys-bits );
 p_sys-p_state = speex_decoder_init( mode );
 if ( !p_sys-p_state )
 {
@@ -663,22 +663,22 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, 
block_t **pp_block )
 return NULL;
 }
 
-/*
+/*
   Assume that variable bit rate is enabled. Also assume
   that there is only one frame per packet.
 */
 p_sys-p_header-vbr = 1;
 p_sys-p_header-frames_per_packet = 1;
 
-p_dec-fmt_out.audio.i_channels = p_sys-p_header-nb_channels;
+p_dec-fmt_out.audio.i_channels = p_sys-p_header-nb_channels;
 p_dec-fmt_out.audio.i_physical_channels =
 p_dec-fmt_out.audio.i_original_channels =
 pi_channels_maps[p_sys-p_header-nb_channels];
-p_dec-fmt_out.audio.i_rate = p_sys-p_header-rate;
+p_dec-fmt_out.audio.i_rate = p_sys-p_header-rate;
 
-if ( speex_mode_query( speex_nb_mode,
-SPEEX_MODE_FRAME_SIZE,
-i_speex_frame_size ) )
+if ( speex_mode_query( speex_nb_mode,
+   SPEEX_MODE_FRAME_SIZE,
+   i_speex_frame_size ) )
 {
 msg_Err( p_dec, Could not determine the frame size. );
 speex_decoder_destroy( p_sys-p_state );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] speex: assume default settings if header is missing

2014-04-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sun Apr 20 
19:56:04 2014 -0400| [1a9bda43fc869ecc286e88e707a6098b05e138f1] | committer: 
Tristan Matthews

speex: assume default settings if header is missing

Fixes #2973

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a9bda43fc869ecc286e88e707a6098b05e138f1
---

 modules/codec/speex.c |   70 -
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 488b9c2..f366055 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -265,6 +265,64 @@ static int OpenPacketizer( vlc_object_t *p_this )
 return i_ret;
 }
 
+static int CreateDefaultHeader( decoder_t *p_dec )
+{
+ogg_packet oggpacket;
+SpeexHeader *p_header = malloc( sizeof(SpeexHeader) );
+if( !p_header )
+return VLC_ENOMEM;
+
+const int rate = p_dec-fmt_in.audio.i_rate;
+const unsigned i_mode = (rate / 8000)  1;
+
+const SpeexMode *mode;
+int ret = VLC_SUCCESS;
+oggpacket.packet = NULL;
+
+switch( rate )
+{
+case 8000:
+case 16000:
+case 32000:
+mode = speex_lib_get_mode( i_mode );
+break;
+default:
+msg_Err( p_dec, Unexpected rate %d, rate );
+ret = VLC_EGENERIC;
+goto cleanup;
+}
+
+speex_init_header( p_header, rate, p_dec-fmt_in.audio.i_channels, mode );
+p_header-frames_per_packet = 160  i_mode;
+
+oggpacket.packet = (unsigned char *) speex_header_to_packet( p_header,
+(int *) oggpacket.bytes );
+if( !oggpacket.packet )
+{
+ret = VLC_ENOMEM;
+goto cleanup;
+}
+
+oggpacket.b_o_s = 1;
+oggpacket.e_o_s = 0;
+oggpacket.granulepos = -1;
+oggpacket.packetno = 0;
+
+ret = ProcessInitialHeader( p_dec, oggpacket );
+
+if( ret != VLC_SUCCESS )
+{
+msg_Err( p_dec, default Speex header is corrupted );
+}
+
+cleanup:
+free( oggpacket.packet );
+free( p_header );
+
+return ret;
+}
+
+
 /
  * DecodeBlock: the whole thing
  
@@ -300,7 +358,17 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 /* Check for headers */
 if( !p_sys-b_has_headers )
 {
-if( ProcessHeaders( p_dec ) )
+if( !p_dec-fmt_in.p_extra )
+{
+msg_Warn( p_dec, Header missing, using default settings );
+
+if( CreateDefaultHeader( p_dec ) )
+{
+block_Release( *pp_block );
+return NULL;
+}
+}
+else if( ProcessHeaders( p_dec ) )
 {
 block_Release( *pp_block );
 return NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Contribs: update libass to 0.11.2

2014-04-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sun Apr 27 
10:37:31 2014 -0400| [9d06856d21a87468b6c3708111b5c3ff556a03d9] | committer: 
Tristan Matthews

Contribs: update libass to 0.11.2

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d06856d21a87468b6c3708111b5c3ff556a03d9
---

 contrib/src/ass/SHA512SUMS |2 +-
 contrib/src/ass/rules.mak  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/src/ass/SHA512SUMS b/contrib/src/ass/SHA512SUMS
index 8d589d9..6b0496c 100644
--- a/contrib/src/ass/SHA512SUMS
+++ b/contrib/src/ass/SHA512SUMS
@@ -1 +1 @@
-e40dc0bdc7a12d4515122026dba7cb8b98b9a114eb23a9c36444a8d7bc1b6ec3d8876e113238a5ba5acd39faec5d302d191a14de59478ab4c1c66be58ffa3654
  libass-0.11.1.tar.gz
+84ab20c3f9ede1c68ae91eb23c7047657abf98d3c0567136e39d165e04075bb72a6a95036cfe42274e87ef91b3cf07fbb8e81ed6f052b4248a9763b296d63abb
  libass-0.11.2.tar.gz
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index e9f30df..b483c97 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -1,5 +1,5 @@
 # ASS
-ASS_VERSION := 0.11.1
+ASS_VERSION := 0.11.2
 ASS_URL := 
https://github.com/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz
 
 PKGS += ass

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: fix row offset calculation

2014-04-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sun Apr 27 
15:45:55 2014 -0400| [58e4b45960f8d95e754ab9042a70f22965eb103e] | committer: 
Tristan Matthews

png: encoder: fix row offset calculation

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58e4b45960f8d95e754ab9042a70f22965eb103e
---

 modules/codec/png.c |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 9d9f634..46d31af 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -393,12 +393,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 png_infop p_end_info = png_create_info_struct( p_png );
 if( p_end_info == NULL ) goto error;
 
-const unsigned i_width = p_enc-fmt_in.video.i_visible_width;
-const unsigned i_height = p_enc-fmt_in.video.i_visible_height;
-
 png_set_IHDR( p_png, p_info,
-i_width,
-i_height,
+p_enc-fmt_in.video.i_visible_width,
+p_enc-fmt_in.video.i_visible_height,
 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
 PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT );
 if( p_sys-b_error ) goto error;
@@ -408,9 +405,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 
 /* Encode picture */
 
-for( unsigned i = 0; i  i_height; i++ )
+for( int i = 0; i  p_pic-p-i_lines; i++ )
 {
-png_write_row( p_png, p_pic-p-p_pixels + (i_width * i * 3));
+png_write_row( p_png, p_pic-p-p_pixels + (i * p_pic-p-i_pitch) );
 if( p_sys-b_error ) goto error;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] h264 packetizer: remove unused assert.h

2014-05-10 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat May 10 
13:35:54 2014 -0400| [7513dc81aefeb5ea26ecfe6bcaab7494bb6aafb6] | committer: 
Tristan Matthews

h264 packetizer: remove unused assert.h

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7513dc81aefeb5ea26ecfe6bcaab7494bb6aafb6
---

 modules/packetizer/h264.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 01fab3d..dd6f1c8 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -31,7 +31,6 @@
 #ifdef HAVE_CONFIG_H
 # include config.h
 #endif
-#include assert.h
 
 #include vlc_common.h
 #include vlc_plugin.h

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Contribs: update libass to 0.11.1

2014-05-24 Thread Tristan Matthews
vlc/vlc-2.1 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Mar 25 14:05:29 2014 -0400| [9982a053e4a691657b8e161dc43375545ad4effc] | 
committer: Jean-Baptiste Kempf

Contribs: update libass to 0.11.1

libass is now hosted on github

(cherry picked from commit cf3eec8b6f0dc796f1b85a1c1710f95e485ba59c)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=9982a053e4a691657b8e161dc43375545ad4effc
---

 contrib/src/ass/SHA512SUMS |2 +-
 contrib/src/ass/rules.mak  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/src/ass/SHA512SUMS b/contrib/src/ass/SHA512SUMS
index b7e578b..8d589d9 100644
--- a/contrib/src/ass/SHA512SUMS
+++ b/contrib/src/ass/SHA512SUMS
@@ -1 +1 @@
-450141f5de5125696edbd44019e5eccb8b34f6173692c50abbc3b82b565221d4454760489469542dc4e2a51c7f952b4a565f2e9468b3fa8550a62e2eb1836b77
  libass-0.10.2.tar.gz
+e40dc0bdc7a12d4515122026dba7cb8b98b9a114eb23a9c36444a8d7bc1b6ec3d8876e113238a5ba5acd39faec5d302d191a14de59478ab4c1c66be58ffa3654
  libass-0.11.1.tar.gz
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index e85c048..971a1fa 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -1,6 +1,6 @@
 # ASS
-ASS_VERSION := 0.10.2
-ASS_URL := http://libass.googlecode.com/files/libass-$(ASS_VERSION).tar.gz
+ASS_VERSION := 0.11.1
+ASS_URL := 
https://github.com/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz
 
 PKGS += ass
 ifeq ($(call need_pkg,libass),)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Contribs: update libass to 0.11.2

2014-05-24 Thread Tristan Matthews
vlc/vlc-2.1 | branch: master | Tristan Matthews le.business...@gmail.com | 
Sun Apr 27 10:37:31 2014 -0400| [3da8f578f25b4e2ac58b679267d21d87d3c403e2] | 
committer: Jean-Baptiste Kempf

Contribs: update libass to 0.11.2

(cherry picked from commit 9d06856d21a87468b6c3708111b5c3ff556a03d9)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=3da8f578f25b4e2ac58b679267d21d87d3c403e2
---

 contrib/src/ass/SHA512SUMS |2 +-
 contrib/src/ass/rules.mak  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/src/ass/SHA512SUMS b/contrib/src/ass/SHA512SUMS
index 8d589d9..6b0496c 100644
--- a/contrib/src/ass/SHA512SUMS
+++ b/contrib/src/ass/SHA512SUMS
@@ -1 +1 @@
-e40dc0bdc7a12d4515122026dba7cb8b98b9a114eb23a9c36444a8d7bc1b6ec3d8876e113238a5ba5acd39faec5d302d191a14de59478ab4c1c66be58ffa3654
  libass-0.11.1.tar.gz
+84ab20c3f9ede1c68ae91eb23c7047657abf98d3c0567136e39d165e04075bb72a6a95036cfe42274e87ef91b3cf07fbb8e81ed6f052b4248a9763b296d63abb
  libass-0.11.2.tar.gz
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index 971a1fa..d93d33c 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -1,5 +1,5 @@
 # ASS
-ASS_VERSION := 0.11.1
+ASS_VERSION := 0.11.2
 ASS_URL := 
https://github.com/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz
 
 PKGS += ass

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] headphone: fix overflow buffer handling

2014-05-25 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat May 24 
16:47:14 2014 -0400| [1c6daf4c81766a9fb6503a4ab7434674364c1c59] | committer: 
Tristan Matthews

headphone: fix overflow buffer handling

Fixes #11502

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c6daf4c81766a9fb6503a4ab7434674364c1c59
---

 modules/audio_filter/channel_mixer/headphone.c |   34 +---
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/headphone.c 
b/modules/audio_filter/channel_mixer/headphone.c
index 73180dd..43c6032 100644
--- a/modules/audio_filter/channel_mixer/headphone.c
+++ b/modules/audio_filter/channel_mixer/headphone.c
@@ -338,8 +338,9 @@ static void DoWork( filter_t * p_filter,
 
 float * p_in = (float*) p_in_buf-p_buffer;
 float * p_out;
-float * p_overflow;
-float * p_slide;
+uint8_t * p_overflow;
+uint8_t * p_end_overflow;
+uint8_t * p_slide;
 
 size_t i_overflow_size; /* in bytes */
 size_t i_out_size;  /* in bytes */
@@ -355,32 +356,33 @@ static void DoWork( filter_t * p_filter,
 i_out_size = p_out_buf-i_buffer;
 
 /* Slide the overflow buffer */
-p_overflow = p_sys-p_overflow_buffer;
+p_overflow = (uint8_t *) p_sys-p_overflow_buffer;
 i_overflow_size = p_sys-i_overflow_buffer_size;
+p_end_overflow = p_overflow + i_overflow_size;
 
 memset( p_out, 0, i_out_size );
-if ( i_out_size  i_overflow_size )
-memcpy( p_out, p_overflow, i_overflow_size );
-else
-memcpy( p_out, p_overflow, i_out_size );
+memcpy( p_out, p_overflow, __MIN( i_out_size, i_overflow_size ) );
 
-p_slide = p_sys-p_overflow_buffer;
-while( p_slide  p_overflow + i_overflow_size )
+p_slide = (uint8_t *) p_sys-p_overflow_buffer;
+while( p_slide  p_end_overflow )
 {
-if( p_slide + i_out_size  p_overflow + i_overflow_size )
+size_t i_bytes_copied;
+
+if( p_slide + i_out_size  p_end_overflow )
 {
 memset( p_slide, 0, i_out_size );
-if( p_slide + 2 * i_out_size  p_overflow + i_overflow_size )
-memcpy( p_slide, p_slide + i_out_size, i_out_size );
+if( p_slide + 2 * i_out_size  p_end_overflow )
+i_bytes_copied = i_out_size;
 else
-memcpy( p_slide, p_slide + i_out_size,
-p_overflow + i_overflow_size - ( p_slide + i_out_size 
) );
+i_bytes_copied = p_end_overflow - ( p_slide + i_out_size );
+memcpy( p_slide, p_slide + i_out_size, i_bytes_copied );
 }
 else
 {
-memset( p_slide, 0, p_overflow + i_overflow_size - p_slide );
+i_bytes_copied = p_end_overflow - p_slide;
+memset( p_slide, 0, i_bytes_copied );
 }
-p_slide += i_out_size;
+p_slide += i_bytes_copied;
 }
 
 /* apply the atomic operations */

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] faad: drop byte of padding for raw streams

2014-05-31 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat May 31 
17:07:34 2014 -0400| [937911d559051522554ac6f0d6d35fc0836d541a] | committer: 
Tristan Matthews

faad: drop byte of padding for raw streams

Fixes #2575, #11514

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=937911d559051522554ac6f0d6d35fc0836d541a
---

 modules/codec/faad.c |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index bf1b004..9aaaed6 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -491,8 +491,19 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 p_sys-i_buffer -= frame.bytesconsumed;
 if( p_sys-i_buffer  0 )
 {
-memmove( p_sys-p_buffer, p_sys-p_buffer[frame.bytesconsumed],
- p_sys-i_buffer );
+/* drop byte of raw AAC padding (if present) */
+if ( frame.header_type == RAW 
+ p_sys-i_buffer == 1 
+ p_sys-p_buffer[0] == 0x21 
+ p_sys-p_buffer[frame.bytesconsumed] == 0 )
+{
+p_sys-i_buffer = 0;
+}
+else
+{
+memmove( p_sys-p_buffer, 
p_sys-p_buffer[frame.bytesconsumed],
+ p_sys-i_buffer );
+}
 }
 
 return p_out;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: fix version check for ffmpeg

2014-06-26 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Jun 26 
16:26:36 2014 -0400| [cf910924699fbade7b0468373f68d6efff67f671] | committer: 
Tristan Matthews

avcodec: fix version check for ffmpeg

see ffmpeg commit a2bfee36b70bc9a5dd0a5a1cef36ca32bc1fba07

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf910924699fbade7b0468373f68d6efff67f671
---

 modules/codec/avcodec/fourcc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index 57983ef..88230eb 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -245,7 +245,7 @@ static const struct
 { VLC_CODEC_G2M4, AV_CODEC_ID_G2M, VIDEO_ES },
 #endif
 /* AV_CODEC_ID_WEBP */
-#if LIBAVCODEC_VERSION_CHECK( 55, 8, 0, 8, 0 )
+#if LIBAVCODEC_VERSION_CHECK( 55, 8, 0, 40, 100 )
 { VLC_CODEC_HNM4_VIDEO, AV_CODEC_ID_HNM4_VIDEO, VIDEO_ES },
 #endif
 #if LIBAVCODEC_VERSION_CHECK( 55, 24, 0, 37, 100 )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: remove speexdsp includedir patch

2014-06-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
03:20:20 2014 -0400| [8a9ac878b21ede8a65efdf71c6f5cc5b8fa3a88b] | committer: 
Tristan Matthews

contrib: remove speexdsp includedir patch

No longer needed due to upstream change.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a9ac878b21ede8a65efdf71c6f5cc5b8fa3a88b
---

 contrib/src/speexdsp/includedir.patch |   10 --
 contrib/src/speexdsp/rules.mak|1 -
 2 files changed, 11 deletions(-)

diff --git a/contrib/src/speexdsp/includedir.patch 
b/contrib/src/speexdsp/includedir.patch
deleted file mode 100644
index 23456e3..000
--- a/contrib/src/speexdsp/includedir.patch
+++ /dev/null
@@ -1,10 +0,0 @@
 speexdsp/include/speex/Makefile.am.orig2013-12-08 11:50:39.859569265 
+0100
-+++ speexdsp/include/speex/Makefile.am 2013-12-08 11:50:48.535568900 +0100
-@@ -2,6 +2,7 @@
- #AUTOMAKE_OPTIONS = no-dependencies
- 
- nodist_pkginclude_HEADERS = speexdsp_config_types.h
-+pkgincludedir=$(includedir)/speex
- 
- pkginclude_HEADERS = speex_echo.h speex_jitter.h speex_preprocess.h 
speex_resampler.h \
-   speexdsp_types.h
diff --git a/contrib/src/speexdsp/rules.mak b/contrib/src/speexdsp/rules.mak
index 2244813..ddb4850 100644
--- a/contrib/src/speexdsp/rules.mak
+++ b/contrib/src/speexdsp/rules.mak
@@ -21,7 +21,6 @@ speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
mkdir -p $@-git
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(APPLY) $(SRC)/speexdsp/neon.patch
-   $(APPLY) $(SRC)/speexdsp/includedir.patch
$(MOVE)
 
 SPEEXDSP_CONF := --enable-resample-full-sinc-table

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: mpc: use CLOCK_FREQ

2014-06-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
15:02:33 2014 -0400| [67660969ee347c9868b5b8080a71f478bfcd895c] | committer: 
Tristan Matthews

demux: mpc: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=67660969ee347c9868b5b8080a71f478bfcd895c
---

 modules/demux/mpc.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c
index 989eca4..a450c11 100644
--- a/modules/demux/mpc.c
+++ b/modules/demux/mpc.c
@@ -280,7 +280,7 @@ static int Demux( demux_t *p_demux )
 /* */
 p_data-i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * 
p_sys-info.channels;
 p_data-i_dts = p_data-i_pts =
-VLC_TS_0 + INT64_C(100) * p_sys-i_position / 
p_sys-info.sample_freq;
+VLC_TS_0 + CLOCK_FREQ * p_sys-i_position / 
p_sys-info.sample_freq;
 
 es_out_Control( p_demux-out, ES_OUT_SET_PCR, p_data-i_dts );
 
@@ -312,10 +312,10 @@ static int Control( demux_t *p_demux, int i_query, 
va_list args )
 case DEMUX_GET_LENGTH:
 pi64 = (int64_t*)va_arg( args, int64_t * );
 #ifndef HAVE_MPC_MPCDEC_H
-*pi64 = INT64_C(100) * p_sys-info.pcm_samples /
+*pi64 = CLOCK_FREQ * p_sys-info.pcm_samples /
 p_sys-info.sample_freq;
 #else
-*pi64 = INT64_C(100) * (p_sys-info.samples -
+*pi64 = CLOCK_FREQ * (p_sys-info.samples -
 p_sys-info.beg_silence) /
 p_sys-info.sample_freq;
 #endif
@@ -338,7 +338,7 @@ static int Control( demux_t *p_demux, int i_query, va_list 
args )
 
 case DEMUX_GET_TIME:
 pi64 = (int64_t*)va_arg( args, int64_t * );
-*pi64 = INT64_C(100) * p_sys-i_position /
+*pi64 = CLOCK_FREQ * p_sys-i_position /
 p_sys-info.sample_freq;
 return VLC_SUCCESS;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] theora: use CLOCK_FREQ

2014-06-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
21:03:09 2014 -0400| [079dc8f6ea1b22ed3cbee1798d61b1f500b4d7f7] | committer: 
Tristan Matthews

theora: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=079dc8f6ea1b22ed3cbee1798d61b1f500b4d7f7
---

 modules/codec/theora.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/theora.c b/modules/codec/theora.c
index b6831ae..89f1f7f 100644
--- a/modules/codec/theora.c
+++ b/modules/codec/theora.c
@@ -458,7 +458,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet 
*p_oggpacket,
 }
 
 /* Date management */
-p_sys-i_pts += ( INT64_C(100) * p_sys-ti.fps_denominator /
+p_sys-i_pts += ( CLOCK_FREQ * p_sys-ti.fps_denominator /
   p_sys-ti.fps_numerator ); /* 1 frame per packet */
 
 return p_buf;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] packetizer: mpeg4video: use CLOCK_FREQ

2014-06-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
21:19:36 2014 -0400| [c0cf20ae9bf8a665abcfb711720a03b30be1915c] | committer: 
Tristan Matthews

packetizer: mpeg4video: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0cf20ae9bf8a665abcfb711720a03b30be1915c
---

 modules/packetizer/mpeg4video.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/mpeg4video.c b/modules/packetizer/mpeg4video.c
index ddb8b84..bdf503c 100644
--- a/modules/packetizer/mpeg4video.c
+++ b/modules/packetizer/mpeg4video.c
@@ -490,13 +490,13 @@ static int ParseVOP( decoder_t *p_dec, block_t *p_vop )
 p_dec-fmt_in.video.i_frame_rate  0 
 p_dec-fmt_in.video.i_frame_rate_base  0 )
 {
-p_sys-i_interpolated_pts += INT64_C(100) *
+p_sys-i_interpolated_pts += CLOCK_FREQ *
 p_dec-fmt_in.video.i_frame_rate_base /
 p_dec-fmt_in.video.i_frame_rate;
 }
 else if( p_dec-p_sys-i_fps_num )
 p_sys-i_interpolated_pts +=
-( INT64_C(100) * (i_time_ref + i_time_increment -
+( CLOCK_FREQ * (i_time_ref + i_time_increment -
   p_sys-i_last_time - p_sys-i_last_timeincr) /
   p_dec-p_sys-i_fps_num );
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: video: use CLOCK_FREQ

2014-06-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
21:16:48 2014 -0400| [5f127cc3b7298c3d9442d300e83a4b1fd3d93ab6] | committer: 
Tristan Matthews

avcodec: video: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f127cc3b7298c3d9442d300e83a4b1fd3d93ab6
---

 modules/codec/avcodec/video.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 4c09175..d1fa89b 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -638,7 +638,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t 
**pp_block )
 if( p_dec-fmt_in.video.i_frame_rate  0 
 p_dec-fmt_in.video.i_frame_rate_base  0 )
 {
-p_sys-i_pts += INT64_C(100) *
+p_sys-i_pts += CLOCK_FREQ *
 (2 + p_sys-p_ff_pic-repeat_pict) *
 p_dec-fmt_in.video.i_frame_rate_base /
 (2 * p_dec-fmt_in.video.i_frame_rate);
@@ -649,7 +649,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t 
**pp_block )
 if( i_tick = 0 )
 i_tick = 1;
 
-p_sys-i_pts += INT64_C(100) *
+p_sys-i_pts += CLOCK_FREQ *
 (2 + p_sys-p_ff_pic-repeat_pict) *
 i_tick * p_context-time_base.num /
 (2 * p_context-time_base.den);

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: remove speexdsp includedir patch

2014-06-29 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Fri Jun 27 03:20:20 2014 -0400| [e4a23cc5b196c547b2e72bf6259d434bee9ef4e8] | 
committer: Jean-Baptiste Kempf

contrib: remove speexdsp includedir patch

No longer needed due to upstream change.

(cherry picked from commit 8a9ac878b21ede8a65efdf71c6f5cc5b8fa3a88b)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=e4a23cc5b196c547b2e72bf6259d434bee9ef4e8
---

 contrib/src/speexdsp/includedir.patch |   10 --
 contrib/src/speexdsp/rules.mak|1 -
 2 files changed, 11 deletions(-)

diff --git a/contrib/src/speexdsp/includedir.patch 
b/contrib/src/speexdsp/includedir.patch
deleted file mode 100644
index 23456e3..000
--- a/contrib/src/speexdsp/includedir.patch
+++ /dev/null
@@ -1,10 +0,0 @@
 speexdsp/include/speex/Makefile.am.orig2013-12-08 11:50:39.859569265 
+0100
-+++ speexdsp/include/speex/Makefile.am 2013-12-08 11:50:48.535568900 +0100
-@@ -2,6 +2,7 @@
- #AUTOMAKE_OPTIONS = no-dependencies
- 
- nodist_pkginclude_HEADERS = speexdsp_config_types.h
-+pkgincludedir=$(includedir)/speex
- 
- pkginclude_HEADERS = speex_echo.h speex_jitter.h speex_preprocess.h 
speex_resampler.h \
-   speexdsp_types.h
diff --git a/contrib/src/speexdsp/rules.mak b/contrib/src/speexdsp/rules.mak
index 2244813..ddb4850 100644
--- a/contrib/src/speexdsp/rules.mak
+++ b/contrib/src/speexdsp/rules.mak
@@ -21,7 +21,6 @@ speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
mkdir -p $@-git
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(APPLY) $(SRC)/speexdsp/neon.patch
-   $(APPLY) $(SRC)/speexdsp/includedir.patch
$(MOVE)
 
 SPEEXDSP_CONF := --enable-resample-full-sinc-table

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] livehttp: remove multiplication by 1

2014-06-29 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jun 27 
16:48:21 2014 -0400| [8f311799715c843c420cfa4e0cee87310a20ef27] | committer: 
Tristan Matthews

livehttp: remove multiplication by 1

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f311799715c843c420cfa4e0cee87310a20ef27
---

 modules/access_output/livehttp.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index acf0991..faf8f49 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -761,8 +761,8 @@ static void Close( vlc_object_t * p_this )
 
 /* Since we are flushing, check the segment change by hand and don't 
wait
  * possible keyframe*/
-if( ((float)(output_block-i_length * CLOCK_FREQ / INT64_C(100) ) +
-(float)(output_block-i_dts - p_sys-i_opendts)) = 
p_sys-i_seglenm )
+if( ((float) output_block-i_length +
+ (float) (output_block-i_dts - p_sys-i_opendts)) = 
p_sys-i_seglenm )
 {
 closeCurrentSegment( p_access, p_sys, false );
 if( unlikely(openNextFile( p_access, p_sys )  0 ) )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] schroedinger: use CLOCK_FREQ

2014-06-30 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Jul  1 
00:35:46 2014 -0400| [a7cf4c51cbef6d877713153f6f0e71abf6054991] | committer: 
Tristan Matthews

schroedinger: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a7cf4c51cbef6d877713153f6f0e71abf6054991
---

 modules/codec/schroedinger.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index add6903..8178553 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -602,7 +602,7 @@ static void SetVideoFormat( decoder_t *p_dec )
 p_sys-p_format = schro_decoder_get_video_format(p_sys-p_schro);
 if( p_sys-p_format == NULL ) return;
 
-p_sys-i_frame_pts_delta = INT64_C(100)
+p_sys-i_frame_pts_delta = CLOCK_FREQ
 * p_sys-p_format-frame_rate_denominator
 / p_sys-p_format-frame_rate_numerator;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] kate: use CLOCK_FREQ

2014-06-30 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Jul  1 
00:39:44 2014 -0400| [bd05cf845539dec9300ab7562b44f1098bb529cc] | committer: 
Tristan Matthews

kate: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd05cf845539dec9300ab7562b44f1098bb529cc
---

 modules/codec/kate.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 89124d4..93cbb3d 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -1170,7 +1170,8 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, 
kate_packet *p_kp, block_t
 }
 
 p_spu-i_start = p_block-i_pts;
-p_spu-i_stop = p_block-i_pts + 
INT64_C(100)*ev-duration*p_sys-ki.gps_denominator/p_sys-ki.gps_numerator;
+p_spu-i_stop = p_block-i_pts + CLOCK_FREQ *
+ev-duration * p_sys-ki.gps_denominator / p_sys-ki.gps_numerator;
 p_spu-b_ephemer = false;
 p_spu-b_absolute = false;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: remove speexdsp NEON patch

2014-07-02 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Jul  2 
11:27:30 2014 -0400| [5a9d3161e037c1634d6b4621f1e1ce09639de90f] | committer: 
Tristan Matthews

contrib: remove speexdsp NEON patch

No longer needed due to upstream change.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a9d3161e037c1634d6b4621f1e1ce09639de90f
---

 contrib/src/speexdsp/neon.patch |  461 ---
 contrib/src/speexdsp/rules.mak  |1 -
 2 files changed, 462 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=5a9d3161e037c1634d6b4621f1e1ce09639de90f
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: remove speexdsp NEON patch

2014-07-02 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Wed Jul  2 11:27:30 2014 -0400| [3bd3a0c4064c999053893bdf9532935377250ede] | 
committer: Felix Paul Kühne

contrib: remove speexdsp NEON patch

No longer needed due to upstream change.

(cherry picked from commit 5a9d3161e037c1634d6b4621f1e1ce09639de90f)
Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=3bd3a0c4064c999053893bdf9532935377250ede
---

 contrib/src/speexdsp/neon.patch |  461 ---
 contrib/src/speexdsp/rules.mak  |1 -
 2 files changed, 462 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commitdiff;h=3bd3a0c4064c999053893bdf9532935377250ede
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] schroedinger: use CLOCK_FREQ

2014-07-02 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Jul  1 00:35:46 2014 -0400| [d044670898fddb2b2bbf41ecab71faf12c91b45c] | 
committer: Felix Paul Kühne

schroedinger: use CLOCK_FREQ

(cherry picked from commit a7cf4c51cbef6d877713153f6f0e71abf6054991)
Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=d044670898fddb2b2bbf41ecab71faf12c91b45c
---

 modules/codec/schroedinger.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index add6903..8178553 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -602,7 +602,7 @@ static void SetVideoFormat( decoder_t *p_dec )
 p_sys-p_format = schro_decoder_get_video_format(p_sys-p_schro);
 if( p_sys-p_format == NULL ) return;
 
-p_sys-i_frame_pts_delta = INT64_C(100)
+p_sys-i_frame_pts_delta = CLOCK_FREQ
 * p_sys-p_format-frame_rate_denominator
 / p_sys-p_format-frame_rate_numerator;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] kate: use CLOCK_FREQ

2014-07-02 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Jul  1 00:39:44 2014 -0400| [f465dc6fc2f8b4211128db1bb46028b6829f7007] | 
committer: Felix Paul Kühne

kate: use CLOCK_FREQ

(cherry picked from commit bd05cf845539dec9300ab7562b44f1098bb529cc)
Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f465dc6fc2f8b4211128db1bb46028b6829f7007
---

 modules/codec/kate.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 89124d4..93cbb3d 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -1170,7 +1170,8 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, 
kate_packet *p_kp, block_t
 }
 
 p_spu-i_start = p_block-i_pts;
-p_spu-i_stop = p_block-i_pts + 
INT64_C(100)*ev-duration*p_sys-ki.gps_denominator/p_sys-ki.gps_numerator;
+p_spu-i_stop = p_block-i_pts + CLOCK_FREQ *
+ev-duration * p_sys-ki.gps_denominator / p_sys-ki.gps_numerator;
 p_spu-b_ephemer = false;
 p_spu-b_absolute = false;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Fix build for C++11

2014-07-02 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Jul  2 
17:28:02 2014 -0400| [a1e5e6422d04cd3380bc5b10c86713fef0832aa3] | committer: 
Tristan Matthews

Fix build for C++11

C++11 requires a space between literal and identifier

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a1e5e6422d04cd3380bc5b10c86713fef0832aa3
---

 modules/gui/qt4/components/extended_panels.cpp |4 ++--
 modules/gui/skins2/src/dialogs.cpp |2 +-
 modules/video_filter/atmo/AtmoLiveView.cpp |4 ++--
 modules/video_filter/atmo/atmo.cpp |2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp 
b/modules/gui/qt4/components/extended_panels.cpp
index 84d16ae..bbff25a 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -557,7 +557,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
 else if( lineedit )
 {
 char str[30];
-snprintf( str, sizeof(str), %06PRIX64, val.i_int );
+snprintf( str, sizeof(str), %06 PRIX64, val.i_int );
 lineedit-setText( str );
 }
 else if( combobox ) combobox-setCurrentIndex(
@@ -750,7 +750,7 @@ void ExtV4l2::Refresh( void )
 
 QString name = qtr( vartext.psz_string );
 free( vartext.psz_string );
-msg_Dbg( p_intf, v4l2 control \%PRIx64\: %s (%s),
+msg_Dbg( p_intf, v4l2 control \% PRIx64 \: %s (%s),
  val.p_list-p_values[i].i_int, psz_var, qtu( name ) );
 
 int i_type = var_Type( p_obj, psz_var );
diff --git a/modules/gui/skins2/src/dialogs.cpp 
b/modules/gui/skins2/src/dialogs.cpp
index 3bda3b9..fc4db08 100644
--- a/modules/gui/skins2/src/dialogs.cpp
+++ b/modules/gui/skins2/src/dialogs.cpp
@@ -212,7 +212,7 @@ void Dialogs::showChangeSkin()
 void Dialogs::showPlaylistLoad()
 {
 showFileGeneric( _(Open playlist),
- _(Playlist Files|EXTENSIONS_PLAYLIST|
+ _(Playlist Files| EXTENSIONS_PLAYLIST |
All Files|*),
  showPlaylistLoadCB, kOPEN );
 }
diff --git a/modules/video_filter/atmo/AtmoLiveView.cpp 
b/modules/video_filter/atmo/AtmoLiveView.cpp
index 987bb61..8cef916 100644
--- a/modules/video_filter/atmo/AtmoLiveView.cpp
+++ b/modules/video_filter/atmo/AtmoLiveView.cpp
@@ -98,7 +98,7 @@ DWORD CAtmoLiveView::Execute(void)
 if( frameDelay  0 )
 do_sleep( frameDelay );
 #if defined(_ATMO_VLC_PLUGIN_)
-msg_Dbg( m_pLog, First Packet got %PRId64 ms, (get_time - t) / 
1000  );
+msg_Dbg( m_pLog, First Packet got % PRId64  ms, (get_time - t) / 
1000  );
 #endif
 }
 
@@ -139,7 +139,7 @@ DWORD CAtmoLiveView::Execute(void)
 if( frameDelay  0 )
 do_sleep( frameDelay );
 #if defined(_ATMO_VLC_PLUGIN_)
-msg_Dbg( m_pLog, got delayed packet %PRId64 ms, 
(mdate() - t) / 1000  );
+msg_Dbg( m_pLog, got delayed packet % PRId64  ms, 
(mdate() - t) / 1000  );
 #endif
 continue;
 }
diff --git a/modules/video_filter/atmo/atmo.cpp 
b/modules/video_filter/atmo/atmo.cpp
index 518e2c5..54fab7d 100644
--- a/modules/video_filter/atmo/atmo.cpp
+++ b/modules/video_filter/atmo/atmo.cpp
@@ -2448,7 +2448,7 @@ static int AtmoSettingsCallback( vlc_object_t *, char 
const *psz_var,
 if(p_atmo_config)
 {
 
-   msg_Dbg(p_filter, apply AtmoSettingsCallback %s (int: %PRId64 - 
%PRId64),
+   msg_Dbg(p_filter, apply AtmoSettingsCallback %s (int: % PRId64  - 
% PRId64 ),
  psz_var,
  oldval.i_int,
  newval.i_int

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: don't guess size when encoding video

2014-07-05 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul  4 
09:34:57 2014 -0400| [03cf55c6f56d9f9d27e46dfea07f15714e4c416c] | committer: 
Tristan Matthews

avcodec: don't guess size when encoding video

Instead, let avcodec_encode_video2 allocate the buffer, then
wrap it in a block_t.

Fixes #11605

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03cf55c6f56d9f9d27e46dfea07f15714e4c416c
---

 modules/codec/avcodec/encoder.c |   70 +--
 1 file changed, 45 insertions(+), 25 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index a6fcf66..b35c9fc 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1006,6 +1006,42 @@ error:
 return VLC_ENOMEM;
 }
 
+typedef struct
+{
+block_t self;
+AVPacket packet;
+} vlc_av_packet_t;
+
+static void vlc_av_packet_Release(block_t *block)
+{
+vlc_av_packet_t *b = (void *) block;
+
+av_free_packet(b-packet);
+free(b);
+}
+
+static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length)
+{
+vlc_av_packet_t *b = malloc( sizeof( *b ) );
+if( unlikely(b == NULL) )
+return NULL;
+
+block_t *p_block = b-self;
+
+block_Init( p_block, packet-data, packet-size );
+p_block-i_nb_samples = 0;
+p_block-pf_release = vlc_av_packet_Release;
+b-packet = *packet;
+
+p_block-i_length = i_length;
+p_block-i_pts = packet-pts;
+p_block-i_dts = packet-dts;
+if( unlikely( packet-flags  AV_PKT_FLAG_CORRUPT ) )
+p_block-i_flags |= BLOCK_FLAG_CORRUPTED;
+
+return p_block;
+}
+
 /
  * EncodeVideo: the whole thing
  /
@@ -1013,19 +1049,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 {
 encoder_sys_t *p_sys = p_enc-p_sys;
 int i_plane;
-/* Initialize the video output buffer the first time.
- * This is done here instead of OpenEncoder() because we need the actual
- * bits_per_pixel value, without having to assume anything.
- */
-const int bitsPerPixel = p_enc-fmt_out.video.i_bits_per_pixel ?
- p_enc-fmt_out.video.i_bits_per_pixel :
- p_sys-p_context-bits_per_coded_sample ?
- p_sys-p_context-bits_per_coded_sample :
- 24;
-const int blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * 
p_sys-p_context-height * p_sys-p_context-width ) / 8 + 200 );
-block_t *p_block = block_Alloc( blocksize );
-if( unlikely(p_block == NULL) )
-return NULL;
 
 AVFrame *frame = NULL;
 if( likely(p_pict) ) {
@@ -1090,7 +1113,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 {
 msg_Warn( p_enc, almost fed libavcodec with two frames with 
   the same PTS (%PRId64 ), frame-pts );
-block_Release( p_block );
 return NULL;
 }
 else if ( p_sys-i_last_pts  frame-pts )
@@ -1098,7 +1120,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 msg_Warn( p_enc, almost fed libavcodec with a frame in the 
  past (current: %PRId64 , last: %PRId64),
  frame-pts, p_sys-i_last_pts );
-block_Release( p_block );
 return NULL;
 }
 else
@@ -1109,26 +1130,25 @@ static block_t *EncodeVideo( encoder_t *p_enc, 
picture_t *p_pict )
 }
 
 AVPacket av_pkt;
+av_pkt.data = NULL;
+av_pkt.size = 0;
 int is_data;
 
 av_init_packet( av_pkt );
-av_pkt.data = p_block-p_buffer;
-av_pkt.size = p_block-i_buffer;
 
 if( avcodec_encode_video2( p_sys-p_context, av_pkt, frame, is_data )  0
  || is_data == 0 )
 {
-block_Release( p_block );
 return NULL;
 }
 
-p_block-i_buffer = av_pkt.size;
-p_block-i_length = av_pkt.duration / p_sys-p_context-time_base.den;
-p_block-i_pts = av_pkt.pts;
-p_block-i_dts = av_pkt.dts;
-if( unlikely( av_pkt.flags  AV_PKT_FLAG_CORRUPT ) )
-p_block-i_flags |= BLOCK_FLAG_CORRUPTED;
-
+block_t *p_block = vlc_av_packet_Wrap( av_pkt,
+av_pkt.duration / p_sys-p_context-time_base.den );
+if( unlikely(p_block == NULL) )
+{
+av_free_packet( av_pkt );
+return NULL;
+}
 
 switch ( p_sys-p_context-coded_frame-pict_type )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: don't guess size when encoding video

2014-07-06 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Fri Jul  4 09:34:57 2014 -0400| [390c2b665e7e1140446367212f9de845330ab328] | 
committer: Tristan Matthews

avcodec: don't guess size when encoding video

Instead, let avcodec_encode_video2 allocate the buffer, then
wrap it before handing it off.

Fixes #11605

(cherry picked from commit 03cf55c6f56d9f9d27e46dfea07f15714e4c416c)
Signed-off-by: Tristan Matthews le.business...@gmail.com

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=390c2b665e7e1140446367212f9de845330ab328
---

 modules/codec/avcodec/encoder.c |   85 ---
 1 file changed, 61 insertions(+), 24 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 65ce285..b2eed27 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1010,6 +1010,44 @@ error:
 return VLC_ENOMEM;
 }
 
+#if (LIBAVCODEC_VERSION_MAJOR = 54)
+typedef struct
+{
+block_t self;
+AVPacket packet;
+} vlc_av_packet_t;
+
+static void vlc_av_packet_Release(block_t *block)
+{
+vlc_av_packet_t *b = (void *) block;
+
+av_free_packet(b-packet);
+free(b);
+}
+
+static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length)
+{
+vlc_av_packet_t *b = malloc( sizeof( *b ) );
+if( unlikely(b == NULL) )
+return NULL;
+
+block_t *p_block = b-self;
+
+block_Init(p_block, packet-data, packet-size);
+p_block-i_nb_samples = 0;
+p_block-pf_release = vlc_av_packet_Release;
+b-packet = *packet;
+
+p_block-i_length = i_length;
+p_block-i_pts = packet-pts;
+p_block-i_dts = packet-dts;
+if( unlikely( packet-flags  AV_PKT_FLAG_CORRUPT ) )
+p_block-i_flags |= BLOCK_FLAG_CORRUPTED;
+
+return p_block;
+}
+#endif
+
 /
  * EncodeVideo: the whole thing
  /
@@ -1017,19 +1055,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 {
 encoder_sys_t *p_sys = p_enc-p_sys;
 int i_plane;
-/* Initialize the video output buffer the first time.
- * This is done here instead of OpenEncoder() because we need the actual
- * bits_per_pixel value, without having to assume anything.
- */
-const int bitsPerPixel = p_enc-fmt_out.video.i_bits_per_pixel ?
- p_enc-fmt_out.video.i_bits_per_pixel :
- p_sys-p_context-bits_per_coded_sample ?
- p_sys-p_context-bits_per_coded_sample :
- 24;
-const int blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * 
p_sys-p_context-height * p_sys-p_context-width ) / 8 + 200 );
-block_t *p_block = block_Alloc( blocksize );
-if( unlikely(p_block == NULL) )
-return NULL;
 
 AVFrame *frame = NULL;
 if( likely(p_pict) ) {
@@ -1094,7 +1119,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 {
 msg_Warn( p_enc, almost fed libavcodec with two frames with 
   the same PTS (%PRId64 ), frame-pts );
-block_Release( p_block );
 return NULL;
 }
 else if ( p_sys-i_last_pts  frame-pts )
@@ -1102,7 +1126,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
 msg_Warn( p_enc, almost fed libavcodec with a frame in the 
  past (current: %PRId64 , last: %PRId64),
  frame-pts, p_sys-i_last_pts );
-block_Release( p_block );
 return NULL;
 }
 else
@@ -1114,27 +1137,41 @@ static block_t *EncodeVideo( encoder_t *p_enc, 
picture_t *p_pict )
 
 #if (LIBAVCODEC_VERSION_MAJOR = 54)
 AVPacket av_pkt;
+av_pkt.data = NULL;
+av_pkt.size = 0;
 int is_data;
 
 av_init_packet( av_pkt );
-av_pkt.data = p_block-p_buffer;
-av_pkt.size = p_block-i_buffer;
 
 if( avcodec_encode_video2( p_sys-p_context, av_pkt, frame, is_data )  0
  || is_data == 0 )
 {
-block_Release( p_block );
 return NULL;
 }
 
-p_block-i_buffer = av_pkt.size;
-p_block-i_length = av_pkt.duration / p_sys-p_context-time_base.den;
-p_block-i_pts = av_pkt.pts;
-p_block-i_dts = av_pkt.dts;
-if( unlikely( av_pkt.flags  AV_PKT_FLAG_CORRUPT ) )
-p_block-i_flags |= BLOCK_FLAG_CORRUPTED;
+block_t *p_block = vlc_av_packet_Wrap( av_pkt,
+av_pkt.duration / p_sys-p_context-time_base.den);
+if( unlikely(p_block == NULL) )
+{
+av_free_packet( av_pkt );
+return NULL;
+}
 
 #else
+/* Initialize the video output buffer the first time.
+ * This is done here instead of OpenEncoder() because we need the actual
+ * bits_per_pixel value, without having to assume anything

[vlc-commits] avcodec: fix TIFF encoding for older lavc

2014-07-06 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Sun Jul  6 13:06:06 2014 -0400| [a0f2a5fdda68c413c0682e889013ed4fe9158d05] | 
committer: Tristan Matthews

avcodec: fix TIFF encoding for older lavc

Fixes #11605

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=a0f2a5fdda68c413c0682e889013ed4fe9158d05
---

 modules/codec/avcodec/encoder.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index b2eed27..860556f 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1167,7 +1167,12 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t 
*p_pict )
  p_sys-p_context-bits_per_coded_sample ?
  p_sys-p_context-bits_per_coded_sample :
  24;
-const int blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * 
p_sys-p_context-height * p_sys-p_context-width ) / 8 + 200 );
+unsigned blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * 
p_sys-p_context-height * p_sys-p_context-width ) / 8 + 200 );
+if( p_enc-fmt_out.i_codec == VLC_CODEC_TIFF )
+{
+blocksize = 2 * blocksize +
+4 * p_sys-p_context-height; /* space for strip sizes */
+}
 block_t *p_block = block_Alloc( blocksize );
 if( unlikely(p_block == NULL) )
 return NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: Fix dereference after NULL check (cid #1048740)

2014-07-15 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Jul 15 
20:52:23 2014 -0400| [4386b8c617c34f79d1b8ec0780e9cffaa9d16ac0] | committer: 
Tristan Matthews

avcodec: Fix dereference after NULL check (cid #1048740)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4386b8c617c34f79d1b8ec0780e9cffaa9d16ac0
---

 modules/codec/avcodec/encoder.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 9b93278..0c4f2e4 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -656,7 +656,8 @@ int OpenEncoder( vlc_object_t *p_this )
 
 /* Try to match avcodec input format to vlc format so we could avoid 
one
format conversion */
-if( GetVlcAudioFormat( p_context-sample_fmt ) != 
p_enc-fmt_in.i_codec )
+if( GetVlcAudioFormat( p_context-sample_fmt ) != p_enc-fmt_in.i_codec
+ p_codec-sample_fmts )
 {
 msg_Dbg( p_enc, Trying to find more suitable sample format 
instead of %s, av_get_sample_fmt_name( p_context-sample_fmt ) );
 for( unsigned int i=0; p_codec-sample_fmts[i] != -1; i++ )
@@ -672,7 +673,7 @@ int OpenEncoder( vlc_object_t *p_this )
 p_sys-b_planar = av_sample_fmt_is_planar( p_context-sample_fmt );
 // Try if we can use interleaved format for codec input as VLC doesn't 
really do planar audio yet
 // FIXME: Remove when planar/interleaved audio in vlc is equally 
supported
-if( p_sys-b_planar )
+if( p_sys-b_planar  p_codec-sample_fmts )
 {
 msg_Dbg( p_enc, Trying to find packet sample format instead of 
planar %s, av_get_sample_fmt_name( p_context-sample_fmt ) );
 for( unsigned int i=0; p_codec-sample_fmts[i] != -1; i++ )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mux: ogg: fix pointer arithmetic (cid #1048982)

2014-07-15 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Tue Jul 15 
21:25:05 2014 -0400| [9a220019c9865f3d7db2c7601d2930632b7c593e] | committer: 
Tristan Matthews

mux: ogg: fix pointer arithmetic (cid #1048982)

Extra header is stored at ogg_header + (1 * sizeof(ogg_header)),
not ogg_header + (sizeof(ogg_header) * sizeof(ogg_header)).

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a220019c9865f3d7db2c7601d2930632b7c593e
---

 modules/mux/ogg.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 02b844f..c599199 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -908,7 +908,7 @@ static int32_t OggFillDsHeader( uint8_t *p_buffer, 
oggds_header_t *p_oggds_heade
 /* extra header */
 if( p_oggds_header-i_size  0 )
 {
-memcpy( p_buffer[index], p_oggds_header + sizeof(*p_oggds_header), 
p_oggds_header-i_size );
+memcpy( p_buffer[index], (uint8_t *) p_oggds_header + 
sizeof(*p_oggds_header), p_oggds_header-i_size );
 index += p_oggds_header-i_size;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] stream: use CLOCK_FREQ

2014-07-16 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Jul 17 
01:55:37 2014 -0400| [69de17480b5df38832a31e2fce2d38c53fb28dbf] | committer: 
Tristan Matthews

stream: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69de17480b5df38832a31e2fce2d38c53fb28dbf
---

 src/input/stream.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 0179cba..64d47b4 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -691,13 +691,13 @@ static void AStreamPrebufferBlock( stream_t *s )
 /* Update stat */
 p_sys-stat.i_bytes = p_sys-block.i_size;
 p_sys-stat.i_read_time = i_date - i_start;
-i_byterate = ( INT64_C(100) * p_sys-stat.i_bytes ) /
+i_byterate = ( CLOCK_FREQ * p_sys-stat.i_bytes ) /
  (p_sys-stat.i_read_time + 1);
 
 msg_Dbg( s, prebuffering done %PRId64 bytes in %PRId64s - 
  %PRId64 KiB/s,
  p_sys-stat.i_bytes,
- p_sys-stat.i_read_time / INT64_C(100),
+ p_sys-stat.i_read_time / CLOCK_FREQ,
  i_byterate / 1024 );
 break;
 }
@@ -1446,13 +1446,13 @@ static void AStreamPrebufferStream( stream_t *s )
 /* Update stat */
 p_sys-stat.i_bytes = i_buffered;
 p_sys-stat.i_read_time = i_date - i_start;
-i_byterate = ( INT64_C(100) * p_sys-stat.i_bytes ) /
+i_byterate = ( CLOCK_FREQ * p_sys-stat.i_bytes ) /
  (p_sys-stat.i_read_time+1);
 
 msg_Dbg( s, pre-buffering done %PRId64 bytes in %PRId64s - 
  %PRId64 KiB/s,
  p_sys-stat.i_bytes,
- p_sys-stat.i_read_time / INT64_C(100),
+ p_sys-stat.i_read_time / CLOCK_FREQ,
  i_byterate / 1024 );
 break;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: avoid crashing when no streams are present

2014-07-17 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Jul 17 
14:03:19 2014 -0400| [8466eebfd51a5ffa5a0b262d55f3cc70f3b1c219] | committer: 
Tristan Matthews

hds: avoid crashing when no streams are present

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8466eebfd51a5ffa5a0b262d55f3cc70f3b1c219
---

 modules/stream_filter/hds/hds.c |   28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 5119ba2..8c7d3a5 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -771,6 +771,9 @@ static void* download_thread( void* p )
 stream_t* s = (stream_t*) p_this;
 stream_sys_t* sys = s-p_sys;
 
+if ( vlc_array_count( sys-hds_streams ) == 0 )
+return NULL;
+
 // TODO: Change here for selectable stream
 hds_stream_t* hds_stream = sys-hds_streams-pp_elems[0];
 
@@ -1012,6 +1015,9 @@ static void* live_thread( void* p )
 stream_t* s = (stream_t*) p_this;
 stream_sys_t* sys = s-p_sys;
 
+if ( vlc_array_count( sys-hds_streams ) == 0 )
+return NULL;
+
 // TODO: Change here for selectable stream
 hds_stream_t* hds_stream = sys-hds_streams-pp_elems[0];
 
@@ -1436,15 +1442,21 @@ static void Close( vlc_object_t *p_this )
 stream_sys_t *p_sys = s-p_sys;
 
 // TODO: Change here for selectable stream
-hds_stream_t *stream = s-p_sys-hds_streams-pp_elems[0];
+hds_stream_t *stream = vlc_array_count(p_sys-hds_streams) ?
+s-p_sys-hds_streams-pp_elems[0] : NULL;
 
 p_sys-closed = true;
-vlc_cond_signal(  stream-dl_cond );
+if (stream)
+vlc_cond_signal(  stream-dl_cond );
 
 vlc_join( p_sys-dl_thread, NULL );
-vlc_mutex_destroy( stream-dl_lock );
-vlc_cond_destroy( stream-dl_cond );
-vlc_mutex_destroy( stream-abst_lock );
+
+if (stream)
+{
+vlc_mutex_destroy( stream-dl_lock );
+vlc_cond_destroy( stream-dl_cond );
+vlc_mutex_destroy( stream-abst_lock );
+}
 
 if( p_sys-live )
 {
@@ -1595,6 +1607,9 @@ static int Read( stream_t *s, void *buffer, unsigned 
i_read )
 {
 stream_sys_t *p_sys = s-p_sys;
 
+if ( vlc_array_count( p_sys-hds_streams ) == 0 )
+return 0;
+
 // TODO: change here for selectable stream
 hds_stream_t *stream = s-p_sys-hds_streams-pp_elems[0];
 int length = 0;
@@ -1622,6 +1637,9 @@ static int Peek( stream_t *s, const uint8_t **pp_peek, 
unsigned i_peek )
 {
 stream_sys_t *p_sys = s-p_sys;
 
+if ( vlc_array_count( p_sys-hds_streams ) == 0 )
+return 0;
+
 // TODO: change here for selectable stream
 hds_stream_t *stream = p_sys-hds_streams-pp_elems[0];
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: use NULL instead of 0 for pointers

2014-07-18 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul 18 
14:05:51 2014 -0400| [83df9a72a84114981fb733d59ac08fd1ed0ef8cb] | committer: 
Tristan Matthews

hds: use NULL instead of 0 for pointers

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83df9a72a84114981fb733d59ac08fd1ed0ef8cb
---

 modules/stream_filter/hds/hds.c |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 8c7d3a5..5402cbb 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -519,7 +519,7 @@ static void parse_BootstrapData( vlc_object_t* p_this,
 return;
 }
 
-s-quality_segment_modifier = 0;
+s-quality_segment_modifier = NULL;
 
 uint8_t quality_entry_count = *data_p;
 data_p++;
@@ -530,10 +530,10 @@ static void parse_BootstrapData( vlc_object_t* p_this,
 return;
 }
 
-s-quality_segment_modifier = 0;
+s-quality_segment_modifier = NULL;
 while( quality_entry_count--  0 )
 {
-if( s-quality_segment_modifier != 0 )
+if( s-quality_segment_modifier )
 {
 s-quality_segment_modifier = strndup( (char*)data_p, data_end - 
data_p );
 }
@@ -626,8 +626,8 @@ static uint32_t find_chunk_mdat( vlc_object_t* p_this,
  uint8_t* chunkdata, uint8_t* chunkdata_end,
  uint8_t** mdatptr )
 {
-uint8_t* boxname = 0;
-uint8_t* boxdata = 0;
+uint8_t* boxname = NULL;
+uint8_t* boxdata = NULL;
 uint64_t boxsize = 0;
 
 do {
@@ -843,7 +843,7 @@ static chunk_t* generate_new_chunk(
 
 if( ! chunk ) {
 msg_Err( p_this, Couldn't allocate new chunk! );
-return 0;
+return NULL;
 }
 
 if( last_chunk )
@@ -1133,13 +1133,13 @@ static int parse_Manifest( stream_t *s )
 #define MAX_XML_DEPTH 256
 char* element_stack[256];
 uint8_t current_element_idx = 0;
-char* current_element = 0;
+char* current_element = NULL;
 memset( element_stack, 0, sizeof(char*) * MAX_XML_DEPTH );
 
 const char* attr_name;
 const char* attr_value;
 
-char* media_id = 0;
+char* media_id = NULL;
 
 #define TIMESCALE 1000
 while( (type = xml_ReaderNextNode( vlc_reader, (const char**) node ))  0 
)
@@ -1242,7 +1242,7 @@ static int parse_Manifest( stream_t *s )
 }
 if( ! strcmp( current_element, id ) )
 {
-if( current_element != 0 
+if( current_element 
 ! strcmp( element_stack[current_element_idx-1], manifest 
) )
 {
 media_id = strdup( node );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: check for strdup failure

2014-07-18 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul 18 
21:54:24 2014 -0400| [160401294cbaa95b87bf0199c64590fef6b7fbc7] | committer: 
Tristan Matthews

hds: check for strdup failure

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=160401294cbaa95b87bf0199c64590fef6b7fbc7
---

 modules/stream_filter/hds/hds.c |   31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 5402cbb..90b9992 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1009,6 +1009,10 @@ static void maintain_live_chunks(
 hds_stream-chunks_head = chunk;
 }
 
+#define SAFE_STRDUP( dest, src, ret )   \
+if( !( (dest) = strdup( (src) ) ) ) \
+return (ret)
+
 static void* live_thread( void* p )
 {
 vlc_object_t* p_this = (vlc_object_t*)p;
@@ -1028,7 +1032,7 @@ static void* live_thread( void* p )
 if( hds_stream-abst_url 
 ( isFQUrl( hds_stream-abst_url ) ) )
 {
-abst_url = strdup ( hds_stream-abst_url );
+SAFE_STRDUP( abst_url, hds_stream-abst_url, NULL );
 }
 else
 {
@@ -1148,10 +1152,11 @@ static int parse_Manifest( stream_t *s )
 {
 case XML_READER_STARTELEM:
 if( current_element_idx == 0  element_stack[current_element_idx] 
== 0 ) {
-element_stack[current_element_idx] = strdup( node );
+SAFE_STRDUP( element_stack[current_element_idx], node, 
VLC_ENOMEM );
 } else {
-element_stack[++current_element_idx] = strdup( node );
+SAFE_STRDUP( element_stack[++current_element_idx], node, 
VLC_ENOMEM );
 }
+
 break;
 case XML_READER_ENDELEM:
 if( ! strcmp( current_element, bootstrapInfo) ) {
@@ -1185,15 +1190,15 @@ static int parse_Manifest( stream_t *s )
 {
 if( !strcmp(attr_name, streamId ) )
 {
-medias[media_idx].stream_id = strdup( attr_value );
+SAFE_STRDUP( medias[media_idx].stream_id, attr_value, 
VLC_ENOMEM );
 }
 if( !strcmp(attr_name, url ) )
 {
-medias[media_idx].media_url = strdup( attr_value );
+SAFE_STRDUP( medias[media_idx].media_url, attr_value, 
VLC_ENOMEM );
 }
 if( !strcmp(attr_name, bootstrapInfoId ) )
 {
-medias[media_idx].bootstrap_id = strdup( attr_value );
+SAFE_STRDUP( medias[media_idx].bootstrap_id, attr_value, 
VLC_ENOMEM );
 }
 }
 
@@ -1206,15 +1211,15 @@ static int parse_Manifest( stream_t *s )
 {
 if( !strcmp(attr_name, url ) )
 {
-bootstraps[bootstrap_idx].url = strdup( attr_value );
+SAFE_STRDUP( bootstraps[bootstrap_idx].url, attr_value, 
VLC_ENOMEM );
 }
 if( !strcmp(attr_name, id ) )
 {
-bootstraps[bootstrap_idx].id = strdup( attr_value );
+SAFE_STRDUP( bootstraps[bootstrap_idx].id, attr_value, 
VLC_ENOMEM );
 }
 if( !strcmp(attr_name, profile ) )
 {
-bootstraps[bootstrap_idx].profile = strdup( attr_value );
+SAFE_STRDUP( bootstraps[bootstrap_idx].profile, 
attr_value, VLC_ENOMEM );
 }
 }
 }
@@ -1245,7 +1250,7 @@ static int parse_Manifest( stream_t *s )
 if( current_element 
 ! strcmp( element_stack[current_element_idx-1], manifest 
) )
 {
-media_id = strdup( node );
+SAFE_STRDUP( media_id, node, VLC_ENOMEM );
 }
 }
 }
@@ -1280,7 +1285,7 @@ static int parse_Manifest( stream_t *s )
 
 if( medias[i].media_url )
 {
-new_stream-url = strdup( medias[i].media_url );
+SAFE_STRDUP( new_stream-url, medias[i].media_url, 
VLC_ENOMEM );
 }
 
 if( ! sys-live )
@@ -1307,7 +1312,7 @@ static int parse_Manifest( stream_t *s )
 }
 else
 {
-new_stream-abst_url = strdup( bootstraps[j].url );
+SAFE_STRDUP( new_stream-abst_url, bootstraps[j].url, 
VLC_ENOMEM );
 }
 
 vlc_array_append( sys-hds_streams, new_stream );
@@ -1340,6 +1345,8 @@ static int parse_Manifest( stream_t *s )
 return VLC_SUCCESS;
 }
 
+#undef SAFE_STRDUP
+
 static void hds_free( hds_stream_t *p_stream )
 {
 FREENULL( p_stream-quality_segment_modifier );

___
vlc-commits mailing list
vlc-commits@videolan.org
https

[vlc-commits] hds: use NULL instead of 0 for pointers

2014-07-18 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul 18 
21:55:13 2014 -0400| [94eb9518920c4694020cea5202b2bcfb792e2497] | committer: 
Tristan Matthews

hds: use NULL instead of 0 for pointers

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94eb9518920c4694020cea5202b2bcfb792e2497
---

 modules/stream_filter/hds/hds.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 90b9992..55acc20 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1043,7 +1043,7 @@ static void* live_thread( void* p )
   server_base,
   hds_stream-abst_url ) )
 {
-return 0;
+return NULL;
 }
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: vc1: use CLOCK_FREQ

2014-07-24 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Jul 24 
10:47:23 2014 -0400| [b7eac9ff9246f1d5a4b4c6f50e67f5c436c643bd] | committer: 
Tristan Matthews

demux: vc1: use CLOCK_FREQ

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7eac9ff9246f1d5a4b4c6f50e67f5c436c643bd
---

 modules/demux/vc1.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/vc1.c b/modules/demux/vc1.c
index 9360902..69c8af6 100644
--- a/modules/demux/vc1.c
+++ b/modules/demux/vc1.c
@@ -173,13 +173,13 @@ static int Demux( demux_t *p_demux)
 
 if( p_sys-p_packetizer-fmt_out.video.i_frame_rate  0 
 p_sys-p_packetizer-fmt_out.video.i_frame_rate_base  0 )
-p_sys-i_dts += INT64_C(100) *
+p_sys-i_dts += CLOCK_FREQ *
 p_sys-p_packetizer-fmt_out.video.i_frame_rate_base /
 p_sys-p_packetizer-fmt_out.video.i_frame_rate;
 else if( p_sys-f_fps  0.001 )
-p_sys-i_dts += (int64_t)((double)100.0 / p_sys-f_fps);
+p_sys-i_dts += (int64_t)((double) CLOCK_FREQ / p_sys-f_fps);
 else
-p_sys-i_dts += INT64_C(100) / 25;
+p_sys-i_dts += CLOCK_FREQ / 25;
 }
 }
 return 1;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: drop macro

2014-07-25 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul 25 
03:26:06 2014 -0400| [d4dc8ab09fbde58ecab4069fe1efb11e7e4aa576] | committer: 
Tristan Matthews

hds: drop macro

Fixes cid #1228697 from commit 160401294cbaa95b87bf0199c64590fef6b7fbc7

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d4dc8ab09fbde58ecab4069fe1efb11e7e4aa576
---

 modules/stream_filter/hds/hds.c |   46 +--
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 55acc20..37ec06a 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1009,9 +1009,6 @@ static void maintain_live_chunks(
 hds_stream-chunks_head = chunk;
 }
 
-#define SAFE_STRDUP( dest, src, ret )   \
-if( !( (dest) = strdup( (src) ) ) ) \
-return (ret)
 
 static void* live_thread( void* p )
 {
@@ -1032,7 +1029,8 @@ static void* live_thread( void* p )
 if( hds_stream-abst_url 
 ( isFQUrl( hds_stream-abst_url ) ) )
 {
-SAFE_STRDUP( abst_url, hds_stream-abst_url, NULL );
+if( !( abst_url = strdup( hds_stream-abst_url ) ) )
+return NULL;
 }
 else
 {
@@ -1152,9 +1150,11 @@ static int parse_Manifest( stream_t *s )
 {
 case XML_READER_STARTELEM:
 if( current_element_idx == 0  element_stack[current_element_idx] 
== 0 ) {
-SAFE_STRDUP( element_stack[current_element_idx], node, 
VLC_ENOMEM );
+if( !( element_stack[current_element_idx] = strdup( node ) ) )
+return VLC_ENOMEM;
 } else {
-SAFE_STRDUP( element_stack[++current_element_idx], node, 
VLC_ENOMEM );
+if ( !( element_stack[++current_element_idx] = strdup( node ) 
) )
+return VLC_ENOMEM;
 }
 
 break;
@@ -1190,15 +1190,18 @@ static int parse_Manifest( stream_t *s )
 {
 if( !strcmp(attr_name, streamId ) )
 {
-SAFE_STRDUP( medias[media_idx].stream_id, attr_value, 
VLC_ENOMEM );
+if( !( medias[media_idx].stream_id = strdup( attr_value ) 
) )
+return VLC_ENOMEM;
 }
 if( !strcmp(attr_name, url ) )
 {
-SAFE_STRDUP( medias[media_idx].media_url, attr_value, 
VLC_ENOMEM );
+if( !( medias[media_idx].media_url = strdup( attr_value ) 
) )
+return VLC_ENOMEM;
 }
 if( !strcmp(attr_name, bootstrapInfoId ) )
 {
-SAFE_STRDUP( medias[media_idx].bootstrap_id, attr_value, 
VLC_ENOMEM );
+if( !( medias[media_idx].bootstrap_id = strdup( attr_value 
) ) )
+return VLC_ENOMEM;
 }
 }
 
@@ -1211,15 +1214,18 @@ static int parse_Manifest( stream_t *s )
 {
 if( !strcmp(attr_name, url ) )
 {
-SAFE_STRDUP( bootstraps[bootstrap_idx].url, attr_value, 
VLC_ENOMEM );
+if( !( bootstraps[bootstrap_idx].url = strdup( attr_value 
) ) )
+return VLC_ENOMEM;
 }
 if( !strcmp(attr_name, id ) )
 {
-SAFE_STRDUP( bootstraps[bootstrap_idx].id, attr_value, 
VLC_ENOMEM );
+if( !( bootstraps[bootstrap_idx].id = strdup( attr_value ) 
) )
+   return VLC_ENOMEM;
 }
 if( !strcmp(attr_name, profile ) )
 {
-SAFE_STRDUP( bootstraps[bootstrap_idx].profile, 
attr_value, VLC_ENOMEM );
+if( !( bootstraps[bootstrap_idx].profile = strdup( 
attr_value ) ) )
+return VLC_ENOMEM;
 }
 }
 }
@@ -1250,7 +1256,8 @@ static int parse_Manifest( stream_t *s )
 if( current_element 
 ! strcmp( element_stack[current_element_idx-1], manifest 
) )
 {
-SAFE_STRDUP( media_id, node, VLC_ENOMEM );
+if( !( media_id = strdup( node ) ) )
+return VLC_ENOMEM;
 }
 }
 }
@@ -1285,7 +1292,11 @@ static int parse_Manifest( stream_t *s )
 
 if( medias[i].media_url )
 {
-SAFE_STRDUP( new_stream-url, medias[i].media_url, 
VLC_ENOMEM );
+if( !(new_stream-url = strdup( medias[i].media_url ) ) )
+{
+free(new_stream);
+return VLC_ENOMEM;
+}
 }
 
 if( ! sys-live )
@@ -1312,7 +1323,11 @@ static int parse_Manifest( stream_t *s )
 }
 else

[vlc-commits] hds: fix memory leak (cid #1224537)

2014-07-25 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Jul 25 
04:32:11 2014 -0400| [7a1699c28603a4929d0e507e50c1d00fde7c6d84] | committer: 
Tristan Matthews

hds: fix memory leak (cid #1224537)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a1699c28603a4929d0e507e50c1d00fde7c6d84
---

 modules/stream_filter/hds/hds.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 37ec06a..ae75994 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -920,6 +920,7 @@ static chunk_t* generate_new_chunk(
 if( frun_entry == hds_stream-fragment_run_count )
 {
 msg_Err( p_this, Couldn'd find the fragment run! );
+chunk_free( chunk );
 return NULL;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: Fix dereference after NULL check (cid #1048740)

2014-07-25 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Jul 15 20:52:23 2014 -0400| [359eb52a46b47fe209c60bb1947c9955b2288d71] | 
committer: Jean-Baptiste Kempf

avcodec: Fix dereference after NULL check (cid #1048740)

(cherry picked from commit 4386b8c617c34f79d1b8ec0780e9cffaa9d16ac0)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=359eb52a46b47fe209c60bb1947c9955b2288d71
---

 modules/codec/avcodec/encoder.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 860556f..3e18086 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -660,7 +660,8 @@ int OpenEncoder( vlc_object_t *p_this )
 
 /* Try to match avcodec input format to vlc format so we could avoid 
one
format conversion */
-if( GetVlcAudioFormat( p_context-sample_fmt ) != 
p_enc-fmt_in.i_codec )
+if( GetVlcAudioFormat( p_context-sample_fmt ) != p_enc-fmt_in.i_codec
+ p_codec-sample_fmts )
 {
 msg_Dbg( p_enc, Trying to find more suitable sample format 
instead of %s, av_get_sample_fmt_name( p_context-sample_fmt ) );
 for( unsigned int i=0; p_codec-sample_fmts[i] != -1; i++ )
@@ -676,7 +677,7 @@ int OpenEncoder( vlc_object_t *p_this )
 p_sys-b_planar = av_sample_fmt_is_planar( p_context-sample_fmt );
 // Try if we can use interleaved format for codec input as VLC doesn't 
really do planar audio yet
 // FIXME: Remove when planar/interleaved audio in vlc is equally 
supported
-if( p_sys-b_planar )
+if( p_sys-b_planar  p_codec-sample_fmts )
 {
 msg_Dbg( p_enc, Trying to find packet sample format instead of 
planar %s, av_get_sample_fmt_name( p_context-sample_fmt ) );
 for( unsigned int i=0; p_codec-sample_fmts[i] != -1; i++ )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mux: ogg: fix pointer arithmetic (cid #1048982)

2014-07-25 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Jul 15 21:25:05 2014 -0400| [9bb9360e7cde0ecf3605e51dc63d9ab224640264] | 
committer: Jean-Baptiste Kempf

mux: ogg: fix pointer arithmetic (cid #1048982)

Extra header is stored at ogg_header + (1 * sizeof(ogg_header)),
not ogg_header + (sizeof(ogg_header) * sizeof(ogg_header)).

(cherry picked from commit 9a220019c9865f3d7db2c7601d2930632b7c593e)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=9bb9360e7cde0ecf3605e51dc63d9ab224640264
---

 modules/mux/ogg.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 02b844f..c599199 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -908,7 +908,7 @@ static int32_t OggFillDsHeader( uint8_t *p_buffer, 
oggds_header_t *p_oggds_heade
 /* extra header */
 if( p_oggds_header-i_size  0 )
 {
-memcpy( p_buffer[index], p_oggds_header + sizeof(*p_oggds_header), 
p_oggds_header-i_size );
+memcpy( p_buffer[index], (uint8_t *) p_oggds_header + 
sizeof(*p_oggds_header), p_oggds_header-i_size );
 index += p_oggds_header-i_size;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: fix out of bounds access (cid #1224531)

2014-07-31 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Aug  1 
00:00:30 2014 -0400| [d6b004b2034ad0c11aeac1f76ed2e3e7f8151222] | committer: 
Tristan Matthews

hds: fix out of bounds access (cid #1224531)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d6b004b2034ad0c11aeac1f76ed2e3e7f8151222
---

 modules/stream_filter/hds/hds.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index a8e6c89..2c0750a 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -618,7 +618,7 @@ static void whitespace_substr( char** start,
 return;
 
 while( is_whitespace(*(*end - 1) ) ) {
-end--;
+(*end)--;
 }
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: fix redundant NULL check (cid #1224540)

2014-07-31 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Aug  1 
00:22:39 2014 -0400| [6608e8564421a570a039a9f60709707203c24620] | committer: 
Tristan Matthews

hds: fix redundant NULL check (cid #1224540)

current_element is checked earlier and the loop continues if it's NULL.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6608e8564421a570a039a9f60709707203c24620
---

 modules/stream_filter/hds/hds.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 5ec1a37..feb0b43 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1262,8 +1262,7 @@ static int parse_Manifest( stream_t *s )
 }
 if( ! strcmp( current_element, id ) )
 {
-if( current_element 
-! strcmp( element_stack[current_element_idx-1], manifest 
) )
+if( ! strcmp( element_stack[current_element_idx-1], manifest 
) )
 {
 if( !( media_id = strdup( node ) ) )
 return VLC_ENOMEM;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] input: fix use after free

2014-08-01 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Aug  1 
11:55:11 2014 -0400| [e345ccc4ed2ed312793ff00efdd2bc572d845461] | committer: 
Tristan Matthews

input: fix use after free

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e345ccc4ed2ed312793ff00efdd2bc572d845461
---

 src/input/input.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 87bbfe8..7f4693f 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2413,7 +2413,6 @@ static int InputSourceInit( input_thread_t *p_input,
 
 if( in-p_demux == NULL )
 {
-stream_Delete( p_stream );
 if( vlc_object_alive( p_input ) )
 {
 msg_Err( p_input, no suitable demux module for `%s/%s://%s',
@@ -2424,6 +2423,7 @@ static int InputSourceInit( input_thread_t *p_input,
   _(The format of '%s' cannot be detected. 
 Have a look at the log for details.), 
psz_mrl );
 }
+stream_Delete( p_stream );
 goto error;
 }
 assert( in-p_demux-pf_demux != NULL );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] input: fix use after free

2014-08-02 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Fri Aug  1 11:55:11 2014 -0400| [acd2b4efb51f5358feb980e86155eecc58027fc7] | 
committer: Jean-Baptiste Kempf

input: fix use after free

(cherry picked from commit e345ccc4ed2ed312793ff00efdd2bc572d845461)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=acd2b4efb51f5358feb980e86155eecc58027fc7
---

 src/input/input.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 7e71d4e..917eec4 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2415,7 +2415,6 @@ static int InputSourceInit( input_thread_t *p_input,
 
 if( in-p_demux == NULL )
 {
-stream_Delete( p_stream );
 if( vlc_object_alive( p_input ) )
 {
 msg_Err( p_input, no suitable demux module for `%s/%s://%s',
@@ -2426,6 +2425,7 @@ static int InputSourceInit( input_thread_t *p_input,
   _(The format of '%s' cannot be detected. 
 Have a look at the log for details.), 
psz_mrl );
 }
+stream_Delete( p_stream );
 goto error;
 }
 assert( in-p_demux-pf_demux != NULL );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] stream_filter: smooth: fix leak (cid #1211818)

2014-08-09 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat Aug  9 
20:46:38 2014 -0400| [887e8f05876f380ab264f382ba905599c5d8a59e] | committer: 
Tristan Matthews

stream_filter: smooth: fix leak (cid #1211818)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=887e8f05876f380ab264f382ba905599c5d8a59e
---

 modules/stream_filter/smooth/smooth.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/stream_filter/smooth/smooth.c 
b/modules/stream_filter/smooth/smooth.c
index 59f1e67..e3be190 100644
--- a/modules/stream_filter/smooth/smooth.c
+++ b/modules/stream_filter/smooth/smooth.c
@@ -173,6 +173,7 @@ static int parse_Manifest( stream_t *s )
 }
 else if( !strcmp( node, StreamIndex ) )
 {
+sms_Free( sms );
 sms = sms_New();
 if( unlikely( !sms ) )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vorbis: fix dereference after null check (cid #403019)

2014-08-09 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat Aug  9 
21:02:00 2014 -0400| [4941746e6379c43d56fc70ad5a7ad83d99081b2b] | committer: 
Tristan Matthews

vorbis: fix dereference after null check (cid #403019)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4941746e6379c43d56fc70ad5a7ad83d99081b2b
---

 modules/codec/vorbis.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 53b2c60..077a1c3 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -318,7 +318,8 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 {
 if( ProcessHeaders( p_dec ) )
 {
-block_Release( *pp_block );
+if( *pp_block )
+block_Release( *pp_block );
 return NULL;
 }
 p_sys-b_has_headers = true;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vorbis: fix dereference after null check (cid #403019)

2014-08-10 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Sat Aug  9 21:02:00 2014 -0400| [1feb0545d9a67f247a46fe1db31b7f422771887c] | 
committer: Jean-Baptiste Kempf

vorbis: fix dereference after null check (cid #403019)

(cherry picked from commit 4941746e6379c43d56fc70ad5a7ad83d99081b2b)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=1feb0545d9a67f247a46fe1db31b7f422771887c
---

 modules/codec/vorbis.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 53b2c60..077a1c3 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -318,7 +318,8 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 {
 if( ProcessHeaders( p_dec ) )
 {
-block_Release( *pp_block );
+if( *pp_block )
+block_Release( *pp_block );
 return NULL;
 }
 p_sys-b_has_headers = true;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] stream_filter: smooth: fix leak (cid #1211818)

2014-08-10 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Sat Aug  9 20:46:38 2014 -0400| [68906550c1030f5d000236f04bddb4a53690db04] | 
committer: Jean-Baptiste Kempf

stream_filter: smooth: fix leak (cid #1211818)

(cherry picked from commit 887e8f05876f380ab264f382ba905599c5d8a59e)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=68906550c1030f5d000236f04bddb4a53690db04
---

 modules/stream_filter/smooth/smooth.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/stream_filter/smooth/smooth.c 
b/modules/stream_filter/smooth/smooth.c
index 59f1e67..e3be190 100644
--- a/modules/stream_filter/smooth/smooth.c
+++ b/modules/stream_filter/smooth/smooth.c
@@ -173,6 +173,7 @@ static int parse_Manifest( stream_t *s )
 }
 else if( !strcmp( node, StreamIndex ) )
 {
+sms_Free( sms );
 sms = sms_New();
 if( unlikely( !sms ) )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mux: ogg: fix typo

2014-08-19 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews le.business...@gmail.com | 
Tue Aug 19 16:45:54 2014 -0700| [7d19a36399492c94931985c8e697b6cb5d36c88a] | 
committer: Jean-Baptiste Kempf

mux: ogg: fix typo

(cherry picked from commit e5a98bffa578fbf24220e7a4ac8dcd4523b79dec)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=7d19a36399492c94931985c8e697b6cb5d36c88a
---

 modules/mux/ogg.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index c599199..c71662a 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -763,7 +763,7 @@ static void OggGetSkeletonFisbone( uint8_t **pp_buffer, 
long *pi_size,
 break;
 default:
 psz_value = application/octet-stream;
-msg_Warn( p_mux, Unkown fourcc for stream %s, setting 
Content-Type to %s,
+msg_Warn( p_mux, Unknown fourcc for stream %s, setting 
Content-Type to %s,
   vlc_fourcc_GetDescription( p_stream-i_cat, 
p_stream-i_fourcc ),
   psz_value );
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] daala: add decoder support

2014-08-28 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Aug 20 
14:27:04 2014 -0700| [774d273f23b601a5e3fd63835ba72b755dadfce7] | committer: 
Tristan Matthews

daala: add decoder support

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=774d273f23b601a5e3fd63835ba72b755dadfce7
---

 configure.ac  |5 +
 include/vlc_fourcc.h  |1 +
 modules/codec/Makefile.am |7 +
 modules/codec/daala.c |  508 +
 4 files changed, 521 insertions(+)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=774d273f23b601a5e3fd63835ba72b755dadfce7
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: ogg: daala support

2014-08-28 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Wed Aug 20 
17:23:41 2014 -0700| [1d3d32373a2c919f9741c2f4c0fd81de1ab14238] | committer: 
Tristan Matthews

demux: ogg: daala support

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d3d32373a2c919f9741c2f4c0fd81de1ab14238
---

 modules/demux/ogg.c |  102 +++
 modules/demux/oggseek.c |5 ++-
 2 files changed, 106 insertions(+), 1 deletion(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index b61366b..192e3e0 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -136,6 +136,7 @@ static void Ogg_ResetStream( logical_stream_t *p_stream );
 static void Ogg_ExtractMeta( demux_t *p_demux, es_format_t *p_fmt, const 
uint8_t *p_headers, int i_headers );
 
 /* Logical bitstream headers */
+static bool Ogg_ReadDaalaHeader( logical_stream_t *, ogg_packet * );
 static bool Ogg_ReadTheoraHeader( logical_stream_t *, ogg_packet * );
 static bool Ogg_ReadVorbisHeader( logical_stream_t *, ogg_packet * );
 static bool Ogg_ReadSpeexHeader( logical_stream_t *, ogg_packet * );
@@ -446,6 +447,13 @@ static int Demux( demux_t * p_demux )
 Ogg_ReadTheoraHeader( p_stream, oggpacket );
 p_stream-i_secondary_header_packets = 0;
 }
+else if( p_stream-fmt.i_codec == VLC_CODEC_DAALA 
+oggpacket.bytes = 6 
+! memcmp( oggpacket.packet, \x80daala, 6 ) )
+{
+Ogg_ReadDaalaHeader( p_stream, oggpacket );
+p_stream-i_secondary_header_packets = 0;
+}
 else if( p_stream-fmt.i_codec == VLC_CODEC_VORBIS 
 oggpacket.bytes = 7 
 ! memcmp( oggpacket.packet, \x01vorbis, 7 ) )
@@ -938,6 +946,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, 
logical_stream_t *p_stream,
 else if( p_oggpacket-granulepos  0 )
 {
 if( p_stream-fmt.i_codec == VLC_CODEC_THEORA ||
+p_stream-fmt.i_codec == VLC_CODEC_DAALA ||
 p_stream-fmt.i_codec == VLC_CODEC_KATE ||
 p_stream-fmt.i_codec == VLC_CODEC_VP8 ||
 p_stream-fmt.i_codec == VLC_CODEC_DIRAC ||
@@ -1162,6 +1171,12 @@ static void Ogg_DecodePacket( demux_t *p_demux,
 b_xiph = true;
 break;
 
+case VLC_CODEC_DAALA:
+if( p_stream-i_packets_backup == 3 )
+p_stream-b_force_backup = false;
+b_xiph = true;
+break;
+
 case VLC_CODEC_SPEEX:
 if( p_stream-i_packets_backup == 2 + 
p_stream-i_extra_headers_packets )
 p_stream-b_force_backup = false;
@@ -1339,6 +1354,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
 p_stream-fmt.i_codec != VLC_CODEC_FLAC 
 p_stream-fmt.i_codec != VLC_CODEC_TARKIN 
 p_stream-fmt.i_codec != VLC_CODEC_THEORA 
+p_stream-fmt.i_codec != VLC_CODEC_DAALA 
 p_stream-fmt.i_codec != VLC_CODEC_CMML 
 p_stream-fmt.i_codec != VLC_CODEC_DIRAC 
 p_stream-fmt.i_codec != VLC_CODEC_KATE )
@@ -1600,6 +1616,21 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
 p_ogg-i_streams--;
 }
 }
+/* Check for Daala header */
+else if( oggpacket.bytes = 6 
+ ! memcmp( oggpacket.packet, \x80daala, 6 ) )
+{
+if ( Ogg_ReadDaalaHeader( p_stream, oggpacket ) )
+msg_Dbg( p_demux,
+ found daala header, bitrate: %i, rate: %f,
+ p_stream-fmt.i_bitrate, p_stream-f_rate );
+else
+{
+msg_Dbg( p_demux, found invalid Daala header );
+Ogg_LogicalStreamDelete( p_demux, p_stream );
+p_ogg-i_streams--;
+}
+}
 /* Check for Dirac header */
 else if( ( oggpacket.bytes = 5 
! memcmp( oggpacket.packet, BBCD\x00, 5 ) ) ||
@@ -2381,6 +2412,7 @@ static void Ogg_ExtractMeta( demux_t *p_demux, 
es_format_t *p_fmt, const uint8_t
 /* 3 headers with the 2° one being the comments */
 case VLC_CODEC_VORBIS:
 case VLC_CODEC_THEORA:
+case VLC_CODEC_DAALA:
 Ogg_ExtractXiphMeta( p_demux, p_fmt, p_headers, i_headers, 1+6 );
 break;
 case VLC_CODEC_OPUS:
@@ -2484,6 +2516,68 @@ static bool Ogg_ReadTheoraHeader( logical_stream_t 
*p_stream,
 return true;
 }
 
+static bool Ogg_ReadDaalaHeader( logical_stream_t *p_stream,
+ ogg_packet *p_oggpacket )
+{
+oggpack_buffer opb;
+uint32_t i_timebase_numerator;
+uint32_t i_timebase_denominator;
+int i_keyframe_frequency_force;
+uint8_t i_major;
+uint8_t

[vlc-commits] daala: update NEWS, MODULES_LIST and POTFILES.in

2014-08-28 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Aug 28 
03:12:04 2014 -0400| [9fc9d52165a18df59b978c88e9796a1f01fc6aa3] | committer: 
Tristan Matthews

daala: update NEWS, MODULES_LIST and POTFILES.in

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9fc9d52165a18df59b978c88e9796a1f01fc6aa3
---

 NEWS |1 +
 modules/MODULES_LIST |1 +
 po/POTFILES.in   |1 +
 3 files changed, 3 insertions(+)

diff --git a/NEWS b/NEWS
index d290d06..c58fd4e 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Decoder:
  * OMX GPU-zerocopy support for decoding and display on Android using OpenMax 
IL
  * Support 4:4:4 chroma sampling with VDPAU hw acceleration
  * Support for ARIB B24 subtitles
+ * Support for Daala video
 
 Demuxers:
  * Support HD-DVD .evo (H.264, VC-1, MPEG-2, PCM, AC-3, E-AC3, MLP, DTS)
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index 8666bcb..0a73ca4 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -77,6 +77,7 @@ $Id$
  * croppadd: Crop/Padd image filter
  * crystalhd: crystalhd decoder
  * cvdsub: CVD subtitles decoder
+ * daala: a daala video decoder/packetizer using libdaala
  * dash: MPEG DASH playback
  * dbus: D-Bus control interface
  * dbus_screensaver: preventing the computer from suspending
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f56ab10..b62ee5b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -362,6 +362,7 @@ modules/codec/cc.h
 modules/codec/cdg.c
 modules/codec/crystalhd.c
 modules/codec/cvdsub.c
+modules/codec/daala.c
 modules/codec/ddummy.c
 modules/codec/dmo/buffer.c
 modules/codec/dmo/dmo.c

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] avcodec: fix missing include

2014-09-14 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sun Sep 14 
13:29:55 2014 -0400| [fac4b7fb6ab88d97df1d4352fbc1848a4cb6d89a] | committer: 
Tristan Matthews

avcodec: fix missing include

Needed for av_freep

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fac4b7fb6ab88d97df1d4352fbc1848a4cb6d89a
---

 modules/codec/avcodec/avcommon_compat.h |3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/avcodec/avcommon_compat.h 
b/modules/codec/avcodec/avcommon_compat.h
index d6293d7..fb2396f 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -37,6 +37,9 @@
   (LIBAVCODEC_VERSION_MICRO = 100  LIBAVCODEC_VERSION_INT = 
AV_VERSION_INT( a, d, e ) ) )
 
 # if (LIBAVCODEC_VERSION_INT  AV_VERSION_INT(55, 52, 0))
+
+#include libavutil/mem.h
+
 static inline void avcodec_free_context( AVCodecContext **ctx )
 {
 av_freep( ctx );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] NEWS: update for Opus in TS

2014-09-20 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sat Sep 20 
13:12:55 2014 -0400| [7908311aca4ece9d532cb714e2e114f3ea84cb44] | committer: 
Tristan Matthews

NEWS: update for Opus in TS

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7908311aca4ece9d532cb714e2e114f3ea84cb44
---

 NEWS |2 ++
 1 file changed, 2 insertions(+)

diff --git a/NEWS b/NEWS
index 4ba2741..98b73a0 100644
--- a/NEWS
+++ b/NEWS
@@ -16,9 +16,11 @@ Decoder:
 
 Demuxers:
  * Support HD-DVD .evo (H.264, VC-1, MPEG-2, PCM, AC-3, E-AC3, MLP, DTS)
+ * Opus in MPEG Transport Stream
 
 Muxers:
  * Added fragmented/streamable MP4 muxer
+ * Opus in MPEG Transport Stream
 
 Service Discovery:
  * New NetBios service discovery using libdsm

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: add (disabled) rules.mak for daala

2014-09-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Sun Sep 21 
15:25:15 2014 +0100| [c4760610366008ee80810d9828fb2766d8cde81f] | committer: 
Tristan Matthews

contrib: add (disabled) rules.mak for daala

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4760610366008ee80810d9828fb2766d8cde81f
---

 contrib/src/daala/rules.mak |   34 ++
 1 file changed, 34 insertions(+)

diff --git a/contrib/src/daala/rules.mak b/contrib/src/daala/rules.mak
new file mode 100644
index 000..84fcb4f
--- /dev/null
+++ b/contrib/src/daala/rules.mak
@@ -0,0 +1,34 @@
+DAALA_VERSION := git
+DAALA_HASH := HEAD
+DAALA_GITURL := 
http://git.xiph.org/?p=daala.git;a=snapshot;h=$(DAALA_HASH);sf=tgz
+
+# Default disabled for now
+# PKGS += daala
+ifeq ($(call need_pkg,daala),)
+PKGS_FOUND += daala
+endif
+
+$(TARBALLS)/daala-git.tar.gz:
+   $(call download,$(DAALA_GITURL))
+
+.sum-daala: daala-$(DAALA_VERSION).tar.gz
+   $(warning $@ not implemented)
+   touch $@
+
+daala: daala-$(DAALA_VERSION).tar.gz .sum-daala
+   rm -Rf $@-git $@
+   mkdir -p $@-git
+   $(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
+   $(MOVE)
+   mkdir -p $@/m4
+
+DAALACONF := $(HOSTCONF) \
+   --disable-player --disable-tools
+
+DEPS_daala = ogg $(DEPS_ogg)
+
+.daala: daala
+   $(RECONF)
+   cd $  $(HOSTVARS) ./configure $(DAALACONF)
+   cd $  $(MAKE) install
+   touch $@

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mux: ogg: add daala support

2014-09-21 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Thu Sep 18 
22:10:10 2014 -0400| [a2a352f34fe7ab58f12ff51c08c554546ee4ee86] | committer: 
Tristan Matthews

mux: ogg: add daala support

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2a352f34fe7ab58f12ff51c08c554546ee4ee86
---

 modules/mux/ogg.c |   30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index c71662a..1045922 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -152,7 +152,7 @@ typedef struct
 mtime_t i_length;
 int i_packet_no;
 int i_serial_no;
-int i_keyframe_granule_shift; /* Theora only */
+int i_keyframe_granule_shift; /* Theora and Daala only */
 int i_last_keyframe; /* dirac and theora */
 int i_num_frames; /* Theora only */
 uint64_t u_last_granulepos; /* Used for correct EOS page */
@@ -439,6 +439,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t 
*p_input )
 msg_Dbg( p_mux, theora stream );
 break;
 
+case VLC_CODEC_DAALA:
+msg_Dbg( p_mux, daala stream );
+break;
+
 case VLC_CODEC_VP8:
 msg_Dbg( p_mux, VP8 stream );
 break;
@@ -746,6 +750,9 @@ static void OggGetSkeletonFisbone( uint8_t **pp_buffer, 
long *pi_size,
 case VLC_CODEC_THEORA:
 psz_value = video/theora;
 break;
+case VLC_CODEC_DAALA:
+psz_value = video/daala;
+break;
 case VLC_CODEC_SPEEX:
 psz_value = audio/speex;
 break;
@@ -994,7 +1001,9 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
 sout_input_t *p_input = p_mux-pp_inputs[i];
 p_stream = (ogg_stream_t*)p_input-p_sys;
 
-bool video = ( p_stream-i_fourcc == VLC_CODEC_THEORA || 
p_stream-i_fourcc == VLC_CODEC_DIRAC );
+bool video = ( p_stream-i_fourcc == VLC_CODEC_THEORA ||
+   p_stream-i_fourcc == VLC_CODEC_DIRAC ||
+   p_stream-i_fourcc == VLC_CODEC_DAALA );
 if( ( ( pass == 0  !video ) || ( pass == 1  video ) ) )
 continue;
 
@@ -1009,9 +1018,10 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
 if( p_stream-i_fourcc == VLC_CODEC_VORBIS ||
 p_stream-i_fourcc == VLC_CODEC_SPEEX ||
 p_stream-i_fourcc == VLC_CODEC_OPUS ||
-p_stream-i_fourcc == VLC_CODEC_THEORA )
+p_stream-i_fourcc == VLC_CODEC_THEORA ||
+p_stream-i_fourcc == VLC_CODEC_DAALA )
 {
-/* First packet in order: vorbis/speex/theora info */
+/* First packet in order: vorbis/speex/opus/theora/daala info 
*/
 unsigned pi_size[XIPH_MAX_HEADER_COUNT];
 void *pp_data[XIPH_MAX_HEADER_COUNT];
 unsigned i_count;
@@ -1035,8 +1045,9 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
 ogg_stream_packetin( p_stream-os, op );
 p_og = OggStreamFlush( p_mux, p_stream-os, 0 );
 
-/* Get keyframe_granule_shift for theora granulepos 
calculation */
-if( p_stream-i_fourcc == VLC_CODEC_THEORA )
+/* Get keyframe_granule_shift for theora or daala granulepos 
calculation */
+if( p_stream-i_fourcc == VLC_CODEC_THEORA ||
+p_stream-i_fourcc == VLC_CODEC_DAALA )
 {
 p_stream-i_keyframe_granule_shift =
 ( (op.packet[40]  0x03)  3 ) | ( (op.packet[41]  
0xe0)  5 );
@@ -1172,7 +1183,8 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
 if( p_stream-i_fourcc == VLC_CODEC_VORBIS ||
 p_stream-i_fourcc == VLC_CODEC_SPEEX ||
 p_stream-i_fourcc == VLC_CODEC_OPUS ||
-p_stream-i_fourcc == VLC_CODEC_THEORA )
+p_stream-i_fourcc == VLC_CODEC_THEORA ||
+p_stream-i_fourcc == VLC_CODEC_DAALA )
 {
 unsigned pi_size[XIPH_MAX_HEADER_COUNT];
 void *pp_data[XIPH_MAX_HEADER_COUNT];
@@ -1573,6 +1585,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t 
*p_input )
 p_stream-i_fourcc != VLC_CODEC_SPEEX 
 p_stream-i_fourcc != VLC_CODEC_OPUS 
 p_stream-i_fourcc != VLC_CODEC_THEORA 
+p_stream-i_fourcc != VLC_CODEC_DAALA 
 p_stream-i_fourcc != VLC_CODEC_VP8 
 p_stream-i_fourcc != VLC_CODEC_DIRAC )
 {
@@ -1614,7 +1627,8 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t 
*p_input )
 }
 else if( p_stream-i_cat == VIDEO_ES )
 {
-if( p_stream-i_fourcc == VLC_CODEC_THEORA )
+if( p_stream-i_fourcc == VLC_CODEC_THEORA ||
+p_stream-i_fourcc == VLC_CODEC_DAALA )
 {
 p_stream-i_num_frames++;
 if( p_data-i_flags  BLOCK_FLAG_TYPE_I

[vlc-commits] NEWS: update for daala

2014-09-22 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Mon Sep 22 
11:51:17 2014 +0100| [9c8d5afec7e83b117409cb291f923c2cd91dea24] | committer: 
Tristan Matthews

NEWS: update for daala

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c8d5afec7e83b117409cb291f923c2cd91dea24
---

 NEWS |5 +
 1 file changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index 98b73a0..311d8e1 100644
--- a/NEWS
+++ b/NEWS
@@ -14,13 +14,18 @@ Decoder:
  * Support for ARIB B24 subtitles
  * Support for Daala video
 
+Encoder:
+ * Support for Daala video
+
 Demuxers:
  * Support HD-DVD .evo (H.264, VC-1, MPEG-2, PCM, AC-3, E-AC3, MLP, DTS)
  * Opus in MPEG Transport Stream
+ * Daala in Ogg
 
 Muxers:
  * Added fragmented/streamable MP4 muxer
  * Opus in MPEG Transport Stream
+ * Daala in Ogg
 
 Service Discovery:
  * New NetBios service discovery using libdsm

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] daala: encoder: fix stride

2014-09-26 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Fri Sep 26 
07:48:04 2014 -0400| [9e2997dd6b6dfe42faa951d07c9cdbbf95e26abf] | committer: 
Tristan Matthews

daala: encoder: fix stride

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e2997dd6b6dfe42faa951d07c9cdbbf95e26abf
---

 modules/codec/daala.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/codec/daala.c b/modules/codec/daala.c
index 9d66d7a..36dc9a6 100644
--- a/modules/codec/daala.c
+++ b/modules/codec/daala.c
@@ -686,8 +686,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict 
)
 img.planes[i].xdec = p_sys-di.plane_info[i].xdec;
 img.planes[i].ydec = p_sys-di.plane_info[i].ydec;
 img.planes[i].xstride = 1;
-img.planes[i].ystride = (img.width
- + (1  img.planes[i].xdec) - 1)img.planes[i].xdec;
+img.planes[i].ystride = p_pict-p[i].i_pitch;
 }
 
 if( daala_encode_img_in( p_sys-dcx, img, 0 )  0 )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] daala: encoder: add support for 422 and 444

2014-09-26 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Fri Sep 26 
09:51:00 2014 -0400| [3980aec7f4f59e7531da2be9f42f2f047d6b93af] | committer: 
Tristan Matthews

daala: encoder: add support for 422 and 444

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3980aec7f4f59e7531da2be9f42f2f047d6b93af
---

 modules/codec/daala.c |   58 -
 1 file changed, 53 insertions(+), 5 deletions(-)

diff --git a/modules/codec/daala.c b/modules/codec/daala.c
index 36dc9a6..0679528 100644
--- a/modules/codec/daala.c
+++ b/modules/codec/daala.c
@@ -95,6 +95,13 @@ static void daala_CopyPicture( picture_t *, od_img * );
 static int  OpenEncoder( vlc_object_t *p_this );
 static void CloseEncoder( vlc_object_t *p_this );
 static block_t *Encode( encoder_t *p_enc, picture_t *p_pict );
+
+static const char *const enc_chromafmt_list[] = {
+420, 422, 444
+};
+static const char *const enc_chromafmt_list_text[] = {
+4:2:0, 4:2:2, 4:4:4
+};
 #endif
 
 /*
@@ -133,12 +140,20 @@ vlc_module_begin ()
  ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT, false )
 add_integer_with_range( ENC_CFG_PREFIX keyint, 256, 1, 1000,
  ENC_KEYINT_TEXT, ENC_KEYINT_LONGTEXT, false )
-#endif
+
+#   define ENC_CHROMAFMT_TEXT N_(Chroma format)
+#   define ENC_CHROMAFMT_LONGTEXT N_(Picking chroma format will force a  \
+ conversion of the video into that 
format)
+
+add_string( ENC_CFG_PREFIX chroma-fmt, 420, ENC_CHROMAFMT_TEXT,
+ENC_CHROMAFMT_LONGTEXT, false )
+change_string_list( enc_chromafmt_list, enc_chromafmt_list_text )
 vlc_module_end ()
 
 static const char *const ppsz_enc_options[] = {
-quality, keyint, NULL
+quality, keyint, chroma-fmt, NULL
 };
+#endif
 
 /*
  * OpenDecoder: probe the decoder and return score
@@ -576,17 +591,50 @@ static int OpenEncoder( vlc_object_t *p_this )
 
 config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc-p_cfg );
 
+char *psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX chroma-fmt );
+uint32_t i_codec;
+if( !psz_tmp ) {
+free(p_sys);
+return VLC_ENOMEM;
+} else {
+if( !strcmp( psz_tmp, 420 ) ) {
+i_codec = VLC_CODEC_I420;
+}
+else if( !strcmp( psz_tmp, 422 ) ) {
+i_codec = VLC_CODEC_I422;
+}
+else if( !strcmp( psz_tmp, 444 ) ) {
+i_codec = VLC_CODEC_I444;
+}
+else {
+msg_Err( p_enc, Invalid chroma format: %s, psz_tmp );
+free( psz_tmp );
+free( p_sys );
+return VLC_EGENERIC;
+}
+free( psz_tmp );
+p_enc-fmt_in.i_codec = i_codec;
+/* update bits_per_pixel */
+video_format_Setup(p_enc-fmt_in.video, i_codec,
+p_enc-fmt_in.video.i_width,
+p_enc-fmt_in.video.i_height,
+p_enc-fmt_in.video.i_visible_width,
+p_enc-fmt_in.video.i_visible_height,
+p_enc-fmt_in.video.i_sar_num,
+p_enc-fmt_in.video.i_sar_den);
+}
+
 daala_info_init( p_sys-di );
 
 p_sys-di.pic_width = p_enc-fmt_in.video.i_visible_width;
 p_sys-di.pic_height = p_enc-fmt_in.video.i_visible_height;
 
-/* 420 */
 p_sys-di.nplanes = 3;
 for (int i = 0; i  p_sys-di.nplanes; i++)
 {
-p_sys-di.plane_info[i].ydec =
-p_sys-di.plane_info[i].xdec = i  0;
+p_sys-di.plane_info[i].xdec = i  0  i_codec != VLC_CODEC_I444;
+p_sys-di.plane_info[i].ydec = i_codec == VLC_CODEC_I420 ?
+p_sys-di.plane_info[i].xdec : 0;
 }
 p_sys-di.frame_duration = 1;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] daala: encoder: add support for 444

2014-09-26 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Fri Sep 26 
09:51:00 2014 -0400| [77d7c36987d8b543d00fc6d661ad7aecc44d021c] | committer: 
Tristan Matthews

daala: encoder: add support for 444

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77d7c36987d8b543d00fc6d661ad7aecc44d021c
---

 modules/codec/daala.c |   55 -
 1 file changed, 50 insertions(+), 5 deletions(-)

diff --git a/modules/codec/daala.c b/modules/codec/daala.c
index 36dc9a6..5d7685b 100644
--- a/modules/codec/daala.c
+++ b/modules/codec/daala.c
@@ -95,6 +95,13 @@ static void daala_CopyPicture( picture_t *, od_img * );
 static int  OpenEncoder( vlc_object_t *p_this );
 static void CloseEncoder( vlc_object_t *p_this );
 static block_t *Encode( encoder_t *p_enc, picture_t *p_pict );
+
+static const char *const enc_chromafmt_list[] = {
+420, 444
+};
+static const char *const enc_chromafmt_list_text[] = {
+4:2:0, 4:4:4
+};
 #endif
 
 /*
@@ -133,12 +140,20 @@ vlc_module_begin ()
  ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT, false )
 add_integer_with_range( ENC_CFG_PREFIX keyint, 256, 1, 1000,
  ENC_KEYINT_TEXT, ENC_KEYINT_LONGTEXT, false )
-#endif
+
+#   define ENC_CHROMAFMT_TEXT N_(Chroma format)
+#   define ENC_CHROMAFMT_LONGTEXT N_(Picking chroma format will force a  \
+ conversion of the video into that 
format)
+
+add_string( ENC_CFG_PREFIX chroma-fmt, 420, ENC_CHROMAFMT_TEXT,
+ENC_CHROMAFMT_LONGTEXT, false )
+change_string_list( enc_chromafmt_list, enc_chromafmt_list_text )
 vlc_module_end ()
 
 static const char *const ppsz_enc_options[] = {
-quality, keyint, NULL
+quality, keyint, chroma-fmt, NULL
 };
+#endif
 
 /*
  * OpenDecoder: probe the decoder and return score
@@ -576,17 +591,47 @@ static int OpenEncoder( vlc_object_t *p_this )
 
 config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc-p_cfg );
 
+char *psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX chroma-fmt );
+uint32_t i_codec;
+if( !psz_tmp ) {
+free(p_sys);
+return VLC_ENOMEM;
+} else {
+if( !strcmp( psz_tmp, 420 ) ) {
+i_codec = VLC_CODEC_I420;
+}
+else if( !strcmp( psz_tmp, 444 ) ) {
+i_codec = VLC_CODEC_I444;
+}
+else {
+msg_Err( p_enc, Invalid chroma format: %s, psz_tmp );
+free( psz_tmp );
+free( p_sys );
+return VLC_EGENERIC;
+}
+free( psz_tmp );
+p_enc-fmt_in.i_codec = i_codec;
+/* update bits_per_pixel */
+video_format_Setup(p_enc-fmt_in.video, i_codec,
+p_enc-fmt_in.video.i_width,
+p_enc-fmt_in.video.i_height,
+p_enc-fmt_in.video.i_visible_width,
+p_enc-fmt_in.video.i_visible_height,
+p_enc-fmt_in.video.i_sar_num,
+p_enc-fmt_in.video.i_sar_den);
+}
+
 daala_info_init( p_sys-di );
 
 p_sys-di.pic_width = p_enc-fmt_in.video.i_visible_width;
 p_sys-di.pic_height = p_enc-fmt_in.video.i_visible_height;
 
-/* 420 */
 p_sys-di.nplanes = 3;
 for (int i = 0; i  p_sys-di.nplanes; i++)
 {
-p_sys-di.plane_info[i].ydec =
-p_sys-di.plane_info[i].xdec = i  0;
+p_sys-di.plane_info[i].xdec = i  0  i_codec != VLC_CODEC_I444;
+p_sys-di.plane_info[i].ydec = i_codec == VLC_CODEC_I420 ?
+p_sys-di.plane_info[i].xdec : 0;
 }
 p_sys-di.frame_duration = 1;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] theora: cleanup

2014-09-27 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Sep 27 
12:45:56 2014 -0400| [ba3094452b50ed262e74145234e0c05e34796a58] | committer: 
Tristan Matthews

theora: cleanup

Remove dead code and superfluous width/height variables.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba3094452b50ed262e74145234e0c05e34796a58
---

 modules/codec/theora.c |   50 +---
 1 file changed, 22 insertions(+), 28 deletions(-)

diff --git a/modules/codec/theora.c b/modules/codec/theora.c
index 3c033f4..ded8538 100644
--- a/modules/codec/theora.c
+++ b/modules/codec/theora.c
@@ -566,7 +566,6 @@ static void CloseDecoder( vlc_object_t *p_this )
 th_info_clear(p_sys-ti);
 th_comment_clear(p_sys-tc);
 th_decode_free(p_sys-tcx);
-p_sys-tcx = NULL;
 free( p_sys );
 }
 
@@ -635,7 +634,6 @@ struct encoder_sys_t
 th_info  ti; /* theora bitstream settings */
 th_comment   tc; /* theora comment header */
 th_enc_ctx   *tcx;   /* theora context */
-int i_width, i_height;
 };
 
 /*
@@ -695,9 +693,6 @@ static int OpenEncoder( vlc_object_t *p_this )
 p_sys-ti.pic_x = 0 /*frame_x_offset*/;
 p_sys-ti.pic_y = 0 /*frame_y_offset*/;
 
-p_sys-i_width = p_sys-ti.frame_width;
-p_sys-i_height = p_sys-ti.frame_height;
-
 if( !p_enc-fmt_in.video.i_frame_rate ||
 !p_enc-fmt_in.video.i_frame_rate_base )
 {
@@ -783,77 +778,77 @@ static block_t *Encode( encoder_t *p_enc, picture_t 
*p_pict )
 ogg_packet oggpacket;
 block_t *p_block;
 th_ycbcr_buffer ycbcr;
-int i;
+unsigned i;
 
 if( !p_pict ) return NULL;
 /* Sanity check */
-if( p_pict-p[0].i_pitch  (int)p_sys-i_width ||
-p_pict-p[0].i_lines  (int)p_sys-i_height )
+if( p_pict-p[0].i_pitch  (int)p_sys-ti.frame_width ||
+p_pict-p[0].i_lines  (int)p_sys-ti.frame_height )
 {
 msg_Warn( p_enc, frame is smaller than encoding size
   (%ix%i-%ix%i) - dropping frame,
   p_pict-p[0].i_pitch, p_pict-p[0].i_lines,
-  p_sys-i_width, p_sys-i_height );
+  p_sys-ti.frame_width, p_sys-ti.frame_height );
 return NULL;
 }
 
 /* Fill padding */
-if( p_pict-p[0].i_visible_pitch  (int)p_sys-i_width )
+if( p_pict-p[0].i_visible_pitch  (int)p_sys-ti.frame_width )
 {
-for( i = 0; i  p_sys-i_height; i++ )
+for( i = 0; i  p_sys-ti.frame_height; i++ )
 {
 memset( p_pict-p[0].p_pixels + i * p_pict-p[0].i_pitch +
 p_pict-p[0].i_visible_pitch,
 *( p_pict-p[0].p_pixels + i * p_pict-p[0].i_pitch +
p_pict-p[0].i_visible_pitch - 1 ),
-p_sys-i_width - p_pict-p[0].i_visible_pitch );
+p_sys-ti.frame_width - p_pict-p[0].i_visible_pitch );
 }
-for( i = 0; i  p_sys-i_height / 2; i++ )
+for( i = 0; i  p_sys-ti.frame_height / 2; i++ )
 {
 memset( p_pict-p[1].p_pixels + i * p_pict-p[1].i_pitch +
 p_pict-p[1].i_visible_pitch,
 *( p_pict-p[1].p_pixels + i * p_pict-p[1].i_pitch +
p_pict-p[1].i_visible_pitch - 1 ),
-p_sys-i_width / 2 - p_pict-p[1].i_visible_pitch );
+p_sys-ti.frame_width / 2 - p_pict-p[1].i_visible_pitch );
 memset( p_pict-p[2].p_pixels + i * p_pict-p[2].i_pitch +
 p_pict-p[2].i_visible_pitch,
 *( p_pict-p[2].p_pixels + i * p_pict-p[2].i_pitch +
p_pict-p[2].i_visible_pitch - 1 ),
-p_sys-i_width / 2 - p_pict-p[2].i_visible_pitch );
+p_sys-ti.frame_width / 2 - p_pict-p[2].i_visible_pitch );
 }
 }
 
-if( p_pict-p[0].i_visible_lines  (int)p_sys-i_height )
+if( p_pict-p[0].i_visible_lines  (int)p_sys-ti.frame_height )
 {
-for( i = p_pict-p[0].i_visible_lines; i  p_sys-i_height; i++ )
+for( i = p_pict-p[0].i_visible_lines; i  p_sys-ti.frame_height; i++ 
)
 {
 memset( p_pict-p[0].p_pixels + i * p_pict-p[0].i_pitch, 0,
-p_sys-i_width );
+p_sys-ti.frame_width );
 }
-for( i = p_pict-p[1].i_visible_lines; i  p_sys-i_height / 2; i++ )
+for( i = p_pict-p[1].i_visible_lines; i  p_sys-ti.frame_height / 2; 
i++ )
 {
 memset( p_pict-p[1].p_pixels + i * p_pict-p[1].i_pitch, 0x80,
-p_sys-i_width / 2 );
+p_sys-ti.frame_width / 2 );
 memset( p_pict-p[2].p_pixels + i * p_pict-p[2].i_pitch, 0x80,
-p_sys-i_width / 2 );
+p_sys-ti.frame_width / 2 );
 }
 }
 
 /* Theora is a one-frame-in, one-frame

[vlc-commits] twolame: add error checking

2014-09-29 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Sep 27 
13:47:06 2014 -0400| [9b196c6333e8973ba3704af22b1d8b9d600bbd6f] | committer: 
Tristan Matthews

twolame: add error checking

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b196c6333e8973ba3704af22b1d8b9d600bbd6f
---

 modules/codec/twolame.c |   15 +++
 1 file changed, 15 insertions(+)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index 20ef952..3257b76 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -274,6 +274,8 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 return NULL;
 
 p_block = block_Alloc( i_used );
+if( !p_block )
+return NULL;
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );
 p_block-i_length = CLOCK_FREQ *
 (mtime_t)MPEG_FRAME_SIZE / 
(mtime_t)p_enc-fmt_out.audio.i_rate;
@@ -302,8 +304,21 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 i_used = twolame_encode_buffer_interleaved( p_sys-p_twolame,
p_sys-p_buffer, MPEG_FRAME_SIZE,
p_sys-p_out_buffer, MAX_CODED_FRAME_SIZE );
+/* On error, buffer samples and return what was already encoded */
+if( i_used  0 )
+{
+msg_Err( p_enc, encoder error: %d, i_used );
+break;
+}
+
 p_sys-i_nb_samples = 0;
 p_block = block_Alloc( i_used );
+if( !p_block )
+{
+if( p_chain )
+block_Release( p_chain );
+return NULL;
+}
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );
 p_block-i_length = CLOCK_FREQ *
 (mtime_t)MPEG_FRAME_SIZE / 
(mtime_t)p_enc-fmt_out.audio.i_rate;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] twolame: avoid buffer overflow

2014-09-29 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Sep 27 
15:07:51 2014 -0400| [9ab9aa37080ed6e8d34717bdf416509c7e38bbf9] | committer: 
Tristan Matthews

twolame: avoid buffer overflow

Refs #12298

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ab9aa37080ed6e8d34717bdf416509c7e38bbf9
---

 modules/codec/twolame.c |   22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index 3257b76..b44647e 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -251,12 +251,24 @@ static int OpenEncoder( vlc_object_t *p_this )
  /
 static void Bufferize( encoder_t *p_enc, int16_t *p_in, int i_nb_samples )
 {
-int16_t *p_buffer = p_enc-p_sys-p_buffer
- + (p_enc-p_sys-i_nb_samples
- * p_enc-fmt_in.audio.i_channels);
+encoder_sys_t *p_sys = p_enc-p_sys;
+const unsigned i_offset = p_sys-i_nb_samples * 
p_enc-fmt_in.audio.i_channels;
+const unsigned i_len = ARRAY_SIZE(p_sys-p_buffer);
+
+if( i_offset = i_len )
+{
+msg_Err( p_enc, buffer full );
+return;
+}
+
+unsigned i_copy = i_nb_samples * p_enc-fmt_in.audio.i_channels;
+if( i_copy + i_offset  i_len)
+{
+msg_Err( p_enc, dropping samples );
+i_copy = i_len - i_offset;
+}
 
-memcpy( p_buffer, p_in, i_nb_samples * p_enc-fmt_in.audio.i_channels
- * sizeof(int16_t) );
+memcpy( p_sys-p_buffer + i_offset, p_in, i_copy * sizeof(int16_t) );
 }
 
 static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] flac: reset decoder on end of stream (fixes #9298)

2014-09-29 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Mon Sep 29 
21:05:23 2014 -0400| [033cdd9009df398c3fedffd8b5c31655f60256e4] | committer: 
Tristan Matthews

flac: reset decoder on end of stream (fixes #9298)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=033cdd9009df398c3fedffd8b5c31655f60256e4
---

 modules/codec/flac.c |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index f2e3cda..32ae7fb 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -526,10 +526,16 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 
 /* If the decoder is in the aborted state,
  * FLAC__stream_decoder_process_single() won't return an error. */
-if( FLAC__stream_decoder_get_state(p_dec-p_sys-p_flac)
-== FLAC__STREAM_DECODER_ABORTED )
+switch ( FLAC__stream_decoder_get_state(p_dec-p_sys-p_flac) )
 {
-FLAC__stream_decoder_flush( p_dec-p_sys-p_flac );
+case FLAC__STREAM_DECODER_ABORTED:
+FLAC__stream_decoder_flush( p_dec-p_sys-p_flac );
+break;
+case FLAC__STREAM_DECODER_END_OF_STREAM:
+FLAC__stream_decoder_reset( p_dec-p_sys-p_flac );
+break;
+default:
+break;
 }
 
 block_Release( p_sys-p_block );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] twolame: fix chain deallocation

2014-09-30 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Tue Sep 30 
07:45:40 2014 -0400| [1023ecb97f830349989c79aa5b0260d606588c6e] | committer: 
Tristan Matthews

twolame: fix chain deallocation

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1023ecb97f830349989c79aa5b0260d606588c6e
---

 modules/codec/twolame.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index b44647e..79c64b7 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -328,7 +328,7 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 if( !p_block )
 {
 if( p_chain )
-block_Release( p_chain );
+block_ChainRelease( p_chain );
 return NULL;
 }
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] twolame: avoid buffer overflow

2014-10-01 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Sat Sep 
27 15:07:51 2014 -0400| [f0e0286b6e1d3598eced5b8449e398953dbf6ca4] | committer: 
Felix Paul Kühne

twolame: avoid buffer overflow

Refs #12298

(cherry picked from commit 9ab9aa37080ed6e8d34717bdf416509c7e38bbf9)
Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f0e0286b6e1d3598eced5b8449e398953dbf6ca4
---

 modules/codec/twolame.c |   22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index 4d2588a..b522b66 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -251,12 +251,24 @@ static int OpenEncoder( vlc_object_t *p_this )
  /
 static void Bufferize( encoder_t *p_enc, int16_t *p_in, int i_nb_samples )
 {
-int16_t *p_buffer = p_enc-p_sys-p_buffer
- + (p_enc-p_sys-i_nb_samples
- * p_enc-fmt_in.audio.i_channels);
+encoder_sys_t *p_sys = p_enc-p_sys;
+const unsigned i_offset = p_sys-i_nb_samples * 
p_enc-fmt_in.audio.i_channels;
+const unsigned i_len = ARRAY_SIZE(p_sys-p_buffer);
+
+if( i_offset = i_len )
+{
+msg_Err( p_enc, buffer full );
+return;
+}
+
+unsigned i_copy = i_nb_samples * p_enc-fmt_in.audio.i_channels;
+if( i_copy + i_offset  i_len)
+{
+msg_Err( p_enc, dropping samples );
+i_copy = i_len - i_offset;
+}
 
-memcpy( p_buffer, p_in, i_nb_samples * p_enc-fmt_in.audio.i_channels
- * sizeof(int16_t) );
+memcpy( p_sys-p_buffer + i_offset, p_in, i_copy * sizeof(int16_t) );
 }
 
 static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] flac: reset decoder on end of stream (fixes #9298)

2014-10-01 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Mon Sep 
29 21:05:23 2014 -0400| [f0476f08b105e259bc22449cb3067a7e4fbbe418] | committer: 
Felix Paul Kühne

flac: reset decoder on end of stream (fixes #9298)

(cherry picked from commit 033cdd9009df398c3fedffd8b5c31655f60256e4)
Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f0476f08b105e259bc22449cb3067a7e4fbbe418
---

 modules/codec/flac.c |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index f2e3cda..32ae7fb 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -526,10 +526,16 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 
 /* If the decoder is in the aborted state,
  * FLAC__stream_decoder_process_single() won't return an error. */
-if( FLAC__stream_decoder_get_state(p_dec-p_sys-p_flac)
-== FLAC__STREAM_DECODER_ABORTED )
+switch ( FLAC__stream_decoder_get_state(p_dec-p_sys-p_flac) )
 {
-FLAC__stream_decoder_flush( p_dec-p_sys-p_flac );
+case FLAC__STREAM_DECODER_ABORTED:
+FLAC__stream_decoder_flush( p_dec-p_sys-p_flac );
+break;
+case FLAC__STREAM_DECODER_END_OF_STREAM:
+FLAC__stream_decoder_reset( p_dec-p_sys-p_flac );
+break;
+default:
+break;
 }
 
 block_Release( p_sys-p_block );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] twolame: fix chain deallocation

2014-10-01 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Tue Sep 
30 07:45:40 2014 -0400| [54b6ab86dd8f6949182eb44a2457afcc3990f49c] | committer: 
Jean-Baptiste Kempf

twolame: fix chain deallocation

(cherry picked from commit 1023ecb97f830349989c79aa5b0260d606588c6e)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=54b6ab86dd8f6949182eb44a2457afcc3990f49c
---

 modules/codec/twolame.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index beeb276..b41276e 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -328,7 +328,7 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 if( !p_block )
 {
 if( p_chain )
-block_Release( p_chain );
+block_ChainRelease( p_chain );
 return NULL;
 }
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] twolame: add error checking

2014-10-01 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Sat Sep 
27 13:47:06 2014 -0400| [ef299372df5132db4bc562cae455d41f2c5e1b1c] | committer: 
Jean-Baptiste Kempf

twolame: add error checking

(cherry picked from commit 9b196c6333e8973ba3704af22b1d8b9d600bbd6f)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ef299372df5132db4bc562cae455d41f2c5e1b1c
---

 modules/codec/twolame.c |   15 +++
 1 file changed, 15 insertions(+)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index b522b66..beeb276 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -286,6 +286,8 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 return NULL;
 
 p_block = block_Alloc( i_used );
+if( !p_block )
+return NULL;
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );
 p_block-i_length = (mtime_t)100 *
 (mtime_t)MPEG_FRAME_SIZE / 
(mtime_t)p_enc-fmt_out.audio.i_rate;
@@ -314,8 +316,21 @@ static block_t *Encode( encoder_t *p_enc, block_t 
*p_aout_buf )
 i_used = twolame_encode_buffer_interleaved( p_sys-p_twolame,
p_sys-p_buffer, MPEG_FRAME_SIZE,
p_sys-p_out_buffer, MAX_CODED_FRAME_SIZE );
+/* On error, buffer samples and return what was already encoded */
+if( i_used  0 )
+{
+msg_Err( p_enc, encoder error: %d, i_used );
+break;
+}
+
 p_sys-i_nb_samples = 0;
 p_block = block_Alloc( i_used );
+if( !p_block )
+{
+if( p_chain )
+block_Release( p_chain );
+return NULL;
+}
 memcpy( p_block-p_buffer, p_sys-p_out_buffer, i_used );
 p_block-i_length = (mtime_t)100 *
 (mtime_t)MPEG_FRAME_SIZE / 
(mtime_t)p_enc-fmt_out.audio.i_rate;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] ts: don't drop entire audio frame on discontinuity

2014-10-01 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Mon Sep 29 
23:34:09 2014 -0400| [ce6092e13fad46e834e3808e849ad259678e25b1] | committer: 
Tristan Matthews

ts: don't drop entire audio frame on discontinuity

Refs #11752

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce6092e13fad46e834e3808e849ad259678e25b1
---

 modules/demux/ts.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 10c08fa..641c785 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -2457,9 +2457,10 @@ static bool GatherData( demux_t *p_demux, ts_pid_t *pid, 
block_t *p_bk )
   i_cc, ( pid-i_cc + 1 )0x0f, pid-i_pid );
 
 pid-i_cc = i_cc;
-if( pid-es-p_data  pid-es-fmt.i_cat != VIDEO_ES )
+if( pid-es-p_data  pid-es-fmt.i_cat != VIDEO_ES 
+pid-es-fmt.i_cat != AUDIO_ES )
 {
-/* Small video artifacts are usually better than
+/* Small audio/video artifacts are usually better than
  * dropping full frames */
 pid-es-p_data-i_flags |= BLOCK_FLAG_CORRUPTED;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] ts: don't drop entire audio frame on discontinuity

2014-10-01 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Mon Sep 
29 23:34:09 2014 -0400| [dd82ae4020044f225d6394b27a72ab32e93d2175] | committer: 
Tristan Matthews

ts: don't drop entire audio frame on discontinuity

Refs #11752

(cherry picked from commit ce6092e13fad46e834e3808e849ad259678e25b1)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=dd82ae4020044f225d6394b27a72ab32e93d2175
---

 modules/demux/ts.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index dcd1d94..8c78b5f 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -2283,9 +2283,10 @@ static bool GatherData( demux_t *p_demux, ts_pid_t *pid, 
block_t *p_bk )
   i_cc, ( pid-i_cc + 1 )0x0f, pid-i_pid );
 
 pid-i_cc = i_cc;
-if( pid-es-p_data  pid-es-fmt.i_cat != VIDEO_ES )
+if( pid-es-p_data  pid-es-fmt.i_cat != VIDEO_ES 
+pid-es-fmt.i_cat != AUDIO_ES )
 {
-/* Small video artifacts are usually better than
+/* Small audio/video artifacts are usually better than
  * dropping full frames */
 pid-es-p_data-i_flags |= BLOCK_FLAG_CORRUPTED;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: speex: avoid automatically depending on ogg

2014-10-06 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Mon Oct  6 
23:08:02 2014 -0400| [4c63aa1192dc4148b8c540b0b7210aa91713505b] | committer: 
Tristan Matthews

contrib: speex: avoid automatically depending on ogg

ogg was still being pulled in as a dependency when cross-compiling, which
would break certain build configurations.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c63aa1192dc4148b8c540b0b7210aa91713505b
---

 contrib/src/speex/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
index 7d7cce9..f9ff8d9 100644
--- a/contrib/src/speex/rules.mak
+++ b/contrib/src/speex/rules.mak
@@ -27,7 +27,7 @@ speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(MOVE)
 
-SPEEX_CONF := --without-ogg
+SPEEX_CONF := --disable-binaries
 ifndef HAVE_FPU
 SPEEX_CONF += --enable-fixed-point
 ifeq ($(ARCH),arm)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: speex: avoid automatically depending on ogg

2014-10-06 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Mon Oct 
 6 23:08:02 2014 -0400| [ea1927e79317b60a931c7bfff246914aac9d6a7a] | committer: 
Tristan Matthews

contrib: speex: avoid automatically depending on ogg

ogg was still being pulled in as a dependency when cross-compiling, which
would break certain build configurations.

(cherry picked from commit 4c63aa1192dc4148b8c540b0b7210aa91713505b)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ea1927e79317b60a931c7bfff246914aac9d6a7a
---

 contrib/src/speex/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
index 7d7cce9..f9ff8d9 100644
--- a/contrib/src/speex/rules.mak
+++ b/contrib/src/speex/rules.mak
@@ -27,7 +27,7 @@ speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(MOVE)
 
-SPEEX_CONF := --without-ogg
+SPEEX_CONF := --disable-binaries
 ifndef HAVE_FPU
 SPEEX_CONF += --enable-fixed-point
 ifeq ($(ARCH),arm)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: really fix row offset calculation

2014-10-10 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Fri Oct 10 
22:32:13 2014 -0400| [47431e192bbaefe723c7b6915a54f3ab4ca440e8] | committer: 
Tristan Matthews

png: encoder: really fix row offset calculation

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47431e192bbaefe723c7b6915a54f3ab4ca440e8
---

 modules/codec/png.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 46d31af..781bacf 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -405,9 +405,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 
 /* Encode picture */
 
-for( int i = 0; i  p_pic-p-i_lines; i++ )
+for( int i = 0; i  p_pic-p-i_visible_lines; i++ )
 {
-png_write_row( p_png, p_pic-p-p_pixels + (i * p_pic-p-i_pitch) );
+png_write_row( p_png, p_pic-p-p_pixels + (i * 
p_pic-p-i_visible_pitch) );
 if( p_sys-b_error ) goto error;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: really fix row offset calculation

2014-10-10 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Fri Oct 
10 22:32:13 2014 -0400| [b28f5a1eb1417364b4fe08d105b8faf3efa68e56] | committer: 
Tristan Matthews

png: encoder: really fix row offset calculation

(cherry picked from commit 47431e192bbaefe723c7b6915a54f3ab4ca440e8)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=b28f5a1eb1417364b4fe08d105b8faf3efa68e56
---

 modules/codec/png.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 46d31af..781bacf 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -405,9 +405,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 
 /* Encode picture */
 
-for( int i = 0; i  p_pic-p-i_lines; i++ )
+for( int i = 0; i  p_pic-p-i_visible_lines; i++ )
 {
-png_write_row( p_png, p_pic-p-p_pixels + (i * p_pic-p-i_pitch) );
+png_write_row( p_png, p_pic-p-p_pixels + (i * 
p_pic-p-i_visible_pitch) );
 if( p_sys-b_error ) goto error;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: encode visible lines, but use pitch for offset

2014-10-10 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Oct 11 
00:09:21 2014 -0400| [fd1e287a11d678a8e131d59979e84fb4486c0c57] | committer: 
Tristan Matthews

png: encoder: encode visible lines, but use pitch for offset

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd1e287a11d678a8e131d59979e84fb4486c0c57
---

 modules/codec/png.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 781bacf..33f7515 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -407,7 +407,7 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 
 for( int i = 0; i  p_pic-p-i_visible_lines; i++ )
 {
-png_write_row( p_png, p_pic-p-p_pixels + (i * 
p_pic-p-i_visible_pitch) );
+png_write_row( p_png, p_pic-p-p_pixels + (i * p_pic-p-i_pitch) );
 if( p_sys-b_error ) goto error;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] png: encoder: encode visible lines, but use pitch for offset

2014-10-10 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Sat Oct 
11 00:09:21 2014 -0400| [3e8036a5f6b9fc4a3dd3baaea8a81102dcd4bdd5] | committer: 
Tristan Matthews

png: encoder: encode visible lines, but use pitch for offset

(cherry picked from commit fd1e287a11d678a8e131d59979e84fb4486c0c57)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=3e8036a5f6b9fc4a3dd3baaea8a81102dcd4bdd5
---

 modules/codec/png.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 781bacf..33f7515 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -407,7 +407,7 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t 
*p_pic)
 
 for( int i = 0; i  p_pic-p-i_visible_lines; i++ )
 {
-png_write_row( p_png, p_pic-p-p_pixels + (i * 
p_pic-p-i_visible_pitch) );
+png_write_row( p_png, p_pic-p-p_pixels + (i * p_pic-p-i_pitch) );
 if( p_sys-b_error ) goto error;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: speexdsp: disable examples

2014-10-11 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Oct 11 
21:42:10 2014 -0400| [7bd11e51ac8dee7c27faff7c1c406164f2943a94] | committer: 
Tristan Matthews

contrib: speexdsp: disable examples

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7bd11e51ac8dee7c27faff7c1c406164f2943a94
---

 contrib/src/speexdsp/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/speexdsp/rules.mak b/contrib/src/speexdsp/rules.mak
index e87bd02..b8a0fd6 100644
--- a/contrib/src/speexdsp/rules.mak
+++ b/contrib/src/speexdsp/rules.mak
@@ -22,7 +22,7 @@ speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(MOVE)
 
-SPEEXDSP_CONF := --enable-resample-full-sinc-table
+SPEEXDSP_CONF := --enable-resample-full-sinc-table --disable-examples
 ifeq ($(ARCH),aarch64)
 # old neon, not compatible with aarch64
 SPEEXDSP_CONF += --disable-neon

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: speexdsp: disable examples

2014-10-12 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Sat Oct 
11 21:42:10 2014 -0400| [ac4f2bc6d06890f40034d8ad368c208de76a61a6] | committer: 
Jean-Baptiste Kempf

contrib: speexdsp: disable examples

(cherry picked from commit 7bd11e51ac8dee7c27faff7c1c406164f2943a94)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

Conflicts:
contrib/src/speexdsp/rules.mak

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ac4f2bc6d06890f40034d8ad368c208de76a61a6
---

 contrib/src/speexdsp/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/speexdsp/rules.mak b/contrib/src/speexdsp/rules.mak
index 7a2bc80..9b58675 100644
--- a/contrib/src/speexdsp/rules.mak
+++ b/contrib/src/speexdsp/rules.mak
@@ -22,7 +22,7 @@ speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
$(ZCAT) $ | (cd $@-git  tar xv --strip-components=1)
$(MOVE)
 
-SPEEXDSP_CONF := --enable-resample-full-sinc-table
+SPEEXDSP_CONF := --enable-resample-full-sinc-table --disable-examples
 ifndef HAVE_FPU
 SPEEXDSP_CONF += --enable-fixed-point
 ifeq ($(ARCH),arm)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: opus: don't build extra programs and doc

2014-10-24 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Fri Oct 24 
16:39:37 2014 -0400| [bdd6d80e23f3358c887215fb0497dff79b799e09] | committer: 
Tristan Matthews

contrib: opus: don't build extra programs and doc

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bdd6d80e23f3358c887215fb0497dff79b799e09
---

 contrib/src/opus/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/opus/rules.mak b/contrib/src/opus/rules.mak
index d783648..56f0933 100644
--- a/contrib/src/opus/rules.mak
+++ b/contrib/src/opus/rules.mak
@@ -19,7 +19,7 @@ opus: opus-$(OPUS_VERSION).tar.gz .sum-opus
$(UPDATE_AUTOCONFIG)
$(MOVE)
 
-OPUS_CONF=
+OPUS_CONF= --disable-extra-programs --disable-doc
 ifndef HAVE_FPU
 OPUS_CONF += --enable-fixed-point
 endif

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: opus: don't build extra programs and doc

2014-10-24 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Fri Oct 
24 16:39:37 2014 -0400| [60ff09fe09ba01f978c6e5f1c2f6dfa17fceabf8] | committer: 
Tristan Matthews

contrib: opus: don't build extra programs and doc

(cherry picked from commit bdd6d80e23f3358c887215fb0497dff79b799e09)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=60ff09fe09ba01f978c6e5f1c2f6dfa17fceabf8
---

 contrib/src/opus/rules.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/opus/rules.mak b/contrib/src/opus/rules.mak
index d783648..56f0933 100644
--- a/contrib/src/opus/rules.mak
+++ b/contrib/src/opus/rules.mak
@@ -19,7 +19,7 @@ opus: opus-$(OPUS_VERSION).tar.gz .sum-opus
$(UPDATE_AUTOCONFIG)
$(MOVE)
 
-OPUS_CONF=
+OPUS_CONF= --disable-extra-programs --disable-doc
 ifndef HAVE_FPU
 OPUS_CONF += --enable-fixed-point
 endif

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] contrib: add JACK

2014-10-31 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Fri Oct 31 
16:58:25 2014 -0400| [61828fc1b7001dd7192f35686d79144e2e2d4042] | committer: 
Tristan Matthews

contrib: add JACK

Default disabled for now.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61828fc1b7001dd7192f35686d79144e2e2d4042
---

 contrib/src/jack/SHA512SUMS   |1 +
 contrib/src/jack/config-osx.patch |   25 +
 contrib/src/jack/rules.mak|   29 +
 3 files changed, 55 insertions(+)

diff --git a/contrib/src/jack/SHA512SUMS b/contrib/src/jack/SHA512SUMS
new file mode 100644
index 000..84f4f8a
--- /dev/null
+++ b/contrib/src/jack/SHA512SUMS
@@ -0,0 +1 @@
+a52655ca895e37a49a14cb72811f25c65c54bc26ae6d4ce35331b8b85f87905f1be25a88b2efb96c47b344abd0a6bf9371e4043e05ccf91cb08287835e5cc8ac
  jack1-0.121.3.tar.gz
diff --git a/contrib/src/jack/config-osx.patch 
b/contrib/src/jack/config-osx.patch
new file mode 100644
index 000..fd1004f
--- /dev/null
+++ b/contrib/src/jack/config-osx.patch
@@ -0,0 +1,25 @@
+From 7bbaa8a2541987ae8db90819f4a94b9f3b133b24 Mon Sep 17 00:00:00 2001
+From: Tristan Matthews tristan.matth...@savoirfairelinux.com
+Date: Fri, 31 Oct 2014 16:29:26 -0400
+Subject: [PATCH 1/1] config: patch to build on OS X
+
+---
+ config/os/macosx/pThreadUtilities.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/os/macosx/pThreadUtilities.h 
b/config/os/macosx/pThreadUtilities.h
+index bd1d1e8..cdb59b4 100644
+--- a/config/os/macosx/pThreadUtilities.h
 b/config/os/macosx/pThreadUtilities.h
+@@ -66,7 +66,7 @@
+ #define __PTHREADUTILITIES_H__
+ 
+ #import pthread.h
+-#import CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h
++#import MacTypes.h
+ 
+ #define THREAD_SET_PRIORITY   0
+ #define THREAD_SCHEDULED_PRIORITY 1
+-- 
+1.9.3
+
diff --git a/contrib/src/jack/rules.mak b/contrib/src/jack/rules.mak
new file mode 100644
index 000..6798c3c
--- /dev/null
+++ b/contrib/src/jack/rules.mak
@@ -0,0 +1,29 @@
+# JACK
+
+JACK_VERSION := 0.121.3
+JACK_URL := https://github.com/jackaudio/jack1/archive/$(JACK_VERSION).tar.gz
+
+# disabled by default for now
+#PKGS += jack
+ifeq ($(call need_pkg,jack),)
+PKGS_FOUND += jack
+endif
+
+$(TARBALLS)/jack1-$(JACK_VERSION).tar.gz:
+   $(call download,$(JACK_URL))
+
+.sum-jack: jack1-$(JACK_VERSION).tar.gz
+
+jack: jack1-$(JACK_VERSION).tar.gz .sum-jack
+   $(UNPACK)
+ifdef HAVE_MACOSX
+   $(APPLY) $(SRC)/jack/config-osx.patch
+endif
+   $(UPDATE_AUTOCONFIG)
+   $(MOVE)
+
+.jack: jack
+   $(RECONF)
+   cd $  $(HOSTVARS) ./configure $(HOSTCONF)
+   cd $  $(MAKE) install
+   touch $@

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: bd: add assertion

2014-11-02 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sun Nov  2 
18:08:15 2014 -0500| [ac7ec2d22c41ee2f614c22a818d0c658f6e1caaa] | committer: 
Tristan Matthews

access: bd: add assertion

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac7ec2d22c41ee2f614c22a818d0c658f6e1caaa
---

 modules/access/bd/bd.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/access/bd/bd.c b/modules/access/bd/bd.c
index bf9ccd5..3b17f55 100644
--- a/modules/access/bd/bd.c
+++ b/modules/access/bd/bd.c
@@ -610,6 +610,7 @@ static int SetPlayItem( demux_t *p_demux, int i_mpls, int 
i_play_item )
 if( p_sys-pp_clpi[i_clpi]-i_id == p_mpls_clpi-i_id )
 p_clpi = p_sys-pp_clpi[i_clpi];
 }
+assert(p_clpi);
 
 const bool b_same_clpi = b_same_mpls  p_sys-p_clpi-i_id == 
p_clpi-i_id;
 stream_t *p_m2ts = NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: ogg: avoid use-after-free

2014-11-02 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sun Nov  2 
17:51:30 2014 -0500| [ba65ae57333c6252b9288cfa8e10a52d4082e51c] | committer: 
Tristan Matthews

demux: ogg: avoid use-after-free

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba65ae57333c6252b9288cfa8e10a52d4082e51c
---

 modules/demux/ogg.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 260ea48..61102ec 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1612,6 +1612,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
 {
 msg_Dbg( p_demux, found invalid Daala header );
 Ogg_LogicalStreamDelete( p_demux, p_stream );
+p_stream = NULL;
 p_ogg-i_streams--;
 }
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] hds: avoid NULL dereference and use-after-free

2014-11-05 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Wed Nov  5 
08:27:13 2014 -0500| [0e1d397ea39d032042055d9396c14b80b0fd4bac] | committer: 
Tristan Matthews

hds: avoid NULL dereference and use-after-free

(cid #1251048 and #1251059)

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e1d397ea39d032042055d9396c14b80b0fd4bac
---

 modules/stream_filter/hds/hds.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index c7c45a4..7e3c017 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1247,7 +1247,7 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
 
 break;
 case XML_READER_ENDELEM:
-if( ! strcmp( current_element, bootstrapInfo) ) {
+if( current_element  ! strcmp( current_element, bootstrapInfo) 
) {
 if( bootstrap_idx + 1 == MAX_BOOTSTRAP_INFO ) {
 msg_Warn( (vlc_object_t*) s, Too many bootstraps, 
ignoring );
 } else {
@@ -1256,6 +1256,7 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
 }
 
 free( current_element );
+current_element = NULL;
 element_stack[current_element_idx--] = 0;
 break;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] codec: mpeg_audio: fix pts update

2014-11-08 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews tma...@videolan.org | Sat Nov  8 
13:04:10 2014 -0500| [72b03859fd8b715d9baeb5b378170d81517b01e8] | committer: 
Tristan Matthews

codec: mpeg_audio: fix pts update

Fixes #12722

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72b03859fd8b715d9baeb5b378170d81517b01e8
---

 modules/codec/mpeg_audio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index c9f7bac..f893dd2 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -248,7 +248,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 /* New frame, set the Presentation Time Stamp */
 p_sys-i_pts = p_sys-bytestream.p_block-i_pts;
 if( p_sys-i_pts  VLC_TS_INVALID 
-p_sys-i_pts != date_Get( p_sys-end_date ) )
+p_sys-i_pts  date_Get( p_sys-end_date ) )
 {
 date_Set( p_sys-end_date, p_sys-i_pts );
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] codec: mpeg_audio: fix pts update

2014-11-08 Thread Tristan Matthews
vlc/vlc-2.2 | branch: master | Tristan Matthews tma...@videolan.org | Sat Nov 
 8 13:04:10 2014 -0500| [330c495ac660e1851324a959a3146032f66e8c70] | committer: 
Tristan Matthews

codec: mpeg_audio: fix pts update

Fixes #12722

(cherry picked from commit 72b03859fd8b715d9baeb5b378170d81517b01e8)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=330c495ac660e1851324a959a3146032f66e8c70
---

 modules/codec/mpeg_audio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index c9f7bac..f893dd2 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -248,7 +248,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block )
 /* New frame, set the Presentation Time Stamp */
 p_sys-i_pts = p_sys-bytestream.p_block-i_pts;
 if( p_sys-i_pts  VLC_TS_INVALID 
-p_sys-i_pts != date_Get( p_sys-end_date ) )
+p_sys-i_pts  date_Get( p_sys-end_date ) )
 {
 date_Set( p_sys-end_date, p_sys-i_pts );
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] extras/tools: list packages that will be built

2014-11-11 Thread Tristan Matthews
vlc | branch: master | Tristan Matthews le.business...@gmail.com | Mon Nov 10 
20:00:26 2014 +| [bc161d90515159ed23abf863f297984f86177120] | committer: 
Tristan Matthews

extras/tools: list packages that will be built

This makes it a little more obvious, instead of just saying that tools
are missing or too old.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc161d90515159ed23abf863f297984f86177120
---

 extras/tools/bootstrap |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
index 345ec14..49fa424 100755
--- a/extras/tools/bootstrap
+++ b/extras/tools/bootstrap
@@ -83,7 +83,7 @@ check_sed
 check protoc
 check ant
 
-[ -n $NEEDED ]  mkdir -p build/
+[ -n $NEEDED ]  mkdir -p build/  echo To-be-built packages: `echo 
$NEEDED | sed 's/\.//g'`
 
 CPUS=
 CC=

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


  1   2   3   4   5   >