[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 7406e76 web/download: add FFmpeg 2.4.5

2014-12-19 Thread gitolite
The branch, master has been updated
   via  7406e76bd7589563920e96c1505d6e4a845ea8f0 (commit)
  from  bd874e8df25bf24dbb12ba9f087954feb9fb5eb7 (commit)


- Log -
commit 7406e76bd7589563920e96c1505d6e4a845ea8f0
Author: Michael Niedermayer 
AuthorDate: Sat Dec 20 05:18:19 2014 +0100
Commit: Michael Niedermayer 
CommitDate: Sat Dec 20 05:18:19 2014 +0100

web/download: add FFmpeg 2.4.5

diff --git a/src/download b/src/download
index 2c22a14..c406d90 100644
--- a/src/download
+++ b/src/download
@@ -314,13 +314,13 @@ libpostproc53.  3.100
 
 
   
-FFmpeg 2.4.4 "Fresnel"
+FFmpeg 2.4.5 "Fresnel"
 
   
-2.4.4 was released on 2014-12-01. It is the latest stable FFmpeg release
+2.4.5 was released on 2014-12-20. It is the latest stable FFmpeg release
 from the 2.4 release branch, which was cut from master on 2014-09-14.
 Amongst lots of other changes, it includes all changes from
-ffmpeg-mt, libav master of 2014-09-14, libav 11 as of 2014-11-30.
+ffmpeg-mt, libav master of 2014-09-14, libav 11.1 as of 2014-12-19.
   
   It includes the following library versions:
   
@@ -337,15 +337,15 @@ libpostproc53.  0.100
 
   
 
-  Download 
bzip2 tarball
-  PGP 
signature
+  Download 
bzip2 tarball
+  PGP 
signature
  
 
-  Download 
gzip tarball
-  PGP 
signature
+  Download 
gzip tarball
+  PGP 
signature
  
 
-  http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.4.4";>Changelog
+  http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.4.5";>Changelog
   http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=release/2.4";>Release
 Notes
  


---

Summary of changes:
 src/download |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)


hooks/post-receive
-- 

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


[FFmpeg-cvslog] Tag n2.4.5 : FFmpeg 2.4.5 release

2014-12-19 Thread git
[ffmpeg] [branch: refs/tags/n2.4.5]
Tag:bb0fe0e372c680b5f1410eff48abed7fb03979b5
> http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=bb0fe0e372c680b5f1410eff48abed7fb03979b5

Tagger: Michael Niedermayer 
Date:   Sat Dec 20 05:11:50 2014 +0100

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


[FFmpeg-cvslog] Makefile: add dependencies which require ffversion.h

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Sat Dec 
20 04:09:01 2014 +0100| [4afe2684d8f50b28ce6743c7ee999f3157c9857f] | committer: 
Michael Niedermayer

Makefile: add dependencies which require ffversion.h

Without this ffversion.h could sometimes be built too late

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/Makefile b/Makefile
index 57f6a91..3058ba0 100644
--- a/Makefile
+++ b/Makefile
@@ -111,7 +111,7 @@ endef
 
 $(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=
 
-ffprobe.o cmdutils.o : libavutil/ffversion.h
+ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o 
libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o 
libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : 
libavutil/ffversion.h
 
 $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
$(CP) $< $@

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


[FFmpeg-cvslog] Makefile: add dependencies which require ffversion.h

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
04:09:01 2014 +0100| [4ae87554f3c8bc54db572873f5049427a7e6cb31] | committer: 
Michael Niedermayer

Makefile: add dependencies which require ffversion.h

Without this ffversion.h could sometimes be built too late

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/Makefile b/Makefile
index 1e1dbb3..845a274 100644
--- a/Makefile
+++ b/Makefile
@@ -112,7 +112,7 @@ endef
 
 $(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=
 
-ffprobe.o cmdutils.o : libavutil/ffversion.h
+ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o 
libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o 
libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : 
libavutil/ffversion.h
 
 $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
$(CP) $< $@

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


[FFmpeg-cvslog] Update for FFmpeg 2.4.5

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Sat Dec 
20 02:51:59 2014 +0100| [5d1d143a4eb482033d8e3d3e65469b7e16dedad9] | committer: 
Michael Niedermayer

Update for FFmpeg 2.4.5

Signed-off-by: Michael Niedermayer 

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

 Changelog|   33 +
 RELEASE  |2 +-
 doc/Doxyfile |2 +-
 3 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index 28fe41f..3aa4ef5 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,39 @@ releases are sorted from youngest to oldest.
 
 version :
 
+version 2.4.5:
+- lavu/frame: fix malloc error path in av_frame_copy_props()
+- avformat/utils: Do not update programs streams from program-less streams in 
update_wrap_reference()
+- avformat/aviobuf: Check that avio_seek() target is non negative
+- swresample/soxr_resample: fix error handling
+- avformat/flvdec: fix potential use of uninitialized variables
+- avformat/matroskadec: fix handling of recursive SeekHead elements
+- doc/examples/transcoding: check encoder before using it
+- swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output
+- avformat/rmdec: Check codec_data_size
+- avformat/aviobuf: Fix infinite loop in ff_get_line()
+- vc1: Do not assume seek happens after decoding
+- mmvideo: check frame dimensions
+- jvdec: check frame dimensions
+- avcodec/indeo3: ensure offsets are non negative
+- avcodec/h264: Check *log2_weight_denom
+- avcodec/hevc_ps: Check diff_cu_qp_delta_depth
+- avcodec/h264: Clear delayed_pic on deallocation
+- avcodec/hevc: clear filter_slice_edges() on allocation
+- avcodec/dcadec: Check that the added xch channel isnt already there
+- avcodec/indeo3: use signed variables to avoid underflow
+- swscale: increase yuv2rgb table headroom
+- avformat/mov: fix integer overflow of size
+- avformat/mov: check atom nesting depth
+- avcodec/utvideodec: Fix handling of slice_height=0
+- avcodec/vmdvideo: Check len before using it in method 3
+- avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
+- avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory
+- configure: create the tests directory like the doc directory
+- v4l2: Make use of the VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD
+- avcodec/motion_est: use 2x8x8 for interlaced qpel
+- Treat all '*.pnm' files as non-text file
+
 version 2.4.4:
 - avformat: replace some odd 30-60 rates by higher less odd ones in  
get_std_framerate()
 - swscale: fix yuv2yuvX_8 assembly on x86
diff --git a/RELEASE b/RELEASE
index 79a6144..59aa62c 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-2.4.4
+2.4.5
diff --git a/doc/Doxyfile b/doc/Doxyfile
index e8638e3..0b229d5 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME   = FFmpeg
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER = 2.4.4
+PROJECT_NUMBER = 2.4.5
 
 # With the PROJECT_LOGO tag one can specify a logo or icon that is included
 # in the documentation. The maximum height of the logo should not exceed 55

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


[FFmpeg-cvslog] avformat/flvdec: fix potential use of uninitialized variables

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
10 13:30:51 2014 +0100| [787e4d12daf53bd389fc455d5981502b7c9a5256] | committer: 
Michael Niedermayer

avformat/flvdec: fix potential use of uninitialized variables

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 4b014ce..9e0ee2f 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -459,11 +459,11 @@ static int amf_parse_object(AVFormatContext *s, AVStream 
*astream,
 }
 
 if (key) {
+acodec = astream ? astream->codec : NULL;
+vcodec = vstream ? vstream->codec : NULL;
+
 // stream info doesn't live any deeper than the first object
 if (depth == 1) {
-acodec = astream ? astream->codec : NULL;
-vcodec = vstream ? vstream->codec : NULL;
-
 if (amf_type == AMF_DATA_TYPE_NUMBER ||
 amf_type == AMF_DATA_TYPE_BOOL) {
 if (!strcmp(key, "duration"))

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


[FFmpeg-cvslog] avformat/rmdec: Check codec_data_size

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
 3 20:01:18 2014 +0100| [117dcc209796eaec36da0fdeb82ae05c22de5c61] | committer: 
Michael Niedermayer

avformat/rmdec: Check codec_data_size

Fixes infinite loop
Fixes Ticket4154

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

Signed-off-by: Michael Niedermayer 

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

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

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

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


[FFmpeg-cvslog] avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference ()

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Sun Dec 
14 19:46:31 2014 +0100| [0fb2b616142e42a3384cafc4281dfa196c7b4be6] | committer: 
Michael Niedermayer

avformat/utils: Do not update programs streams from program-less streams in 
update_wrap_reference()

Fixes Ticket3686

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index d9ffaed..b657b9e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -568,6 +568,8 @@ static int update_wrap_reference(AVFormatContext *s, 
AVStream *st, int stream_in
 int default_stream_index = av_find_default_stream_index(s);
 if (s->streams[default_stream_index]->pts_wrap_reference == 
AV_NOPTS_VALUE) {
 for (i = 0; i < s->nb_streams; i++) {
+if (av_find_program_from_stream(s, NULL, i))
+continue;
 s->streams[i]->pts_wrap_reference = pts_wrap_reference;
 s->streams[i]->pts_wrap_behavior = pts_wrap_behavior;
 }

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


[FFmpeg-cvslog] Add FFMPEG_VERSION into the binary libs

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Fri Dec 
19 18:04:40 2014 +0100| [820f41e1a1b4fc2ad74bdb4a598c29d3427af1a6] | committer: 
Michael Niedermayer

Add FFMPEG_VERSION into the binary libs

This simplifies identifying from which revision a binary of a lib came from

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

Signed-off-by: Michael Niedermayer 

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

 libavcodec/utils.c |3 +++
 libavdevice/avdevice.c |3 +++
 libavfilter/avfilter.c |3 +++
 libavformat/utils.c|3 +++
 libavutil/utils.c  |3 +++
 libpostproc/postprocess.c  |3 +++
 libswresample/swresample.c |3 +++
 7 files changed, 21 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4e95ab0..0888beb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -66,6 +66,9 @@
 #include "compat/os2threads.h"
 #endif
 
+#include "libavutil/ffversion.h"
+const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS
 static int default_lockmgr_cb(void **arg, enum AVLockOp op)
 {
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 6a75bd7..c391931 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -23,6 +23,9 @@
 #include "avdevice.h"
 #include "config.h"
 
+#include "libavutil/ffversion.h"
+const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 #define E AV_OPT_FLAG_ENCODING_PARAM
 #define D AV_OPT_FLAG_DECODING_PARAM
 #define A AV_OPT_FLAG_AUDIO_PARAM
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7b11467..8628445 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -37,6 +37,9 @@
 #include "formats.h"
 #include "internal.h"
 
+#include "libavutil/ffversion.h"
+const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame);
 
 void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b657b9e..6ff4570 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -53,6 +53,9 @@
 #include "riff.h"
 #include "url.h"
 
+#include "libavutil/ffversion.h"
+const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 /**
  * @file
  * various utility functions for use within FFmpeg
diff --git a/libavutil/utils.c b/libavutil/utils.c
index aafd3b9..da8b5ae 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -27,6 +27,9 @@
  * various utility functions
  */
 
+#include "libavutil/ffversion.h"
+const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned avutil_version(void)
 {
 static int checks_done;
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 670908c..a42b079 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -89,6 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x 
... checks
 #include "postprocess_internal.h"
 #include "libavutil/avstring.h"
 
+#include "libavutil/ffversion.h"
+const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned postproc_version(void)
 {
 av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100);
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index c325513..991aa13 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -28,6 +28,9 @@
 
 #define ALIGN 32
 
+#include "libavutil/ffversion.h"
+const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned swresample_version(void)
 {
 av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100);

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


[FFmpeg-cvslog] avformat/aviobuf: Check that avio_seek() target is non negative

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Sun Dec 
14 17:26:11 2014 +0100| [0d277be45ae9bfbf4fb51408c3f3ef5b42296d66] | committer: 
Michael Niedermayer

avformat/aviobuf: Check that avio_seek() target is non negative

Fixes out of array access

Suggested-by: Andrew Scherkus 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit ed86dbd05d61363dc1c0d33f3267e2177c985fdd)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index b1752cd..d39b0c1 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -221,6 +221,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int 
whence)
 return offset1;
 offset += offset1;
 }
+if (offset < 0)
+return AVERROR(EINVAL);
+
 offset1 = offset - pos;
 if (!s->must_flush && (!s->direct || !s->seek) &&
 offset1 >= 0 && offset1 <= buffer_size) {

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


[FFmpeg-cvslog] ffmpeg: drop usage of coded_frame

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
 3 03:06:43 2014 +0100| [82db2f2ac8c3aaf731e50f584646798edf73f378] | committer: 
Michael Niedermayer

ffmpeg: drop usage of coded_frame

It causes all kinds of problems and there is no code in the muxers that reads
this field

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

Signed-off-by: Michael Niedermayer 

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

 ffmpeg.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index ee8039c..ffcb9dd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -978,10 +978,8 @@ static void do_video_out(AVFormatContext *s,
 /* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
-mux_enc->coded_frame->interlaced_frame = in_picture->interlaced_frame;
-mux_enc->coded_frame->top_field_first  = in_picture->top_field_first;
-if (mux_enc->coded_frame->interlaced_frame)
-mux_enc->field_order = mux_enc->coded_frame->top_field_first ? 
AV_FIELD_TB:AV_FIELD_BT;
+if (in_picture->interlaced_frame)
+mux_enc->field_order = in_picture->top_field_first ? 
AV_FIELD_TB:AV_FIELD_BT;
 else
 mux_enc->field_order = AV_FIELD_PROGRESSIVE;
 pkt.data   = (uint8_t *)in_picture;

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


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

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
 3 20:21:56 2014 +0100| [f36b3c5df97da465757563b7e14c90a9f9e7537e] | committer: 
Michael Niedermayer

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

Fixes Ticket4151

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

Signed-off-by: Michael Niedermayer 

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

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

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

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


[FFmpeg-cvslog] doc/examples/transcoding: check encoder before using it

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Thu Dec 
 4 18:58:38 2014 +0100| [fd72ff6f31f9626e1e871079cf4f2259b26f1a27] | committer: 
Michael Niedermayer

doc/examples/transcoding: check encoder before using it

Fixes null pointer exception

Found-by: stoupeace
Signed-off-by: Michael Niedermayer 
(cherry picked from commit bde27e1e617dfeb3c026f530f48a77f5ed8aa2ea)

Signed-off-by: Michael Niedermayer 

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

 doc/examples/transcoding.c |4 
 1 file changed, 4 insertions(+)

diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c
index a8f4210..d7c4a84 100644
--- a/doc/examples/transcoding.c
+++ b/doc/examples/transcoding.c
@@ -116,6 +116,10 @@ static int open_output_file(const char *filename)
 || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
 /* in this example, we choose transcoding to same codec */
 encoder = avcodec_find_encoder(dec_ctx->codec_id);
+if (!encoder) {
+av_log(NULL, AV_LOG_FATAL, "Neccessary encoder not found\n");
+return AVERROR_INVALIDDATA;
+}
 
 /* In this example, we transcode to same properties (picture size,
  * sample rate etc.). These properties can be changed for output

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


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

2014-12-19 Thread wm4
ffmpeg | branch: release/2.4 | wm4  | Sat Dec  6 
16:53:30 2014 +0100| [95c298b125022779bef5ec261c3118028fff4750] | committer: 
Michael Niedermayer

avformat/matroskadec: fix handling of recursive SeekHead elements

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

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

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

Fixes ticket #4162.

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

Signed-off-by: Michael Niedermayer 

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

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

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

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


[FFmpeg-cvslog] lavu/frame: fix malloc error path in av_frame_copy_props()

2014-12-19 Thread wm4
ffmpeg | branch: release/2.4 | wm4  | Mon Dec 15 
04:32:58 2014 +0100| [14d6ea0c459ca22b818977859d2476783fcc7d1a] | committer: 
Michael Niedermayer

lavu/frame: fix malloc error path in av_frame_copy_props()

The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().

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

Signed-off-by: Michael Niedermayer 

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

 libavutil/frame.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 4ee0630..5c9aa29 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -503,6 +503,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
 free_side_data(&dst->side_data[i]);
 }
 av_freep(&dst->side_data);
+dst->nb_side_data = 0;
 return AVERROR(ENOMEM);
 }
 memcpy(sd_dst->data, sd_src->data, sd_src->size);

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


[FFmpeg-cvslog] swresample/soxr_resample: fix error handling

2014-12-19 Thread Rob Sykes
ffmpeg | branch: release/2.4 | Rob Sykes  | Sat Dec 13 
21:12:56 2014 +0100| [3b332ef33cecc71b74c6d12b1da3733b788d] | committer: 
Michael Niedermayer

swresample/soxr_resample: fix error handling

Fixes CID1257659

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

Signed-off-by: Michael Niedermayer 

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

 libswresample/soxr_resample.c |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c
index 064451d..9e87f2f 100644
--- a/libswresample/soxr_resample.c
+++ b/libswresample/soxr_resample.c
@@ -76,8 +76,12 @@ static int process(
 AudioData *src, int src_size, int *consumed){
 size_t idone, odone;
 soxr_error_t error = soxr_set_error((soxr_t)c, 
soxr_set_num_channels((soxr_t)c, src->ch_count));
-error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
-&idone, dst->ch, (size_t)dst_size, &odone);
+if (!error)
+error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
+ &idone, dst->ch, (size_t)dst_size, &odone);
+else
+idone = 0;
+
 *consumed = (int)idone;
 return error? -1 : odone;
 }

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


[FFmpeg-cvslog] avformat/aviobuf: Fix infinite loop in ff_get_line()

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
 3 19:05:56 2014 +0100| [c4e18917d4f7cf9ff27895330e43289f2ac00e89] | committer: 
Michael Niedermayer

avformat/aviobuf: Fix infinite loop in ff_get_line()

Fixes ticket4152

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 9795ba4..b1752cd 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -674,7 +674,7 @@ int ff_get_line(AVIOContext *s, char *buf, int maxlen)
 if (c && i < maxlen-1)
 buf[i++] = c;
 } while (c != '\n' && c != '\r' && c);
-if (c == '\r' && avio_r8(s) != '\n')
+if (c == '\r' && avio_r8(s) != '\n' && !avio_feof(s))
 avio_skip(s, -1);
 
 buf[i] = 0;

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


[FFmpeg-cvslog] Merge commit '3ea49fc5081d63277ecbc12ed440af4b02ddfdf9' into release/2.4

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Sat Dec 
20 02:16:15 2014 +0100| [03fbc282ff5867db540d4b22d897821bcc416124] | committer: 
Michael Niedermayer

Merge commit '3ea49fc5081d63277ecbc12ed440af4b02ddfdf9' into release/2.4

* commit '3ea49fc5081d63277ecbc12ed440af4b02ddfdf9':
  vc1: Do not assume seek happens after decoding

See: 6801eb0a0981f113f5f09ed4799d9ae805af62a3
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] vc1: Do not assume seek happens after decoding

2014-12-19 Thread Luca Barbato
ffmpeg | branch: release/2.4 | Luca Barbato  | Sat Oct  4 
12:40:35 2014 +0200| [3ea49fc5081d63277ecbc12ed440af4b02ddfdf9] | committer: 
Luca Barbato

vc1: Do not assume seek happens after decoding

If a seek is requested before the decoding start there is no
current picture.

CC: libav-sta...@libav.org
(cherry picked from commit 3e348ecfc6ab1830e43288a9e12e8f0a000afbcb)
Signed-off-by: Luca Barbato 

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

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

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 8ad4f0f..4c9ff03 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5503,7 +5503,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx)
Since we can't enforce it, clear to black the missing sprite. This is
wrong but it looks better than doing nothing. */
 
-if (f->data[0])
+if (f && f->data[0])
 for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++)
 for (i = 0; i < v->sprite_height>>!!plane; i++)
 memset(f->data[plane] + i * f->linesize[plane],

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


[FFmpeg-cvslog] avformat/asfenc: replace != 0 error check by <0

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
01:48:26 2014 +0100| [4b45aa517c30091c20b75f1fd12f3607a679b841] | committer: 
Michael Niedermayer

avformat/asfenc: replace != 0 error check by <0

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index fbf6158..3dc58f3 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -485,7 +485,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t 
file_size,
 /* chapters using ASF markers */
 if (!asf->is_streamed && s->nb_chapters) {
 int ret;
-if (ret = asf_write_markers(s))
+if ((ret = asf_write_markers(s)) < 0)
 return ret;
 }
 /* stream headers */

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


[FFmpeg-cvslog] avformat/westwood_aud: replace != 0 error check by <0

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
01:51:16 2014 +0100| [172865931951d73f1ac60f4b56cdb4da77f37f1d] | committer: 
Michael Niedermayer

avformat/westwood_aud: replace != 0 error check by <0

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
index 5286875..6d8dbdb 100644
--- a/libavformat/westwood_aud.c
+++ b/libavformat/westwood_aud.c
@@ -151,7 +151,7 @@ static int wsaud_read_packet(AVFormatContext *s,
Specifically, this is needed to signal when a packet should be
decoding as raw 8-bit pcm or variable-size ADPCM. */
 int out_size = AV_RL16(&preamble[2]);
-if ((ret = av_new_packet(pkt, chunk_size + 4)))
+if ((ret = av_new_packet(pkt, chunk_size + 4)) < 0)
 return ret;
 if ((ret = avio_read(pb, &pkt->data[4], chunk_size)) != chunk_size)
 return ret < 0 ? ret : AVERROR(EIO);

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.5 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [7e130ca5b42c03df51fc8b4b5205d38760546a87] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index bb2f3bc..1eff5de 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/apngdec: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.5 | Clément Bœsch  | Sat Dec 20 
00:17:21 2014 +0100| [f295f9488a3013c9f13e8fece926d866ca1cac88] | committer: 
James Almer

avformat/apngdec: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit d60fb4f7946272d2ef39703762b54c5f3a1b5789)

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

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

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index d97b015..5e7a4a1 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -404,7 +404,7 @@ static int apng_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 return 0;
 default:
 {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
 avpriv_request_sample(s, "In-stream tag=%s (0x%08X) len=%"PRIu32, 
tag_buf, tag, len);

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.3 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [c2517fb363f56e71697507d56e58ebe117475cfa] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index b6f1686..c14ade0 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.4 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [f30a89e15f9ffa77fd2484d6ae73067f319133b3] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index bb2f3bc..1eff5de 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.2 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [b807e987f1c302b80ec468f3422d1b1dd25d7f7c] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index b6f1686..c14ade0 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.1 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [ea1d0bc02919108f46d30dff393cb79bad3e3dec] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 37e544a..19d197d 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -67,7 +67,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: release/2.0 | Clément Bœsch  | Sat Dec 20 
00:17:43 2014 +0100| [8a35f24ca94375a4855deefee9ea8c3b7a5908dc] | committer: 
James Almer

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 5b53cef..ef7c0cb 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -67,7 +67,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] Merge commit '8ebf02f8f530240edf7e45f35f7647ef9dd44a58'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
00:49:12 2014 +0100| [3d6545d51e6c031a77b0abf7470c681034dd8193] | committer: 
Michael Niedermayer

Merge commit '8ebf02f8f530240edf7e45f35f7647ef9dd44a58'

* commit '8ebf02f8f530240edf7e45f35f7647ef9dd44a58':
  libavformat: Only use MoveFileExA when targeting the desktop API subset

Conflicts:
configure

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] libavformat: Only use MoveFileExA when targeting the desktop API subset

2014-12-19 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Mon Dec 15 
23:55:30 2014 +0200| [8ebf02f8f530240edf7e45f35f7647ef9dd44a58] | committer: 
Martin Storsjö

libavformat: Only use MoveFileExA when targeting the desktop API subset

The MoveFileExA is available in the headers regardless which API
subset is targeted, but it is missing in the Windows Phone link
libraries. When targeting Windows Store apps, the function is
available both in the headers and in the link libraries, and thus
there is no indication for the build system that this function
should be avoided - such an indication is only given by the
Windows App Certification Kit, which forbids using the MoveFileExA
function.

Therefore check the WINAPI_FAMILY defines instead, to figure out
which API subset is targeted.

Signed-off-by: Martin Storsjö 

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

 configure|2 --
 libavformat/os_support.h |   19 ---
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index ed8316f..48669a0 100755
--- a/configure
+++ b/configure
@@ -1466,7 +1466,6 @@ SYSTEM_FUNCS="
 localtime_r
 mach_absolute_time
 MapViewOfFile
-MoveFileExA
 memalign
 mkstemp
 mmap
@@ -4100,7 +4099,6 @@ check_func_headers windows.h GetProcessAffinityMask
 check_func_headers windows.h GetProcessTimes
 check_func_headers windows.h GetSystemTimeAsFileTime
 check_func_headers windows.h MapViewOfFile
-check_func_headers windows.h MoveFileExA
 check_func_headers windows.h SetConsoleTextAttribute
 check_func_headers windows.h Sleep
 check_func_headers windows.h VirtualAlloc
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index 4949065..6cc6d9a 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -129,6 +129,18 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int 
timeout);
 #include 
 #include "libavutil/wchar_filename.h"
 
+#ifdef WINAPI_FAMILY
+#include 
+// If a WINAPI_FAMILY is defined, check that the desktop API subset
+// is enabled
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#define USE_MOVEFILEEXA
+#endif
+#else
+// If no WINAPI_FAMILY is defined, assume the full API subset
+#define USE_MOVEFILEEXA
+#endif
+
 #define DEF_FS_FUNCTION(name, wfunc, afunc)   \
 static inline int win32_##name(const char *filename_utf8) \
 { \
@@ -180,13 +192,14 @@ static inline int win32_rename(const char *src_utf8, 
const char *dest_utf8)
 
 fallback:
 /* filename may be be in CP_ACP */
-#if HAVE_MOVEFILEEXA
+#ifdef USE_MOVEFILEEXA
 ret = MoveFileExA(src_utf8, dest_utf8, MOVEFILE_REPLACE_EXISTING);
 if (ret)
 errno = EPERM;
 #else
-/* Windows Phone doesn't have MoveFileExA. However, it's unlikely
- * that anybody would input filenames in CP_ACP there, so this
+/* Windows Phone doesn't have MoveFileExA, and for Windows Store apps,
+ * it is available but not allowed by the app certification kit. However,
+ * it's unlikely that anybody would input filenames in CP_ACP there, so 
this
  * fallback is kept mostly for completeness. Alternatively we could
  * do MultiByteToWideChar(CP_ACP) and use MoveFileExW, but doing
  * explicit conversions with CP_ACP is allegedly forbidden in windows

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


[FFmpeg-cvslog] rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer exists

2014-12-19 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Fri Dec 19 
15:26:23 2014 +0200| [fc308b30bb24e623fed042ec78b10803b2362a18] | committer: 
Martin Storsjö

rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer 
exists

Since the mpegts muxer now can handle being called with a NULL
AVIOContext, we don't need to try to allocate one before calling
write_trailer.

Signed-off-by: Martin Storsjö 

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

 libavformat/rtpenc_mpegts.c |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index 4e243f0..f170f97 100644
--- a/libavformat/rtpenc_mpegts.c
+++ b/libavformat/rtpenc_mpegts.c
@@ -32,11 +32,9 @@ static int rtp_mpegts_write_close(AVFormatContext *s)
 struct MuxChain *chain = s->priv_data;
 
 if (chain->mpegts_ctx) {
-if (!chain->mpegts_ctx->pb)
-avio_open_dyn_buf(&chain->mpegts_ctx->pb);
+av_write_trailer(chain->mpegts_ctx);
 if (chain->mpegts_ctx->pb) {
 uint8_t *buf;
-av_write_trailer(chain->mpegts_ctx);
 avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
 av_free(buf);
 }

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


[FFmpeg-cvslog] Merge commit 'fc308b30bb24e623fed042ec78b10803b2362a18'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
00:41:45 2014 +0100| [a701a9cff4d53791ff811ebeaf1a644fca74191c] | committer: 
Michael Niedermayer

Merge commit 'fc308b30bb24e623fed042ec78b10803b2362a18'

* commit 'fc308b30bb24e623fed042ec78b10803b2362a18':
  rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output 
buffer exists

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'e2ce16392205d8efe9143329ed3fb5fcb15498fa'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
00:33:08 2014 +0100| [6b0f54ddc746fe2b7939d279837051a427f85b62] | committer: 
Michael Niedermayer

Merge commit 'e2ce16392205d8efe9143329ed3fb5fcb15498fa'

* commit 'e2ce16392205d8efe9143329ed3fb5fcb15498fa':
  mpegts: Support running the write_trailer function without an AVIOContext

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mpegts: Support running the write_trailer function without an AVIOContext

2014-12-19 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Fri Dec 19 
15:23:06 2014 +0200| [e2ce16392205d8efe9143329ed3fb5fcb15498fa] | committer: 
Martin Storsjö

mpegts: Support running the write_trailer function without an AVIOContext

If opening and closing dynamic buffers as AVIOContext, we may
not have any AVIOContext available when wanting to close and
deallocate the muxer. Allow calling write_trailer despite this.

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 8fa1c3e..1be4e55 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1192,7 +1192,8 @@ static int mpegts_write_end(AVFormatContext *s)
 MpegTSService *service;
 int i;
 
-mpegts_write_flush(s);
+if (s->pb)
+mpegts_write_flush(s);
 
 for (i = 0; i < s->nb_streams; i++) {
 AVStream *st = s->streams[i];

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


[FFmpeg-cvslog] Merge commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
00:16:13 2014 +0100| [3a15168a6e9764f51d41d1e95ca1fc7386ade5ad] | committer: 
Michael Niedermayer

Merge commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f'

* commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f':
  libavformat: Allow calling av_write_trailer with a NULL AVIOContext

Conflicts:
libavformat/mux.c

See: 277f20c3c877a74aca9d480480024a6d66c9fbc4
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] libavformat: Allow calling av_write_trailer with a NULL AVIOContext

2014-12-19 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Fri Dec 19 
15:40:02 2014 +0200| [4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f] | committer: 
Martin Storsjö

libavformat: Allow calling av_write_trailer with a NULL AVIOContext

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 9aee224..2a28fd6 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -624,7 +624,7 @@ int av_write_trailer(AVFormatContext *s)
 if (s->oformat->write_trailer)
 ret = s->oformat->write_trailer(s);
 
-if (!(s->oformat->flags & AVFMT_NOFILE))
+if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
 avio_flush(s->pb);
 
 fail:

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


[FFmpeg-cvslog] Merge commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Dec 20 
00:16:13 2014 +0100| [fdc297bcf3741e5378ccec64cb0531e5bca38f09] | committer: 
Michael Niedermayer

Merge commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f'

* commit '4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f':
  libavformat: Allow calling av_write_trailer with a NULL AVIOContext

Conflicts:
libavformat/mux.c

See: 277f20c3c877a74aca9d480480024a6d66c9fbc4
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] libavformat: Allow calling av_write_trailer with a NULL AVIOContext

2014-12-19 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Fri Dec 19 
15:40:02 2014 +0200| [4895aa65c6ddec2e33ec3c023f221b1bafcbaf9f] | committer: 
Martin Storsjö

libavformat: Allow calling av_write_trailer with a NULL AVIOContext

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 9aee224..2a28fd6 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -624,7 +624,7 @@ int av_write_trailer(AVFormatContext *s)
 if (s->oformat->write_trailer)
 ret = s->oformat->write_trailer(s);
 
-if (!(s->oformat->flags & AVFMT_NOFILE))
+if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
 avio_flush(s->pb);
 
 fail:

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


[FFmpeg-cvslog] avformat/apngdec: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Dec 20 00:17:21 
2014 +0100| [d60fb4f7946272d2ef39703762b54c5f3a1b5789] | committer: Clément 
Bœsch

avformat/apngdec: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

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

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

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index d97b015..5e7a4a1 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -404,7 +404,7 @@ static int apng_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 return 0;
 default:
 {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
 avpriv_request_sample(s, "In-stream tag=%s (0x%08X) len=%"PRIu32, 
tag_buf, tag, len);

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


[FFmpeg-cvslog] avformat/rsd: make tag_buf string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Dec 20 00:17:43 
2014 +0100| [edbbb11488e1fce9b9703535936d2e1731e2e318] | committer: Clément 
Bœsch

avformat/rsd: make tag_buf string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

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

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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index bb2f3bc..1eff5de 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
 codec->codec_tag  = avio_rl32(pb);
 codec->codec_id   = ff_codec_get_id(rsd_tags, codec->codec_tag);
 if (!codec->codec_id) {
-char tag_buf[5];
+char tag_buf[32];
 
 av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
 for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {

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


[FFmpeg-cvslog] avformat/wavdec: make start_code string larger

2014-12-19 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Dec 19 23:57:39 
2014 +0100| [83b0fe395bbd343a3a3f3076dfd7d7acf38ad398] | committer: Clément 
Bœsch

avformat/wavdec: make start_code string larger

av_get_codec_tag_string() uses more that 1 char for unprintable characters.

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

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

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 98e9787..410c2ec 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -249,7 +249,7 @@ static int wav_read_header(AVFormatContext *s)
 int64_t size, av_uninit(data_size);
 int64_t sample_count = 0;
 int rf64 = 0;
-char start_code[5];
+char start_code[32];
 uint32_t tag;
 AVIOContext *pb  = s->pb;
 AVStream *st = NULL;
@@ -273,7 +273,7 @@ static int wav_read_header(AVFormatContext *s)
 rf64 = 1;
 break;
 default:
-av_get_codec_tag_string(start_code, 5, tag);
+av_get_codec_tag_string(start_code, sizeof(start_code), tag);
 av_log(s, AV_LOG_ERROR, "invalid start code %s in RIFF header\n", 
start_code);
 return AVERROR_INVALIDDATA;
 }

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


[FFmpeg-cvslog] wavdec: avoid output of arbitrary chars

2014-12-19 Thread Thomas Volkert
ffmpeg | branch: master | Thomas Volkert  | Fri 
Dec 19 23:39:01 2014 +0100| [e8d57e41639336d2507a7f017bd45598cbb257d9] | 
committer: Michael Niedermayer

wavdec: avoid output of arbitrary chars

use av_get_codec_tag_string() in wav_read_header() for printing the
faulty start code from riff header

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 4b452a6..98e9787 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -249,6 +249,7 @@ static int wav_read_header(AVFormatContext *s)
 int64_t size, av_uninit(data_size);
 int64_t sample_count = 0;
 int rf64 = 0;
+char start_code[5];
 uint32_t tag;
 AVIOContext *pb  = s->pb;
 AVStream *st = NULL;
@@ -272,7 +273,8 @@ static int wav_read_header(AVFormatContext *s)
 rf64 = 1;
 break;
 default:
-av_log(s, AV_LOG_ERROR, "invalid start code %c%c%c%c in RIFF 
header\n", tag & 0xFF, (tag >> 8) & 0xFF, (tag >> 16) & 0xFF, (tag >> 24) & 
0xFF);
+av_get_codec_tag_string(start_code, 5, tag);
+av_log(s, AV_LOG_ERROR, "invalid start code %s in RIFF header\n", 
start_code);
 return AVERROR_INVALIDDATA;
 }
 

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


[FFmpeg-cvslog] wavdec: refactor wav_read_header()

2014-12-19 Thread Thomas Volkert
ffmpeg | branch: master | Thomas Volkert  | Fri 
Dec 19 21:57:05 2014 +0100| [1a971d33ebedff3cae01ee81da4fa74302a91492] | 
committer: Michael Niedermayer

wavdec: refactor wav_read_header()

Make it more readable and display an error message in case an invalid
header is detected (the current version just returns
AVERROR_INVALIDDATA)

Signed-off-by: Michael Niedermayer 

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

 libavformat/wavdec.c |   31 ++-
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 8a7f84b..4b452a6 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -248,7 +248,7 @@ static int wav_read_header(AVFormatContext *s)
 {
 int64_t size, av_uninit(data_size);
 int64_t sample_count = 0;
-int rf64;
+int rf64 = 0;
 uint32_t tag;
 AVIOContext *pb  = s->pb;
 AVStream *st = NULL;
@@ -260,17 +260,30 @@ static int wav_read_header(AVFormatContext *s)
 
 wav->smv_data_ofs = -1;
 
-/* check RIFF header */
+/* read chunk ID */
 tag = avio_rl32(pb);
-
-rf64 = tag == MKTAG('R', 'F', '6', '4');
-wav->rifx = tag == MKTAG('R', 'I', 'F', 'X');
-if (!rf64 && !wav->rifx && tag != MKTAG('R', 'I', 'F', 'F'))
+switch (tag) {
+case MKTAG('R', 'I', 'F', 'F'):
+break;
+case MKTAG('R', 'I', 'F', 'X'):
+wav->rifx = 1;
+break;
+case MKTAG('R', 'F', '6', '4'):
+rf64 = 1;
+break;
+default:
+av_log(s, AV_LOG_ERROR, "invalid start code %c%c%c%c in RIFF 
header\n", tag & 0xFF, (tag >> 8) & 0xFF, (tag >> 16) & 0xFF, (tag >> 24) & 
0xFF);
 return AVERROR_INVALIDDATA;
-avio_rl32(pb); /* file size */
-tag = avio_rl32(pb);
-if (tag != MKTAG('W', 'A', 'V', 'E'))
+}
+
+/* read chunk size */
+avio_rl32(pb);
+
+/* read format */
+if (avio_rl32(pb) != MKTAG('W', 'A', 'V', 'E')) {
+av_log(s, AV_LOG_ERROR, "invalid format in RIFF header\n");
 return AVERROR_INVALIDDATA;
+}
 
 if (rf64) {
 if (avio_rl32(pb) != MKTAG('d', 's', '6', '4'))

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


[FFmpeg-cvslog] avcodec/mpegvideo_enc: remove rtp_mode=0 for H261

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu Dec 18 
23:32:42 2014 +0100| [2df5b506ca5eb2aba8d68da07547eec42f2b0e52] | committer: 
Michael Niedermayer

avcodec/mpegvideo_enc: remove rtp_mode=0 for H261

Suggested-by: Thomas Volkert 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mpegvideo_enc.c |3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 17d0fbf..a353d5d 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2852,9 +2852,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
 if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) 
is_gob_start=1;
 
 switch(s->codec_id){
-case AV_CODEC_ID_H261:
-is_gob_start=0;//FIXME
-break;
 case AV_CODEC_ID_H263:
 case AV_CODEC_ID_H263P:
 if(!s->h263_slice_structured)

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


[FFmpeg-cvslog] avcodec/vp3: Fix offset handling

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
20:53:53 2014 +0100| [c3e6a55956fd4a8b59c8c7a52a64af24dfed7a5a] | committer: 
Michael Niedermayer

avcodec/vp3: Fix offset handling

Fixes use of uninitialized memory

Signed-off-by: Michael Niedermayer 

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

 libavcodec/vp3.c |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index c7398e6..726eda0 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -177,6 +177,7 @@ typedef struct Vp3DecodeContext {
 int data_offset[3];
 uint8_t offset_x;
 uint8_t offset_y;
+int offset_x_warned;
 
 int8_t (*motion_val[2])[2];
 
@@ -2322,8 +2323,7 @@ static int theora_decode_header(AVCodecContext *avctx, 
GetBitContext *gb)
 ret = ff_set_dimensions(avctx, s->width, s->height);
 if (ret < 0)
 return ret;
-if (!(avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) &&
-(visible_width != s->width || visible_height != s->height)) {
+if (!(avctx->flags2 & CODEC_FLAG2_IGNORE_CROP)) {
 avctx->width  = visible_width;
 avctx->height = visible_height;
 // translate offsets from theora axis ([0,0] lower left)
@@ -2333,9 +2333,12 @@ static int theora_decode_header(AVCodecContext *avctx, 
GetBitContext *gb)
 
 if ((s->offset_x & 0x1F) && !(avctx->flags & CODEC_FLAG_UNALIGNED)) {
 s->offset_x &= ~0x1F;
-av_log(avctx, AV_LOG_WARNING, "Reducing offset_x from %d to %d"
-   "chroma samples to preserve alignment.\n",
-   offset_x, s->offset_x);
+if (!s->offset_x_warned) {
+s->offset_x_warned = 1;
+av_log(avctx, AV_LOG_WARNING, "Reducing offset_x from %d to %d"
+"chroma samples to preserve alignment.\n",
+offset_x, s->offset_x);
+}
 }
 }
 

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


[FFmpeg-cvslog] x86/constants: fix alignment of pw_255

2014-12-19 Thread James Almer
ffmpeg | branch: master | James Almer  | Fri Dec 19 16:18:43 
2014 -0300| [a4d62f7775d1785873a5553cf47fa1194ab8521c] | committer: Michael 
Niedermayer

x86/constants: fix alignment of pw_255

Signed-off-by: James Almer 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/x86/constants.c b/libavcodec/x86/constants.c
index d78b896..54acc89 100644
--- a/libavcodec/x86/constants.c
+++ b/libavcodec/x86/constants.c
@@ -40,7 +40,7 @@ DECLARE_ALIGNED(8,  const uint64_t, ff_pw_53)   =   
0x0035003500350035ULL;
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_64)   = { 0x0040004000400040ULL, 
0x0040004000400040ULL };
 DECLARE_ALIGNED(8,  const uint64_t, ff_pw_96)   =   0x0060006000600060ULL;
 DECLARE_ALIGNED(8,  const uint64_t, ff_pw_128)  =   0x0080008000800080ULL;
-DECLARE_ALIGNED(8,  const xmm_reg,  ff_pw_255)  = { 0x00ff00ff00ff00ffULL, 
0x00ff00ff00ff00ffULL };
+DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_255)  = { 0x00ff00ff00ff00ffULL, 
0x00ff00ff00ff00ffULL };
 DECLARE_ALIGNED(32, const ymm_reg,  ff_pw_256)  = { 0x0100010001000100ULL, 
0x0100010001000100ULL,
 0x0100010001000100ULL, 
0x0100010001000100ULL };
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_512)  = { 0x0200020002000200ULL, 
0x0200020002000200ULL };

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


[FFmpeg-cvslog] Add FFMPEG_VERSION into the binary libs

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
18:04:40 2014 +0100| [649c158e8c94ac0cff7f03e97d6ea8bbf71b7f02] | committer: 
Michael Niedermayer

Add FFMPEG_VERSION into the binary libs

This simplifies identifying from which revision a binary of a lib came from

Signed-off-by: Michael Niedermayer 

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

 libavcodec/utils.c |3 +++
 libavdevice/avdevice.c |3 +++
 libavfilter/avfilter.c |3 +++
 libavformat/utils.c|3 +++
 libavutil/utils.c  |3 +++
 libpostproc/postprocess.c  |3 +++
 libswresample/swresample.c |3 +++
 7 files changed, 21 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 74bf6d5..f6d99ab 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -66,6 +66,9 @@
 #include "compat/os2threads.h"
 #endif
 
+#include "libavutil/ffversion.h"
+const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS
 static int default_lockmgr_cb(void **arg, enum AVLockOp op)
 {
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index fda3cd0..d59e99a 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -23,6 +23,9 @@
 #include "avdevice.h"
 #include "config.h"
 
+#include "libavutil/ffversion.h"
+const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 #define E AV_OPT_FLAG_ENCODING_PARAM
 #define D AV_OPT_FLAG_DECODING_PARAM
 #define A AV_OPT_FLAG_AUDIO_PARAM
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 963f5e6..b37ff1f 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -37,6 +37,9 @@
 #include "formats.h"
 #include "internal.h"
 
+#include "libavutil/ffversion.h"
+const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame);
 
 void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a883745..752270d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -53,6 +53,9 @@
 #include "riff.h"
 #include "url.h"
 
+#include "libavutil/ffversion.h"
+const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 /**
  * @file
  * various utility functions for use within FFmpeg
diff --git a/libavutil/utils.c b/libavutil/utils.c
index aafd3b9..da8b5ae 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -27,6 +27,9 @@
  * various utility functions
  */
 
+#include "libavutil/ffversion.h"
+const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned avutil_version(void)
 {
 static int checks_done;
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index f8fb356..c11debc 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -89,6 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x 
... checks
 #include "postprocess_internal.h"
 #include "libavutil/avstring.h"
 
+#include "libavutil/ffversion.h"
+const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned postproc_version(void)
 {
 av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100);
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index b0bd697..eb6effa 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -28,6 +28,9 @@
 
 #define ALIGN 32
 
+#include "libavutil/ffversion.h"
+const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
+
 unsigned swresample_version(void)
 {
 av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100);

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


[FFmpeg-cvslog] avformat/mov: fix integer overflow of size

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 21:29:27 2014 +0100| [ea5b4c682caeb8beb2617a031211a89fbb1ad01a] | committer: 
Michael Niedermayer

avformat/mov: fix integer overflow of size

Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0603717..7806ef5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1453,7 +1453,7 @@ static void mov_parse_stsd_audio(MOVContext *c, 
AVIOContext *pb,
 
 static void mov_parse_stsd_subtitle(MOVContext *c, AVIOContext *pb,
 AVStream *st, MOVStreamContext *sc,
-int size)
+int64_t size)
 {
 // ttxt stsd contains display flags, justification, background
 // color, fonts, and default styles, so fake an atom to read it
@@ -1518,10 +1518,10 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st)
 
 static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb,
 AVStream *st, MOVStreamContext *sc,
-int size)
+int64_t size)
 {
 if (st->codec->codec_tag == MKTAG('t','m','c','d')) {
-if (ff_get_extradata(st->codec, pb, size) < 0)
+if ((int)size != size || ff_get_extradata(st->codec, pb, size) < 0)
 return AVERROR(ENOMEM);
 if (size > 16) {
 MOVStreamContext *tmcd_ctx = st->priv_data;

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


[FFmpeg-cvslog] jvdec: check frame dimensions

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: release/2.4 | Anton Khirnov  | Sun Dec 14 
21:01:59 2014 +0100| [396195c50591a655c6c444925e813ae6a45cb3cc] | committer: 
Michael Niedermayer

jvdec: check frame dimensions

The frame size must be set by the caller and each dimension must be a
multiple of 8.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
See: 105654e376a736d243aef4a1d121abebce912e6b
These should be redundant, but are backported for saftey anyway
(cherry picked from commit e012cb8dea7969c7b3927dbf846ef2742cd4a7ab)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jvdec.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index 47e8edc..9c4a8d4 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
 JvContext *s = avctx->priv_data;
 
+if (!avctx->width || !avctx->height ||
+(avctx->width & 7) || (avctx->height & 7)) {
+av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
+   avctx->width, avctx->height);
+return AVERROR(EINVAL);
+}
+
 s->frame = av_frame_alloc();
 if (!s->frame)
 return AVERROR(ENOMEM);

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


[FFmpeg-cvslog] avcodec/vmdvideo: Check len before using it in method 3

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 16:24:55 2014 +0100| [195e8ecacc8b81b71e86d283ce7742bbdc230826] | committer: 
Michael Niedermayer

avcodec/vmdvideo: Check len before using it in method 3

Fixes out of array access
Fixes: asan_heap-oob_4d23ba_91_cov_3853393937_128.vmd

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 3030fb7e0d41836f8add6399e9a7c7b740b48bfd)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/vmdvideo.c b/libavcodec/vmdvideo.c
index fa0fbe3..a2ba1c9 100644
--- a/libavcodec/vmdvideo.c
+++ b/libavcodec/vmdvideo.c
@@ -339,6 +339,9 @@ static int vmd_decode(VmdVideoContext *s, AVFrame *frame)
 ofs += slen;
 bytestream2_skip(&gb, len);
 } else {
+if (ofs + len > frame_width ||
+bytestream2_get_bytes_left(&gb) < len)
+return AVERROR_INVALIDDATA;
 bytestream2_get_buffer(&gb, &dp[ofs], len);
 ofs += len;
 }

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


[FFmpeg-cvslog] swscale: increase yuv2rgb table headroom

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 22:21:21 2014 +0100| [dce726f0914fa34523420e34faf2ef696ddcea1e] | committer: 
Michael Niedermayer

swscale: increase yuv2rgb table headroom

Fixes out of array access
Fixes: case2_bad_read_yuv2rgbx32.mp4
Found-by: Michal Zalewski 
Signed-off-by: Michael Niedermayer 

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

 libswscale/swscale_internal.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index f693294..bfd24c9 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -39,7 +39,7 @@
 
 #define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long
 
-#define YUVRGB_TABLE_HEADROOM 128
+#define YUVRGB_TABLE_HEADROOM 256
 
 #define MAX_FILTER_SIZE SWS_MAX_FILTER_SIZE
 

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


[FFmpeg-cvslog] avcodec/h264: Check *log2_weight_denom

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Thu Dec 
18 03:16:39 2014 +0100| [bb97f243baa05aff35c1a1bbc6921b95a0378f5c] | committer: 
Michael Niedermayer

avcodec/h264: Check *log2_weight_denom

Fixes undefined behavior
Fixes: 
signal_sigsegv_14768d2_2248_cov_3629497219_h264_h264___pi_20070614T182942.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 61296d41e2de3b41304339e4631dd44c2e15f805)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7914c46..ba5bb40 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -991,6 +991,16 @@ int ff_pred_weight_table(H264Context *h)
 h->luma_log2_weight_denom = get_ue_golomb(&h->gb);
 if (h->sps.chroma_format_idc)
 h->chroma_log2_weight_denom = get_ue_golomb(&h->gb);
+
+if (h->luma_log2_weight_denom > 7U) {
+av_log(h->avctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is out of 
range\n", h->luma_log2_weight_denom);
+h->luma_log2_weight_denom = 0;
+}
+if (h->chroma_log2_weight_denom > 7U) {
+av_log(h->avctx, AV_LOG_ERROR, "chroma_log2_weight_denom %d is out of 
range\n", h->chroma_log2_weight_denom);
+h->chroma_log2_weight_denom = 0;
+}
+
 luma_def   = 1 << h->luma_log2_weight_denom;
 chroma_def = 1 << h->chroma_log2_weight_denom;
 

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


[FFmpeg-cvslog] avcodec/dcadec: Check that the added xch channel isnt already there

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
17 15:33:05 2014 +0100| [bd62554ad243a94ee483c48adac29297d16f9fa2] | committer: 
Michael Niedermayer

avcodec/dcadec: Check that the added xch channel isnt already there

Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7d593495e42e92693cc8f3ce9b42cf3edcea377a)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/dcadec.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 82d96d2..7d798b0 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -2359,6 +2359,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #else
 if (s->xch_present && !s->xch_disable) {
 #endif
+if (avctx->channel_layout & AV_CH_BACK_CENTER) {
+avpriv_request_sample(avctx, "XCh with Back center 
channel");
+return AVERROR_INVALIDDATA;
+}
 avctx->channel_layout |= AV_CH_BACK_CENTER;
 if (s->lfe) {
 avctx->channel_layout |= AV_CH_LOW_FREQUENCY;

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


[FFmpeg-cvslog] avcodec/h264: Clear delayed_pic on deallocation

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
17 21:27:37 2014 +0100| [a9c77e5c227bc8c23778def2f7180b987d4da5c5] | committer: 
Michael Niedermayer

avcodec/h264: Clear delayed_pic on deallocation

Fixes use of freed memory

Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit e8714f6f93d1a32f4e4655209960afcf4c185214)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 12713de..7914c46 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -391,6 +391,7 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
 if (free_rbsp && h->DPB) {
 for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
 ff_h264_unref_picture(h, &h->DPB[i]);
+memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
 av_freep(&h->DPB);
 } else if (h->DPB) {
 for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)

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


[FFmpeg-cvslog] avcodec/h264: make the first field of H264Context an AVClass

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
17 01:31:48 2014 +0100| [da811dfc93a9e3d5f9669acd3dd5f1703b8cb21e] | committer: 
Michael Niedermayer

avcodec/h264: make the first field of H264Context an AVClass

Fixes use of freed memory
Fixes: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit f3b5b139ad853b6f69c6a0b036815a60e7b3f261)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index b94f06b..cb7e6f9 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -338,6 +338,7 @@ typedef struct H264Picture {
  * H264Context
  */
 typedef struct H264Context {
+AVClass *av_class;
 AVCodecContext *avctx;
 MECmpContext mecc;
 VideoDSPContext vdsp;

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


[FFmpeg-cvslog] avcodec/hevc: clear filter_slice_edges() on allocation

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
17 19:42:57 2014 +0100| [de882ec2b15f02eed000f1ee357ab81344b18684] | committer: 
Michael Niedermayer

avcodec/hevc: clear filter_slice_edges() on allocation

This avoids use of uninitialized memory
Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 8aa8d12554868c32436750f881954193087219c8)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 309b385..2acc192 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -108,7 +108,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS 
*sps)
 if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)
 goto fail;
 
-s->filter_slice_edges = av_malloc(ctb_count);
+s->filter_slice_edges = av_mallocz(ctb_count);
 s->tab_slice_address  = av_malloc_array(pic_size_in_ctb,
   sizeof(*s->tab_slice_address));
 s->qp_y_tab   = av_malloc_array(pic_size_in_ctb,

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


[FFmpeg-cvslog] mmvideo: check frame dimensions

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: release/2.4 | Anton Khirnov  | Sun Dec 14 
21:01:59 2014 +0100| [9bafd6a8f6a013c5f45141f596574a9a3fbfb561] | committer: 
Michael Niedermayer

mmvideo: check frame dimensions

The frame size must be set by the caller and each dimension must be a
multiple of 2.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
See: 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
These should be redundant, but are backported for saftey anyway
(cherry picked from commit b0273232d8fffdc8a977ccdad460b8071a0e353c)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/mmvideo.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 9ff6393..51d4559 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -61,6 +61,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
 
 avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
+if (!avctx->width || !avctx->height ||
+(avctx->width & 1) || (avctx->height & 1)) {
+av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
+   avctx->width, avctx->height);
+return AVERROR(EINVAL);
+}
+
 s->frame = av_frame_alloc();
 if (!s->frame)
 return AVERROR(ENOMEM);

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


[FFmpeg-cvslog] avcodec/hevc_ps: Check diff_cu_qp_delta_depth

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Thu Dec 
18 02:09:23 2014 +0100| [b6dc16bd95375e99a0a887496eb22071ff0001f2] | committer: 
Michael Niedermayer

avcodec/hevc_ps: Check diff_cu_qp_delta_depth

Fixes undefined behavior
Fixes: asan_static-oob_17aa046_582_cov_1577759978_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 3281fa892599d71b4dc298a426af8296419cd90e)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index d79740a..0cd2269 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1257,6 +1257,14 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
 if (pps->cu_qp_delta_enabled_flag)
 pps->diff_cu_qp_delta_depth = get_ue_golomb_long(gb);
 
+if (pps->diff_cu_qp_delta_depth < 0 ||
+pps->diff_cu_qp_delta_depth > 
sps->log2_diff_max_min_coding_block_size) {
+av_log(s->avctx, AV_LOG_ERROR, "diff_cu_qp_delta_depth %d is 
invalid\n",
+   pps->diff_cu_qp_delta_depth);
+ret = AVERROR_INVALIDDATA;
+goto err;
+}
+
 pps->cb_qp_offset = get_se_golomb(gb);
 if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) {
 av_log(s->avctx, AV_LOG_ERROR, "pps_cb_qp_offset out of range: %d\n",

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


[FFmpeg-cvslog] avcodec/indeo3: use signed variables to avoid underflow

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Wed Dec 
17 03:14:21 2014 +0100| [cd51f41791395d76a015851295a88d06069117c0] | committer: 
Michael Niedermayer

avcodec/indeo3: use signed variables to avoid underflow

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

Signed-off-by: Michael Niedermayer 

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

 libavcodec/indeo3.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index d38765e..cafed51 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -94,7 +94,7 @@ typedef struct Indeo3DecodeContext {
 
 int16_t width, height;
 uint32_tframe_num;  ///< current frame number (zero-based)
-uint32_tdata_size;  ///< size of the frame data in bytes
+int data_size;  ///< size of the frame data in bytes
 uint16_tframe_flags;///< frame properties
 uint8_t cb_offset;  ///< needed for selecting VQ tables
 uint8_t buf_sel;///< active frame buffer: 0 - primary, 1 
-secondary
@@ -899,7 +899,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, 
AVCodecContext *avctx,
 GetByteContext gb;
 const uint8_t   *bs_hdr;
 uint32_tframe_num, word2, check_sum, data_size;
-uint32_ty_offset, u_offset, v_offset, starts[3], ends[3];
+int y_offset, u_offset, v_offset;
+uint32_tstarts[3], ends[3];
 uint16_theight, width;
 int i, j;
 

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


[FFmpeg-cvslog] avcodec/indeo3: ensure offsets are non negative

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Thu Dec 
18 18:57:27 2014 +0100| [e2324b5b371c613faed33be52b6908da540557d1] | committer: 
Michael Niedermayer

avcodec/indeo3: ensure offsets are non negative

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index cafed51..9fde0fd 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -982,7 +982,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, 
AVCodecContext *avctx,
 ctx->y_data_size = ends[0] - starts[0];
 ctx->v_data_size = ends[1] - starts[1];
 ctx->u_data_size = ends[2] - starts[2];
-if (FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
+if (FFMIN3(y_offset, v_offset, u_offset) < 0 ||
+FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
 FFMIN3(y_offset, v_offset, u_offset) < gb.buffer - bs_hdr + 16 ||
 FFMIN3(ctx->y_data_size, ctx->v_data_size, ctx->u_data_size) <= 0) {
 av_log(avctx, AV_LOG_ERROR, "One of the y/u/v offsets is invalid\n");

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


[FFmpeg-cvslog] avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 15:03:32 2014 +0100| [a4ffcf024e99fa4d8410883c1d1d9946e423bf0b] | committer: 
Michael Niedermayer

avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 12d25b2..4b014ce 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -623,7 +623,7 @@ static int flv_read_close(AVFormatContext *s)
 
 static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size)
 {
-av_free(st->codec->extradata);
+av_freep(&st->codec->extradata);
 if (ff_get_extradata(st->codec, s->pb, size) < 0)
 return AVERROR(ENOMEM);
 return 0;

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


[FFmpeg-cvslog] avformat/mov: check atom nesting depth

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 21:14:40 2014 +0100| [65d426bddd0b9210788bf9be7af21b80b30d422a] | committer: 
Michael Niedermayer

avformat/mov: check atom nesting depth

Fixes call stack overflow
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit caa7a3914f499f74b3ee346f26d598ebdc0ec210)

Conflicts:

libavformat/isom.h

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

 libavformat/isom.h |1 +
 libavformat/mov.c  |   13 -
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index 979e967..6fb0c4d 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -171,6 +171,7 @@ typedef struct MOVContext {
 int *bitrates;  ///< bitrates read before streams creation
 int bitrates_count;
 int moov_retry;
+int atom_depth;
 } MOVContext;
 
 int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ae48c02..0603717 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3172,6 +3172,12 @@ static int mov_read_default(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 MOVAtom a;
 int i;
 
+if (c->atom_depth > 10) {
+av_log(c->fc, AV_LOG_ERROR, "Atoms too deeply nested\n");
+return AVERROR_INVALIDDATA;
+}
+c->atom_depth ++;
+
 if (atom.size < 0)
 atom.size = INT64_MAX;
 while (total_size + 8 <= atom.size && !avio_feof(pb)) {
@@ -3201,6 +3207,7 @@ static int mov_read_default(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 {
 av_log(c->fc, AV_LOG_ERROR, "Broken file, trak/mdat not at 
top-level\n");
 avio_skip(pb, -8);
+c->atom_depth --;
 return 0;
 }
 }
@@ -3237,13 +3244,16 @@ static int mov_read_default(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 int64_t start_pos = avio_tell(pb);
 int64_t left;
 int err = parse(c, pb, a);
-if (err < 0)
+if (err < 0) {
+c->atom_depth --;
 return err;
+}
 if (c->found_moov && c->found_mdat &&
 ((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) ||
  start_pos + a.size == avio_size(pb))) {
 if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX)
 c->next_root_atom = start_pos + a.size;
+c->atom_depth --;
 return 0;
 }
 left = a.size - avio_tell(pb) + start_pos;
@@ -3263,6 +3273,7 @@ static int mov_read_default(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 if (total_size < atom.size && atom.size < 0x7)
 avio_skip(pb, atom.size - total_size);
 
+c->atom_depth --;
 return 0;
 }
 

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


[FFmpeg-cvslog] avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 15:01:05 2014 +0100| [da52c0ebc641acd652254d14fc93751d46d6a129] | committer: 
Michael Niedermayer

avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory

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

Signed-off-by: Michael Niedermayer 

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

 libavformat/hdsenc.c |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 1f77785..7530aa9 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -145,15 +145,15 @@ static void hds_free(AVFormatContext *s)
 if (os->ctx && os->ctx_inited)
 av_write_trailer(os->ctx);
 if (os->ctx && os->ctx->pb)
-av_free(os->ctx->pb);
+av_freep(&os->ctx->pb);
 if (os->ctx)
 avformat_free_context(os->ctx);
-av_free(os->metadata);
+av_freep(&os->metadata);
 for (j = 0; j < os->nb_extra_packets; j++)
-av_free(os->extra_packets[j]);
+av_freep(&os->extra_packets[j]);
 for (j = 0; j < os->nb_fragments; j++)
-av_free(os->fragments[j]);
-av_free(os->fragments);
+av_freep(&os->fragments[j]);
+av_freep(&os->fragments);
 }
 av_freep(&c->streams);
 }
@@ -506,7 +506,7 @@ static int hds_flush(AVFormatContext *s, OutputStream *os, 
int final,
 if (remove > 0) {
 for (i = 0; i < remove; i++) {
 unlink(os->fragments[i]->file);
-av_free(os->fragments[i]);
+av_freep(&os->fragments[i]);
 }
 os->nb_fragments -= remove;
 memmove(os->fragments, os->fragments + remove,

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


[FFmpeg-cvslog] configure: create the tests directory like the doc directory

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Mon Dec 
15 04:32:23 2014 +0100| [8815ddc29fa43049413c032638bd39945c15fd01] | committer: 
Michael Niedermayer

configure: create the tests directory like the doc directory

This fixes an issue where the tests directory is not created for out of tree
builds before its needed

Tested-by: Dave Yeo 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit e631872f13b6be0583603d45a11e53319754bc8d)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/configure b/configure
index c93876a..2104232 100755
--- a/configure
+++ b/configure
@@ -5628,6 +5628,7 @@ enabled getenv || echo "#define getenv(x) NULL" >> $TMPH
 
 
 mkdir -p doc
+mkdir -p tests
 echo "@c auto-generated by configure" > doc/config.texi
 
 print_config ARCH_   "$config_files" $ARCH_LIST

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


[FFmpeg-cvslog] avcodec/utvideodec: Fix handling of slice_height=0

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
16 20:45:31 2014 +0100| [64fdce7802632801d36f9d3973a065e0e011c154] | committer: 
Michael Niedermayer

avcodec/utvideodec: Fix handling of slice_height=0

Fixes out of array accesses
Fixes: asan_heap-oob_25bcd7e_3783_cov_3553517262_utvideo_rgba_median.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 3881606240953b9275a247a1c98a567f3c44890f)

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 05c943f..abf550b 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -214,6 +214,8 @@ static void restore_median(uint8_t *src, int step, int 
stride,
 slice_height = slice + 1) * height) / slices) & cmask) -
slice_start;
 
+if (!slice_height)
+continue;
 bsrc = src + slice_start * stride;
 
 // first line - left neighbour prediction
@@ -269,6 +271,8 @@ static void restore_median_il(uint8_t *src, int step, int 
stride,
 slice_height   = slice + 1) * height) / slices) & cmask) -
  slice_start;
 slice_height >>= 1;
+if (!slice_height)
+continue;
 
 bsrc = src + slice_start * stride;
 

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


[FFmpeg-cvslog] avfilter/vf_libopencv: use av_freep() avoid leaving stale pointers in memory

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
15:04:34 2014 +0100| [4d48ea3c4bcbdbd448aa50e286765e3548cf9c48] | committer: 
Michael Niedermayer

avfilter/vf_libopencv: use av_freep() avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer 

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

 libavfilter/vf_libopencv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index f55f552..16de98e 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -348,7 +348,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 
 if (s->uninit)
 s->uninit(ctx);
-av_free(s->priv);
+av_freep(&s->priv);
 }
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *in)

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


[FFmpeg-cvslog] avformat/mpegenc: replace always enabled asserts by av_assert0()

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
15:08:44 2014 +0100| [869b56cae6e08c48c32033a8644907739198721d] | committer: 
Michael Niedermayer

avformat/mpegenc: replace always enabled asserts by av_assert0()

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index b151506..f0fe771 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -35,9 +35,6 @@
 
 #define MAX_PAYLOAD_SIZE 4096
 
-#undef NDEBUG
-#include 
-
 typedef struct PacketDesc {
 int64_t pts;
 int64_t dts;
@@ -874,7 +871,7 @@ static int flush_packet(AVFormatContext *ctx, int 
stream_index,
 }
 
 /* output data */
-assert(payload_size - stuffing_size <= av_fifo_size(stream->fifo));
+av_assert0(payload_size - stuffing_size <= av_fifo_size(stream->fifo));
 av_fifo_generic_read(stream->fifo, ctx->pb,
  payload_size - stuffing_size,
  (void (*)(void*, void*, int))avio_write);
@@ -1028,14 +1025,14 @@ retry:
 goto retry;
 }
 
-assert(best_i >= 0);
+av_assert0(best_i >= 0);
 
 st = ctx->streams[best_i];
 stream = st->priv_data;
 
-assert(av_fifo_size(stream->fifo) > 0);
+av_assert0(av_fifo_size(stream->fifo) > 0);
 
-assert(avail_space >= s->packet_size || ignore_constraints);
+av_assert0(avail_space >= s->packet_size || ignore_constraints);
 
 timestamp_packet = stream->premux_packet;
 if (timestamp_packet->unwritten_size == timestamp_packet->size) {
@@ -1053,7 +1050,7 @@ retry:
 es_size = flush_packet(ctx, best_i, timestamp_packet->pts,
timestamp_packet->dts, scr, trailer_size);
 } else {
-assert(av_fifo_size(stream->fifo) == trailer_size);
+av_assert0(av_fifo_size(stream->fifo) == trailer_size);
 es_size = flush_packet(ctx, best_i, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 
scr,
trailer_size);
 }
@@ -1186,7 +1183,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
 for (i = 0; i < ctx->nb_streams; i++) {
 stream = ctx->streams[i]->priv_data;
 
-assert(av_fifo_size(stream->fifo) == 0);
+av_assert0(av_fifo_size(stream->fifo) == 0);
 av_fifo_freep(&stream->fifo);
 }
 return 0;

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


[FFmpeg-cvslog] avfilter/vsrc_life: Use av_freep() avoid leaving stale pointers in memory

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
15:04:56 2014 +0100| [b44ae59b70913244e5c33d54a2662fd9b2aed7fa] | committer: 
Michael Niedermayer

avfilter/vsrc_life: Use av_freep() avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer 

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

 libavfilter/vsrc_life.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 029e1bb..9410fbe 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -196,8 +196,8 @@ static int init_pattern_from_file(AVFilterContext *ctx)
 
 if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) 
||
 !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1] 
{
-av_free(life->buf[0]);
-av_free(life->buf[1]);
+av_freep(&life->buf[0]);
+av_freep(&life->buf[1]);
 return AVERROR(ENOMEM);
 }
 
@@ -238,8 +238,8 @@ static av_cold int init(AVFilterContext *ctx)
 
 if (!(life->buf[0] = av_calloc(life->h * life->w, 
sizeof(*life->buf[0]))) ||
 !(life->buf[1] = av_calloc(life->h * life->w, 
sizeof(*life->buf[1] {
-av_free(life->buf[0]);
-av_free(life->buf[1]);
+av_freep(&life->buf[0]);
+av_freep(&life->buf[1]);
 return AVERROR(ENOMEM);
 }
 if (life->random_seed == -1)

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


[FFmpeg-cvslog] libavutil: Added cbc mode to cast128

2014-12-19 Thread Supraja Meedinti
ffmpeg | branch: master | Supraja Meedinti  | Thu Dec 18 
15:44:32 2014 +0530| [4e1ecfe21476ee2631525a7d6dc2a0bc8151d0a9] | committer: 
Michael Niedermayer

libavutil: Added cbc mode to cast128

Signed-off-by: Supraja Meedinti 
Previous version reviewed-by: Giorgio Vazzana 
Signed-off-by: Michael Niedermayer 

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

 libavutil/cast5.c |   44 ++--
 libavutil/cast5.h |   14 +-
 2 files changed, 55 insertions(+), 3 deletions(-)

diff --git a/libavutil/cast5.c b/libavutil/cast5.c
index 14dd701..6f58382 100644
--- a/libavutil/cast5.c
+++ b/libavutil/cast5.c
@@ -416,7 +416,7 @@ static void encipher(AVCAST5* cs, uint8_t* dst, const 
uint8_t* src)
 AV_WB32(dst + 4, l);
 }
 
-static void decipher(AVCAST5* cs, uint8_t* dst, const uint8_t* src)
+static void decipher(AVCAST5* cs, uint8_t* dst, const uint8_t* src, uint8_t 
*iv)
 {
 uint32_t f, I, r, l;
 l = AV_RB32(src);
@@ -439,6 +439,11 @@ static void decipher(AVCAST5* cs, uint8_t* dst, const 
uint8_t* src)
 F3(r, l, 3);
 F2(l, r, 2);
 F1(r, l, 1);
+if (iv) {
+r ^= AV_RB32(iv);
+l ^= AV_RB32(iv + 4);
+memcpy(iv, src, 8);
+}
 AV_WB32(dst, r);
 AV_WB32(dst + 4, l);
 }
@@ -468,11 +473,31 @@ av_cold int av_cast5_init(AVCAST5* cs, const uint8_t 
*key, int key_bits)
 return 0;
 }
 
+void av_cast5_crypt2(AVCAST5* cs, uint8_t* dst, const uint8_t* src, int count, 
uint8_t *iv, int decrypt)
+{
+int i;
+while (count--) {
+if (decrypt) {
+decipher(cs, dst, src, iv);
+} else {
+if (iv) {
+for (i = 0; i < 8; i++)
+dst[i] = src[i] ^ iv[i];
+encipher(cs, dst, dst);
+memcpy(iv, dst, 8);
+} else {
+encipher(cs, dst, src);
+}
+}
+src = src + 8;
+dst = dst + 8;
+}
+}
 void av_cast5_crypt(AVCAST5* cs, uint8_t* dst, const uint8_t* src, int count, 
int decrypt)
 {
 while (count--) {
 if (decrypt){
-decipher(cs, dst, src);
+decipher(cs, dst, src, NULL);
 } else {
 encipher(cs, dst, src);
 }
@@ -504,6 +529,7 @@ int main(int argc, char** argv)
 {0xee, 0xa9, 0xd0, 0xa2, 0x49, 0xfd, 0x3b, 0xa6, 0xb3, 0x43, 0x6f, 
0xb8, 0x9d, 0x6d, 0xca, 0x92},
 {0xb2, 0xc9, 0x5e, 0xb0, 0x0c, 0x31, 0xad, 0x71, 0x80, 0xac, 0x05, 
0xb8, 0xe8, 0x3d, 0x69, 0x6e}
 };
+const uint8_t iv[8] = {0xee, 0xa9, 0xd0, 0xa2, 0x49, 0xfd, 0x3b, 0xa6};
 static uint8_t rpt2[2][16];
 int i, j, err = 0;
 static int key_bits[3] = {128, 80, 40};
@@ -547,6 +573,20 @@ int main(int argc, char** argv)
 }
 }
 }
+for (j = 0; j < 3; j++) {
+
+av_cast5_init(cs, Key[j], key_bits[j]);
+memcpy(temp, iv, 8);
+av_cast5_crypt2(cs, rpt2[0], rct2[0], 2, temp, 0);
+memcpy(temp, iv, 8);
+av_cast5_crypt2(cs, rpt2[0], rpt2[0], 2, temp, 1);
+for (i = 0; i < 16; i++) {
+if (rct2[0][i] != rpt2[0][i]) {
+av_log(NULL, AV_LOG_ERROR, "%d %02x %02x\n", i, rct2[0][i], 
rpt2[0][i]);
+err = 1;
+}
+}
+}
 av_free(cs);
 return err;
 }
diff --git a/libavutil/cast5.h b/libavutil/cast5.h
index 913d048..e5cc8b1 100644
--- a/libavutil/cast5.h
+++ b/libavutil/cast5.h
@@ -52,7 +52,7 @@ struct AVCAST5 *av_cast5_alloc(void);
 int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits);
 
 /**
-  * Encrypt or decrypt a buffer using a previously initialized context
+  * Encrypt or decrypt a buffer using a previously initialized context, ECB 
mode only
   *
   * @param ctx an AVCAST5 context
   * @param dst destination array, can be equal to src
@@ -61,6 +61,18 @@ int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, 
int key_bits);
   * @param decrypt 0 for encryption, 1 for decryption
  */
 void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int 
count, int decrypt);
+
+/**
+  * Encrypt or decrypt a buffer using a previously initialized context
+  *
+  * @param ctx an AVCAST5 context
+  * @param dst destination array, can be equal to src
+  * @param src source array, can be equal to dst
+  * @param count number of 8 byte blocks
+  * @param iv initialization vector for CBC mode, NULL for ECB mode
+  * @param decrypt 0 for encryption, 1 for decryption
+ */
+void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, 
int count, uint8_t *iv, int decrypt);
 /**
  * @}
  */

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


[FFmpeg-cvslog] vp9/x86: invert hu_ipred left array ordering.

2014-12-19 Thread Ronald S. Bultje
ffmpeg | branch: master | Ronald S. Bultje  | Mon Dec 15 
22:12:50 2014 -0500| [b6e1711223a4f25f2981417a4b773a65dd0423c1] | committer: 
Michael Niedermayer

vp9/x86: invert hu_ipred left array ordering.

Signed-off-by: Michael Niedermayer 

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

 libavcodec/vp9.c|   26 +++---
 libavcodec/vp9dsp.c |   12 ++--
 libavcodec/x86/vp9intrapred.asm |   18 ++
 3 files changed, 31 insertions(+), 25 deletions(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 07df9ef..2bb2432 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -2347,6 +2347,7 @@ static av_always_inline int check_intra_mode(VP9Context 
*s, int mode, uint8_t **
 uint8_t needs_top:1;
 uint8_t needs_topleft:1;
 uint8_t needs_topright:1;
+uint8_t invert_left:1;
 } edges[N_INTRA_PRED_MODES] = {
 [VERT_PRED]= { .needs_top  = 1 },
 [HOR_PRED] = { .needs_left = 1 },
@@ -2356,7 +2357,7 @@ static av_always_inline int check_intra_mode(VP9Context 
*s, int mode, uint8_t **
 [VERT_RIGHT_PRED]  = { .needs_left = 1, .needs_top = 1, 
.needs_topleft = 1 },
 [HOR_DOWN_PRED]= { .needs_left = 1, .needs_top = 1, 
.needs_topleft = 1 },
 [VERT_LEFT_PRED]   = { .needs_top  = 1, .needs_topright = 1 },
-[HOR_UP_PRED]  = { .needs_left = 1 },
+[HOR_UP_PRED]  = { .needs_left = 1, .invert_left = 1 },
 [TM_VP8_PRED]  = { .needs_left = 1, .needs_top = 1, 
.needs_topleft = 1 },
 [LEFT_DC_PRED] = { .needs_left = 1 },
 [TOP_DC_PRED]  = { .needs_top  = 1 },
@@ -2429,13 +2430,24 @@ static av_always_inline int check_intra_mode(VP9Context 
*s, int mode, uint8_t **
 uint8_t *dst = x == 0 ? dst_edge : dst_inner;
 ptrdiff_t stride = x == 0 ? stride_edge : stride_inner;
 
-if (n_px_need <= n_px_have) {
-for (i = 0; i < n_px_need; i++)
-l[n_px_need - 1 - i] = dst[i * stride - 1];
+if (edges[mode].invert_left) {
+if (n_px_need <= n_px_have) {
+for (i = 0; i < n_px_need; i++)
+l[i] = dst[i * stride - 1];
+} else {
+for (i = 0; i < n_px_have; i++)
+l[i] = dst[i * stride - 1];
+memset(&l[n_px_have], l[n_px_have - 1], n_px_need - 
n_px_have);
+}
 } else {
-for (i = 0; i < n_px_have; i++)
-l[n_px_need - 1 - i] = dst[i * stride - 1];
-memset(l, l[n_px_need - n_px_have], n_px_need - n_px_have);
+if (n_px_need <= n_px_have) {
+for (i = 0; i < n_px_need; i++)
+l[n_px_need - 1 - i] = dst[i * stride - 1];
+} else {
+for (i = 0; i < n_px_have; i++)
+l[n_px_need - 1 - i] = dst[i * stride - 1];
+memset(l, l[n_px_need - n_px_have], n_px_need - n_px_have);
+}
 }
 } else {
 memset(l, 129, 4 << tx);
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c
index 6356add..4d45187 100644
--- a/libavcodec/vp9dsp.c
+++ b/libavcodec/vp9dsp.c
@@ -786,7 +786,7 @@ def_vert_left(32)
 static void hor_up_4x4_c(uint8_t *dst, ptrdiff_t stride,
  const uint8_t *left, const uint8_t *top)
 {
-int l0 = left[3], l1 = left[2], l2 = left[1], l3 = left[0];
+int l0 = left[0], l1 = left[1], l2 = left[2], l3 = left[3];
 
 DST(0,0) = (l0 + l1 + 1) >> 1;
 DST(1,0) = (l0 + l1 * 2 + l2 + 2) >> 2;
@@ -805,17 +805,17 @@ static void hor_up_##size##x##size##_c(uint8_t *dst, 
ptrdiff_t stride, \
 uint8_t v[size*2 - 2]; \
 \
 for (i = 0; i < size - 2; i++) { \
-v[i*2] = (left[size - i - 1] + left[size - i - 2] + 1) >> 1; \
-v[i*2 + 1] = (left[size - i - 1] + left[size - i - 2] * 2 + left[size 
- i - 3] + 2) >> 2; \
+v[i*2] = (left[i] + left[i + 1] + 1) >> 1; \
+v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; \
 } \
-v[size*2 - 4] = (left[1] + left[0] + 1) >> 1; \
-v[size*2 - 3] = (left[1] + left[0] * 3 + 2) >> 2; \
+v[size*2 - 4] = (left[size - 2] + left[size - 1] + 1) >> 1; \
+v[size*2 - 3] = (left[size - 2] + left[size - 1] * 3 + 2) >> 2; \
 \
 for (j = 0; j < size / 2; j++) \
 memcpy(dst + j*stride, v + j*2, size); \
 for (j = size / 2; j < size; j++) { \
 memcpy(dst + j*stride, v + j*2, size*2 - 2 - j*2); \
-memset(dst + j*stride + size*2 - 2 - j*2, left[0], \
+memset(dst + j*stride + size*2 - 2 - j*2, left[size - 1], \
2 + j*2 - size); \
 } \
 }
diff --git a/libavcodec/x86/vp9intrapred.asm b/libavcodec/x86/v

[FFmpeg-cvslog] vp9/x86: intra prediction sse2/32bit support.

2014-12-19 Thread Ronald S. Bultje
ffmpeg | branch: master | Ronald S. Bultje  | Mon Dec 15 
22:13:52 2014 -0500| [bdc1e3e3b27d2b35ea88a964254e311d359aac69] | committer: 
Michael Niedermayer

vp9/x86: intra prediction sse2/32bit support.

Signed-off-by: Michael Niedermayer 

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

 libavcodec/x86/constants.c  |2 +-
 libavcodec/x86/constants.h  |2 +-
 libavcodec/x86/vp9dsp_init.c|  169 +---
 libavcodec/x86/vp9intrapred.asm |  902 ++-
 4 files changed, 805 insertions(+), 270 deletions(-)

diff --git a/libavcodec/x86/constants.c b/libavcodec/x86/constants.c
index aa3df00..d78b896 100644
--- a/libavcodec/x86/constants.c
+++ b/libavcodec/x86/constants.c
@@ -40,7 +40,7 @@ DECLARE_ALIGNED(8,  const uint64_t, ff_pw_53)   =   
0x0035003500350035ULL;
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_64)   = { 0x0040004000400040ULL, 
0x0040004000400040ULL };
 DECLARE_ALIGNED(8,  const uint64_t, ff_pw_96)   =   0x0060006000600060ULL;
 DECLARE_ALIGNED(8,  const uint64_t, ff_pw_128)  =   0x0080008000800080ULL;
-DECLARE_ALIGNED(8,  const uint64_t, ff_pw_255)  =   0x00ff00ff00ff00ffULL;
+DECLARE_ALIGNED(8,  const xmm_reg,  ff_pw_255)  = { 0x00ff00ff00ff00ffULL, 
0x00ff00ff00ff00ffULL };
 DECLARE_ALIGNED(32, const ymm_reg,  ff_pw_256)  = { 0x0100010001000100ULL, 
0x0100010001000100ULL,
 0x0100010001000100ULL, 
0x0100010001000100ULL };
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_512)  = { 0x0200020002000200ULL, 
0x0200020002000200ULL };
diff --git a/libavcodec/x86/constants.h b/libavcodec/x86/constants.h
index e75fff9..1c24dda3 100644
--- a/libavcodec/x86/constants.h
+++ b/libavcodec/x86/constants.h
@@ -42,7 +42,7 @@ extern const uint64_t ff_pw_53;
 extern const xmm_reg  ff_pw_64;
 extern const uint64_t ff_pw_96;
 extern const uint64_t ff_pw_128;
-extern const uint64_t ff_pw_255;
+extern const xmm_reg  ff_pw_255;
 extern const xmm_reg  ff_pw_512;
 extern const xmm_reg  ff_pw_1024;
 extern const xmm_reg  ff_pw_2048;
diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c
index 37173fb..7acf4f7 100644
--- a/libavcodec/x86/vp9dsp_init.c
+++ b/libavcodec/x86/vp9dsp_init.c
@@ -243,40 +243,58 @@ lpf_funcs(88, 16, avx);
 void ff_vp9_ipred_##type##_##size##x##size##_##opt(uint8_t *dst, ptrdiff_t 
stride, \
const uint8_t *l, const 
uint8_t *a)
 
-#define ipred_funcs(type, opt) \
-ipred_func(4, type, opt); \
-ipred_func(8, type, opt); \
-ipred_func(16, type, opt); \
-ipred_func(32, type, opt)
+ipred_func(8, v, mmx);
 
-ipred_funcs(dc, ssse3);
-ipred_funcs(dc_left, ssse3);
-ipred_funcs(dc_top, ssse3);
+#define ipred_dc_funcs(size, opt) \
+ipred_func(size, dc, opt); \
+ipred_func(size, dc_left, opt); \
+ipred_func(size, dc_top, opt)
 
-#undef ipred_funcs
+ipred_dc_funcs(4, mmxext);
+ipred_dc_funcs(8, mmxext);
 
-ipred_func(8, v, mmx);
-ipred_func(16, v, sse2);
-ipred_func(32, v, sse2);
-
-#define ipred_func_set(size, type, opt1, opt2) \
-ipred_func(size, type, opt1); \
-ipred_func(size, type, opt2)
-
-#define ipred_funcs(type, opt1, opt2) \
-ipred_func(4, type, opt1); \
-ipred_func_set(8, type, opt1, opt2); \
-ipred_func_set(16, type, opt1, opt2); \
-ipred_func_set(32, type, opt1, opt2)
-
-ipred_funcs(h, ssse3, avx);
-ipred_funcs(tm, ssse3, avx);
-ipred_funcs(dl, ssse3, avx);
-ipred_funcs(dr, ssse3, avx);
-ipred_funcs(hu, ssse3, avx);
-ipred_funcs(hd, ssse3, avx);
-ipred_funcs(vl, ssse3, avx);
-ipred_funcs(vr, ssse3, avx);
+#define ipred_dir_tm_funcs(size, opt) \
+ipred_func(size, tm, opt); \
+ipred_func(size, dl, opt); \
+ipred_func(size, dr, opt); \
+ipred_func(size, hd, opt); \
+ipred_func(size, hu, opt); \
+ipred_func(size, vl, opt); \
+ipred_func(size, vr, opt)
+
+ipred_dir_tm_funcs(4, mmxext);
+
+ipred_func(16, v, sse);
+ipred_func(32, v, sse);
+
+ipred_dc_funcs(16, sse2);
+ipred_dc_funcs(32, sse2);
+
+#define ipred_dir_tm_h_funcs(size, opt) \
+ipred_dir_tm_funcs(size, opt); \
+ipred_func(size, h, opt)
+
+ipred_dir_tm_h_funcs(8, sse2);
+ipred_dir_tm_h_funcs(16, sse2);
+ipred_dir_tm_h_funcs(32, sse2);
+
+ipred_func(4, h, sse2);
+
+#define ipred_all_funcs(size, opt) \
+ipred_dc_funcs(size, opt); \
+ipred_dir_tm_h_funcs(size, opt)
+
+// FIXME hd/vl_4x4_ssse3 does not exist
+ipred_all_funcs(4, ssse3);
+ipred_all_funcs(8, ssse3);
+ipred_all_funcs(16, ssse3);
+ipred_all_funcs(32, ssse3);
+
+ipred_dir_tm_h_funcs(8, avx);
+ipred_dir_tm_h_funcs(16, avx);
+ipred_dir_tm_h_funcs(32, avx);
+
+ipred_func(32, v, avx);
 
 ipred_func(32, dc, avx2);
 ipred_func(32, dc_left, avx2);
@@ -285,9 +303,14 @@ ipred_func(32, v, avx2);
 ipred_func(32, h, avx2);
 ipred_func(32, tm, avx2);
 
-#undef ipred_funcs
-#undef ipred_func_set
+ipred_dc_funcs(32, avx2);
+ipred_func(32, h, avx2);
+ipred_func(32, tm, avx2);
+
 #undef ipred_func
+#undef ipred_dir_tm_h_funcs
+#undef ipred_dir_tm_funcs
+#undef ipred_dc_funcs
 
 #endif /* HA

[FFmpeg-cvslog] Merge commit 'cee4490b521fd0d02476d46aa2598af24fb8d686'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:36:25 2014 +0100| [e67496fe9db3a25ac1bc08bd77eca95b79d25cac] | committer: 
Michael Niedermayer

Merge commit 'cee4490b521fd0d02476d46aa2598af24fb8d686'

* commit 'cee4490b521fd0d02476d46aa2598af24fb8d686':
  on2avc: check number of channels

See: 550f3e9df3410b3dd975e590042c0d83e20a8da3
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] on2avc: check number of channels

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Oct  4 
22:15:07 2014 +0200| [cee4490b521fd0d02476d46aa2598af24fb8d686] | committer: 
Anton Khirnov

on2avc: check number of channels

Fixes invalid memory access.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8549
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov 

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

 libavcodec/on2avc.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index deaa2b4..c00339f 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -918,6 +918,10 @@ static av_cold int on2avc_decode_init(AVCodecContext 
*avctx)
 av_log(avctx, AV_LOG_ERROR, "0x500 version should be mono\n");
 return AVERROR_INVALIDDATA;
 }
+if (avctx->channels > 2) {
+av_log(avctx, AV_LOG_ERROR, "Only 1 or 2 channels are supported.\n");
+return AVERROR(EINVAL);
+}
 if (avctx->channels == 2)
 av_log(avctx, AV_LOG_WARNING,
"Stereo mode support is not good, patch is welcome\n");

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


[FFmpeg-cvslog] Merge commit 'd423dd72be451462c6fb1cbbe313bed0194001ab'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:30:25 2014 +0100| [c266d0e1bd56272939feb491b927a27c0953] | committer: 
Michael Niedermayer

Merge commit 'd423dd72be451462c6fb1cbbe313bed0194001ab'

* commit 'd423dd72be451462c6fb1cbbe313bed0194001ab':
  smc: fix the bounds check

Conflicts:
libavcodec/smc.c

See: c727401aa9d62335e89d118a5b4e202edf39d905
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] smc: fix the bounds check

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Oct  3 
22:50:45 2014 +0200| [d423dd72be451462c6fb1cbbe313bed0194001ab] | committer: 
Anton Khirnov

smc: fix the bounds check

Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov 

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

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

diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 46903ab..c6541da 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -70,7 +70,7 @@ typedef struct SmcContext {
 row_ptr += stride * 4; \
 } \
 total_blocks--; \
-if (total_blocks < 0) \
+if (total_blocks < !!n_blocks) \
 { \
 av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went 
negative (this should not happen)\n"); \
 return; \

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


[FFmpeg-cvslog] Merge commit '0b39ac6f54505a538c21fe49a626de94c518c903'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:14:09 2014 +0100| [8af8833591d3efb26dcb0bb6f660cd0f3f107679] | committer: 
Michael Niedermayer

Merge commit '0b39ac6f54505a538c21fe49a626de94c518c903'

* commit '0b39ac6f54505a538c21fe49a626de94c518c903':
  gifdec: refactor interleave end handling

Conflicts:
libavcodec/gifdec.c

See: 8f1457864be8fb9653643519dea1c6492f1dde57
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] gifdec: refactor interleave end handling

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Oct  3 
20:15:52 2014 +0200| [0b39ac6f54505a538c21fe49a626de94c518c903] | committer: 
Anton Khirnov

gifdec: refactor interleave end handling

Fixes invalid writes with very small image heights.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov 

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

 libavcodec/gifdec.c |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index cdb7f23..df5ab78 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -125,26 +125,21 @@ static int gif_read_image(GifState *s, AVFrame *frame)
 case 1:
 y1 += 8;
 ptr += linesize * 8;
-if (y1 >= height) {
-y1 = pass ? 2 : 4;
-ptr = ptr1 + linesize * y1;
-pass++;
-}
 break;
 case 2:
 y1 += 4;
 ptr += linesize * 4;
-if (y1 >= height) {
-y1 = 1;
-ptr = ptr1 + linesize;
-pass++;
-}
 break;
 case 3:
 y1 += 2;
 ptr += linesize * 2;
 break;
 }
+while (y1 >= height) {
+y1  = 4 >> pass;
+ptr = ptr1 + linesize * y1;
+pass++;
+}
 } else {
 ptr += linesize;
 }

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


[FFmpeg-cvslog] gifdec: refactor interleave end handling

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Oct  3 
20:15:52 2014 +0200| [0b39ac6f54505a538c21fe49a626de94c518c903] | committer: 
Anton Khirnov

gifdec: refactor interleave end handling

Fixes invalid writes with very small image heights.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov 

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

 libavcodec/gifdec.c |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index cdb7f23..df5ab78 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -125,26 +125,21 @@ static int gif_read_image(GifState *s, AVFrame *frame)
 case 1:
 y1 += 8;
 ptr += linesize * 8;
-if (y1 >= height) {
-y1 = pass ? 2 : 4;
-ptr = ptr1 + linesize * y1;
-pass++;
-}
 break;
 case 2:
 y1 += 4;
 ptr += linesize * 4;
-if (y1 >= height) {
-y1 = 1;
-ptr = ptr1 + linesize;
-pass++;
-}
 break;
 case 3:
 y1 += 2;
 ptr += linesize * 2;
 break;
 }
+while (y1 >= height) {
+y1  = 4 >> pass;
+ptr = ptr1 + linesize * y1;
+pass++;
+}
 } else {
 ptr += linesize;
 }

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


[FFmpeg-cvslog] Merge commit '0b39ac6f54505a538c21fe49a626de94c518c903'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:14:09 2014 +0100| [8b1fb3db0b07cda6dcd2261debcd8c406b1e] | committer: 
Michael Niedermayer

Merge commit '0b39ac6f54505a538c21fe49a626de94c518c903'

* commit '0b39ac6f54505a538c21fe49a626de94c518c903':
  gifdec: refactor interleave end handling

Conflicts:
libavcodec/gifdec.c

See: 8f1457864be8fb9653643519dea1c6492f1dde57
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'd423dd72be451462c6fb1cbbe313bed0194001ab'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:15:42 2014 +0100| [d1bd07d7662d38a4f1bce4b647635674446f7b84] | committer: 
Michael Niedermayer

Merge commit 'd423dd72be451462c6fb1cbbe313bed0194001ab'

* commit 'd423dd72be451462c6fb1cbbe313bed0194001ab':
  smc: fix the bounds check

Conflicts:
libavcodec/smc.c

See: c727401aa9d62335e89d118a5b4e202edf39d905
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] smc: fix the bounds check

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Oct  3 
22:50:45 2014 +0200| [d423dd72be451462c6fb1cbbe313bed0194001ab] | committer: 
Anton Khirnov

smc: fix the bounds check

Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov 

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

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

diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 46903ab..c6541da 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -70,7 +70,7 @@ typedef struct SmcContext {
 row_ptr += stride * 4; \
 } \
 total_blocks--; \
-if (total_blocks < 0) \
+if (total_blocks < !!n_blocks) \
 { \
 av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went 
negative (this should not happen)\n"); \
 return; \

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


[FFmpeg-cvslog] lavf/rtp_h261: Replace restrict with av_restrict.

2014-12-19 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Fri Dec 19 
13:25:51 2014 +0100| [96ff6d38050e42ae33b1a691109e24748bd62d5d] | committer: 
Carl Eugen Hoyos

lavf/rtp_h261: Replace restrict with av_restrict.

Fixes compilation on Windows.

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

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

diff --git a/libavformat/rtpenc_h261.c b/libavformat/rtpenc_h261.c
index 9930b71..fc50285 100644
--- a/libavformat/rtpenc_h261.c
+++ b/libavformat/rtpenc_h261.c
@@ -24,8 +24,8 @@
 
 #define RTP_H261_HEADER_SIZE 4
 
-static const uint8_t *find_resync_marker_reverse(const uint8_t *restrict start,
- const uint8_t *restrict end)
+static const uint8_t *find_resync_marker_reverse(const uint8_t *av_restrict 
start,
+ const uint8_t *av_restrict 
end)
 {
 const uint8_t *p = end - 1;
 start += 1; /* Make sure we never return the original start. */

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


[FFmpeg-cvslog] mmvideo: check frame dimensions

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sun Dec 14 
21:01:59 2014 +0100| [17ba719d9ba30c970f65747f42d5fbb1e447ca28] | committer: 
Anton Khirnov

mmvideo: check frame dimensions

The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

 libavcodec/mmvideo.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index d80c832..25124a3 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -61,6 +61,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
 
 avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
+if (!avctx->width || !avctx->height ||
+(avctx->width & 1) || (avctx->height & 1)) {
+av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
+   avctx->width, avctx->height);
+return AVERROR(EINVAL);
+}
+
 s->frame = av_frame_alloc();
 if (!s->frame)
 return AVERROR(ENOMEM);

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


[FFmpeg-cvslog] Merge commit '17ba719d9ba30c970f65747f42d5fbb1e447ca28'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
13:04:35 2014 +0100| [6c7b153d97b5e283d3a06096dc9b3b64ed756fdb] | committer: 
Michael Niedermayer

Merge commit '17ba719d9ba30c970f65747f42d5fbb1e447ca28'

* commit '17ba719d9ba30c970f65747f42d5fbb1e447ca28':
  mmvideo: check frame dimensions

See: 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
12:56:08 2014 +0100| [f346e37aa27475b4d2153f3606c7d47847854de3] | committer: 
Michael Niedermayer

Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'

* commit '88626e5af8d006e67189bf10b96b982502a7e8ad':
  jvdec: check frame dimensions

See: 105654e376a736d243aef4a1d121abebce912e6b
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] jvdec: check frame dimensions

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sun Dec 14 
21:01:59 2014 +0100| [88626e5af8d006e67189bf10b96b982502a7e8ad] | committer: 
Anton Khirnov

jvdec: check frame dimensions

The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

 libavcodec/jvdec.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index bb347e0..2a7aa10 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
 JvContext *s = avctx->priv_data;
 
+if (!avctx->width || !avctx->height ||
+(avctx->width & 7) || (avctx->height & 7)) {
+av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
+   avctx->width, avctx->height);
+return AVERROR(EINVAL);
+}
+
 s->frame = av_frame_alloc();
 if (!s->frame)
 return AVERROR(ENOMEM);

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


[FFmpeg-cvslog] Merge commit '809c3023b699c54c90511913d3b6140dd2436550'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
12:45:56 2014 +0100| [6c68522a2aa8c3fc664482ab8a18c991039c78aa] | committer: 
Michael Niedermayer

Merge commit '809c3023b699c54c90511913d3b6140dd2436550'

* commit '809c3023b699c54c90511913d3b6140dd2436550':
  mjpegdec: check for pixel format changes

Conflicts:
libavcodec/mjpegdec.c

See: 5c378d6a6df8243f06c87962b873bd563e58cd39
See: a2f680c7bc7642c687aeb4e14d00ac74833c7a09
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mjpegdec: check for pixel format changes

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sun Dec 14 
20:52:13 2014 +0100| [809c3023b699c54c90511913d3b6140dd2436550] | committer: 
Anton Khirnov

mjpegdec: check for pixel format changes

Fixes possible invalid memory access.

Based on code by Michael Niedermayer 

CC: libav-sta...@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

 libavcodec/mjpegdec.c |   40 +++-
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 01e11be..3ef9e82 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -220,18 +220,20 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
 
 int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 {
-int len, nb_components, i, width, height, pix_fmt_id, ret;
+int h_count[MAX_COMPONENTS] = { 0 };
+int v_count[MAX_COMPONENTS] = { 0 };
+int len, nb_components, i, width, height, bits, pix_fmt_id, ret;
 
 /* XXX: verify len field validity */
 len = get_bits(&s->gb, 16);
-s->bits = get_bits(&s->gb, 8);
+bits= get_bits(&s->gb, 8);
 
 if (s->pegasus_rct)
-s->bits = 9;
-if (s->bits == 9 && !s->pegasus_rct)
+bits = 9;
+if (bits == 9 && !s->pegasus_rct)
 s->rct  = 1;// FIXME ugly
 
-if (s->bits != 8 && !s->lossless) {
+if (bits != 8 && !s->lossless) {
 av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
 return -1;
 }
@@ -258,7 +260,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 return AVERROR_INVALIDDATA;
 }
 }
-if (s->ls && !(s->bits <= 8 || nb_components == 1)) {
+if (s->ls && !(bits <= 8 || nb_components == 1)) {
 avpriv_report_missing_feature(s->avctx,
   "JPEG-LS that is not <= 8 "
   "bits/component or 16-bit gray");
@@ -270,25 +272,25 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 for (i = 0; i < nb_components; i++) {
 /* component id */
 s->component_id[i] = get_bits(&s->gb, 8) - 1;
-s->h_count[i]  = get_bits(&s->gb, 4);
-s->v_count[i]  = get_bits(&s->gb, 4);
+h_count[i] = get_bits(&s->gb, 4);
+v_count[i] = get_bits(&s->gb, 4);
 /* compute hmax and vmax (only used in interleaved case) */
-if (s->h_count[i] > s->h_max)
-s->h_max = s->h_count[i];
-if (s->v_count[i] > s->v_max)
-s->v_max = s->v_count[i];
+if (h_count[i] > s->h_max)
+s->h_max = h_count[i];
+if (v_count[i] > s->v_max)
+s->v_max = v_count[i];
 s->quant_index[i] = get_bits(&s->gb, 8);
 if (s->quant_index[i] >= 4)
 return AVERROR_INVALIDDATA;
-if (!s->h_count[i] || !s->v_count[i]) {
+if (!h_count[i] || !v_count[i]) {
 av_log(s->avctx, AV_LOG_ERROR,
"Invalid sampling factor in component %d %d:%d\n",
-   i, s->h_count[i], s->v_count[i]);
+   i, h_count[i], v_count[i]);
 return AVERROR_INVALIDDATA;
 }
 
 av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n",
-   i, s->h_count[i], s->v_count[i],
+   i, h_count[i], v_count[i],
s->component_id[i], s->quant_index[i]);
 }
 
@@ -301,10 +303,14 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 s->rgb = 1;
 
 /* if different size, realloc/alloc picture */
-/* XXX: also check h_count and v_count */
-if (width != s->width || height != s->height) {
+if (width != s->width || height != s->height || bits != s->bits ||
+memcmp(s->h_count, h_count, sizeof(h_count))||
+memcmp(s->v_count, v_count, sizeof(v_count))) {
 s->width  = width;
 s->height = height;
+s->bits   = bits;
+memcpy(s->h_count, h_count, sizeof(h_count));
+memcpy(s->v_count, v_count, sizeof(v_count));
 s->interlaced = 0;
 
 /* test interlaced mode */

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


[FFmpeg-cvslog] mov: avoid a memleak when multiple stss boxes are present

2014-12-19 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Aug 12 
14:39:10 2014 +| [64f7575fbd64e5b65d5c644347408588c776f1fe] | committer: 
Anton Khirnov

mov: avoid a memleak when multiple stss boxes are present

CC: libav-sta...@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4590a2d..aa81661 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1819,6 +1819,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 }
 if (entries >= UINT_MAX / sizeof(int))
 return AVERROR_INVALIDDATA;
+av_freep(&sc->keyframes);
 sc->keyframes = av_malloc(entries * sizeof(int));
 if (!sc->keyframes)
 return AVERROR(ENOMEM);

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


[FFmpeg-cvslog] Merge commit '64f7575fbd64e5b65d5c644347408588c776f1fe'

2014-12-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Dec 19 
12:24:36 2014 +0100| [24af050c2fa9c28c85f68ac5425fc3fbaa826343] | committer: 
Michael Niedermayer

Merge commit '64f7575fbd64e5b65d5c644347408588c776f1fe'

* commit '64f7575fbd64e5b65d5c644347408588c776f1fe':
  mov: avoid a memleak when multiple stss boxes are present

Conflicts:
libavformat/mov.c

See: 5ab882d7283f57560c889919c35f2688253b1d9c
Merged-by: Michael Niedermayer 

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



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