Re: [libav-devel] [PATCH] swscale: fix NULL checking in sws_alloc_context()

2013-01-03 Thread Derek Buitenhuis
On 04/01/2013 12:08 AM, Xi Wang wrote: > Several functions expect sws_alloc_context() to return NULL when > out of memory, as follows. > > if (!(context = sws_alloc_context())) > return NULL; NIT: Just for completeness: This is from like 1719 of libswscale/utils.c > SwsContext *

Re: [libav-devel] [PATCH] mxfdec: fix NULL pointer checking in mxf_get_sorted_table_segments()

2013-01-03 Thread Derek Buitenhuis
On 04/01/2013 12:06 AM, Xi Wang wrote: > -if (!sorted_segments || !unsorted_segments) { > -av_freep(sorted_segments); > +if (!*sorted_segments || !unsorted_segments) { > +av_freep(*sorted_segments); The changed check looks OK to my tired eyes with the available context, but

[libav-devel] [PATCH] swscale: fix NULL checking in sws_alloc_context()

2013-01-03 Thread Xi Wang
Several functions expect sws_alloc_context() to return NULL when out of memory, as follows. if (!(context = sws_alloc_context())) return NULL; This patch fixes sws_alloc_context() to return NULL in that case. Signed-off-by: Xi Wang --- libswscale/utils.c |8 1 file cha

[libav-devel] [PATCH] mxfdec: fix NULL pointer checking in mxf_get_sorted_table_segments()

2013-01-03 Thread Xi Wang
The following out-of-memory check is broken. *sorted_segments = av_mallocz(...); if (!sorted_segments) { ... } The correct NULL check should use *sorted_segments. Signed-off-by: Xi Wang --- libavformat/mxfdec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[libav-devel] hlsenc:Fixed timestamps

2013-01-03 Thread kanglin
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 9eed957..4b3973c 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -251,7 +251,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) HLSContext *hls = s->priv_data; AVFormatContext *oc = hls->avf;

Re: [libav-devel] [PATCH] pthread/mpegvideo: detect and block attempts to init frames after setup.

2013-01-03 Thread Ronald S. Bultje
Hi, On Thu, Jan 3, 2013 at 3:34 PM, Reinhard Tartler wrote: > On Fri, Jan 4, 2013 at 12:24 AM, Ronald S. Bultje wrote: >> Hi, >> >> On Thu, Jan 3, 2013 at 3:03 PM, Reinhard Tartler wrote: >>> From: Michael Niedermayer >>> >>> This fixes race conditions that ultimately lead to memory corruption

Re: [libav-devel] [PATCH] mp3on4: allocate a large enough frame.

2013-01-03 Thread Reinhard Tartler
On Fri, Jan 4, 2013 at 12:21 AM, Justin Ruggles wrote: > On 01/03/2013 05:41 PM, Reinhard Tartler wrote: >> From: Michael Niedermayer >> >> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind >> Fixes: CVE-2012-2797 >> (based on FFmpeg commit cca9528524c7a4b91451f4322bd50849af5d057e) >> >> CC:

Re: [libav-devel] [PATCH] pthread/mpegvideo: detect and block attempts to init frames after setup.

2013-01-03 Thread Reinhard Tartler
On Fri, Jan 4, 2013 at 12:24 AM, Ronald S. Bultje wrote: > Hi, > > On Thu, Jan 3, 2013 at 3:03 PM, Reinhard Tartler wrote: >> From: Michael Niedermayer >> >> This fixes race conditions that ultimately lead to memory corruption. >> >> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind >> Sign

Re: [libav-devel] [PATCH] pthread/mpegvideo: detect and block attempts to init frames after setup.

2013-01-03 Thread Ronald S. Bultje
Hi, On Thu, Jan 3, 2013 at 3:03 PM, Reinhard Tartler wrote: > From: Michael Niedermayer > > This fixes race conditions that ultimately lead to memory corruption. > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > Signed-off-by: Michael Niedermayer > (cherry picked from commit 59a4b735

Re: [libav-devel] [PATCH] mp3on4: allocate a large enough frame.

2013-01-03 Thread Justin Ruggles
On 01/03/2013 05:41 PM, Reinhard Tartler wrote: > From: Michael Niedermayer > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > Fixes: CVE-2012-2797 > (based on FFmpeg commit cca9528524c7a4b91451f4322bd50849af5d057e) > > CC: libav-sta...@libav.org > > Signed-off-by: Michael Niedermayer

[libav-devel] [PATCH] pthread/mpegvideo: detect and block attempts to init frames after setup.

2013-01-03 Thread Reinhard Tartler
From: Michael Niedermayer This fixes race conditions that ultimately lead to memory corruption. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer (cherry picked from commit 59a4b73531428d2f420b4dad545172c8483ced0f) Fixes: CVE-2012-2774 CC: libav-sta...@li

[libav-devel] [PATCH] mp3on4: allocate a large enough frame.

2013-01-03 Thread Reinhard Tartler
From: Michael Niedermayer Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Fixes: CVE-2012-2797 (based on FFmpeg commit cca9528524c7a4b91451f4322bd50849af5d057e) CC: libav-sta...@libav.org Signed-off-by: Michael Niedermayer Signed-off-by: Reinhard Tartler --- libavcodec/mpegaudiodec.c

[libav-devel] KLVPacket synchronous encoding

2013-01-03 Thread Shawn Donnelly
I would like to add KLV meatadata to my H.264 video's I am already creating. I am encoding with: //snip avcodec_encode_video(pCodecCtx,outbuf,outbuf_size,ppicture); pkt.stream_index= pVideoStream->index; pkt.data= outbuf; pkt.size= out_size; av_interleaved_write_frame(pFormatCtx, &pkt); I think

Re: [libav-devel] [PATCH] oggdec: Initialize stream index to -1 in ogg_packet.

2013-01-03 Thread Luca Barbato
On 03/01/13 19:20, Anton Khirnov wrote: > From: Reimar Döffinger > > The previous method of having to initialize it outside lead > to incorrect code: even if it was initialized, it usually was > only initialized once, thus a packet that could not be matched > to any stream would just be processed

Re: [libav-devel] [PATCH] dca_parser: Handle loss of bitstream sync better

2013-01-03 Thread John Stebbins
On 01/03/2013 12:36 AM, Diego Biurrun wrote: > On Wed, Jan 02, 2013 at 11:49:40AM -0800, John Stebbins wrote: >> A change in framesize caused a perpetual loss of synchronization. So >> when the sync pattern is not found where it is expected, reset and >> recalculate the framesize. >> --- a/libavcod

[libav-devel] [PATCH] oggdec: Initialize stream index to -1 in ogg_packet.

2013-01-03 Thread Anton Khirnov
From: Reimar Döffinger The previous method of having to initialize it outside lead to incorrect code: even if it was initialized, it usually was only initialized once, thus a packet that could not be matched to any stream would just be processed with the return values from the previous call. Sig

Re: [libav-devel] [PATCH] Update release notes for the 9 release.

2013-01-03 Thread Reinhard Tartler
On Thu, Jan 3, 2013 at 6:04 PM, Anton Khirnov wrote: > Add a paragraph about MSVC and mention 24-bit FLAC encoding. > --- > doc/RELEASE_NOTES | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/doc/RELEASE_NOTES b/doc/RELEASE_NOTES > index bb1aecb..4fb07c6 100644

[libav-devel] [PATCH] Update release notes for the 9 release.

2013-01-03 Thread Anton Khirnov
Add a paragraph about MSVC and mention 24-bit FLAC encoding. --- doc/RELEASE_NOTES | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/RELEASE_NOTES b/doc/RELEASE_NOTES index bb1aecb..4fb07c6 100644 --- a/doc/RELEASE_NOTES +++ b/doc/RELEASE_NOTES @@ -42,12 +42,18 @

Re: [libav-devel] [PATCH 4/4] libvpx: make vp8 and vp9 selectable

2013-01-03 Thread Luca Barbato
On 03/01/13 17:10, Tim W. wrote: > On Jan 3, 2013, at 4:37 PM, Luca Barbato wrote: > >> +#if CONFIG_LIBVPX_VP9_ENCODER >> static av_cold int vp9_init(AVCodecContext *avctx) >> { >> return vpx_init(avctx, &vpx_codec_vp9_cx_algo); >> @@ -613,7 +615,6 @@ static const AVClass class_vp9 = { >>

Re: [libav-devel] [PATCH 3/4] libvpx: support vp9

2013-01-03 Thread Luca Barbato
On 03/01/13 16:50, Kostya Shishkov wrote: > On Thu, Jan 03, 2013 at 04:37:16PM +0100, Luca Barbato wrote: >> This feature is experimental use at your risk >> --- >> libavcodec/allcodecs.c | 2 ++ >> libavcodec/codec_desc.c | 7 +++ >> libavcodec/libvpxdec.c | 26 --

Re: [libav-devel] [PATCH 4/4] libvpx: make vp8 and vp9 selectable

2013-01-03 Thread Johan Andersson
On Thu, Jan 03, 2013 at 04:37:17PM +0100, Luca Barbato wrote: > Support older libvpx versions. > --- > configure | 16 ++-- > libavcodec/Makefile| 6 -- > libavcodec/allcodecs.c | 5 +++-- > libavcodec/libvpxdec.c | 17 +++-- > libavcodec/libvpxenc.c

Re: [libav-devel] [PATCH 4/4] libvpx: make vp8 and vp9 selectable

2013-01-03 Thread Tim W.
On Jan 3, 2013, at 4:37 PM, Luca Barbato wrote: > +#if CONFIG_LIBVPX_VP9_ENCODER > static av_cold int vp9_init(AVCodecContext *avctx) > { > return vpx_init(avctx, &vpx_codec_vp9_cx_algo); > @@ -613,7 +615,6 @@ static const AVClass class_vp9 = { > .version= LIBAVUTIL_VERSION_INT, > };

Re: [libav-devel] [PATCH 3/4] libvpx: support vp9

2013-01-03 Thread Kostya Shishkov
On Thu, Jan 03, 2013 at 04:37:16PM +0100, Luca Barbato wrote: > This feature is experimental use at your risk > --- > libavcodec/allcodecs.c | 2 ++ > libavcodec/codec_desc.c | 7 +++ > libavcodec/libvpxdec.c | 26 -- > libavcodec/libvpxenc.c | 38 +

[libav-devel] [PATCH 4/4] libvpx: make vp8 and vp9 selectable

2013-01-03 Thread Luca Barbato
Support older libvpx versions. --- configure | 16 ++-- libavcodec/Makefile| 6 -- libavcodec/allcodecs.c | 5 +++-- libavcodec/libvpxdec.c | 17 +++-- libavcodec/libvpxenc.c | 35 +++ 5 files changed, 47 insertions(+),

[libav-devel] [PATCH 3/4] libvpx: support vp9

2013-01-03 Thread Luca Barbato
This feature is experimental use at your risk --- libavcodec/allcodecs.c | 2 ++ libavcodec/codec_desc.c | 7 +++ libavcodec/libvpxdec.c | 26 -- libavcodec/libvpxenc.c | 38 -- 4 files changed, 69 insertions(+), 4 deletions(-)

[libav-devel] [PATCH 2/4] nut: support vp9 tag

2013-01-03 Thread Luca Barbato
--- libavformat/nut.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/nut.c b/libavformat/nut.c index 196e04e..9267226 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -39,6 +39,7 @@ const AVCodecTag ff_nut_data_tags[] = { }; const AVCodecTag ff_nut_video_tags[] = { +

[libav-devel] [PATCH 1/4] mkv: support vp9 tag

2013-01-03 Thread Luca Barbato
From: Tom Finegan --- libavcodec/avcodec.h | 1 + libavformat/matroska.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e6b8ec6..e186fb6 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -265,6 +265,7 @@ enum AVCodecID {

[libav-devel] [RFC] Supporting vp9

2013-01-03 Thread Luca Barbato
Here the set of patches to support libvpx vp9 branches. Some more work could be helpful regarding vp9 and vp8 selection since it does not let you explicitly require (e.g. fail if not present) vp9. Beside that it seems working correctly. Luca Barbato (3): nut: support vp9 tag libvpx: support v

Re: [libav-devel] [PATCH 2/4] rtpdec: Support sending RTCP feedback packets

2013-01-03 Thread Luca Barbato
On 03/01/13 14:43, Martin Storsjö wrote: > This sends NACK for missed packets and PLI (picture loss indication) > if a depacketizer indicates that it needs a new keyframe, according > to RFC 4585. > > This is only enabled if the SDP indicated that feedback is supported > (via the AVPF or SAVPF pro

Re: [libav-devel] [PATCH 1/4] rtpdec: Store the dynamic payload handler in the rtpdec context

2013-01-03 Thread Luca Barbato
On 03/01/13 14:43, Martin Storsjö wrote: > This allows calling other dynamic payload handler functions if > needed. > > Alternatively, keep the parse_packet field as such, to minimize > the patch. > --- > libavformat/rtpdec.c | 17 + > libavformat/rtpdec.h |2 +- > 2 files c

[libav-devel] [PATCH 4/4] rtpdec_vp8: Don't return anything until a keyframe has been received

2013-01-03 Thread Martin Storsjö
This allows indicating to the peer that we need a keyframe, if the sequence is intact otherwise but no keyframe has been received yet. --- libavformat/rtpdec_vp8.c |4 1 file changed, 4 insertions(+) diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index a402edc..69ffa26

[libav-devel] [PATCH 3/4] rtpdec_vp8: Request a keyframe if vital data is lost

2013-01-03 Thread Martin Storsjö
--- libavformat/rtpdec_vp8.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index 18275a5..a402edc 100644 --- a/libavformat/rtpdec_vp8.c +++ b/libavformat/rtpdec_vp8.c @@ -260,6 +260,11 @@ static void vp8_free_context(PayloadContext

[libav-devel] [PATCH 2/4] rtpdec: Support sending RTCP feedback packets

2013-01-03 Thread Martin Storsjö
This sends NACK for missed packets and PLI (picture loss indication) if a depacketizer indicates that it needs a new keyframe, according to RFC 4585. This is only enabled if the SDP indicated that feedback is supported (via the AVPF or SAVPF profile names). The feedback packets are throttled to a

[libav-devel] [PATCH 1/4] rtpdec: Store the dynamic payload handler in the rtpdec context

2013-01-03 Thread Martin Storsjö
This allows calling other dynamic payload handler functions if needed. Alternatively, keep the parse_packet field as such, to minimize the patch. --- libavformat/rtpdec.c | 17 + libavformat/rtpdec.h |2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/liba

Re: [libav-devel] [PATCH] lavr: fix missing " in header documentation

2013-01-03 Thread Martin Storsjö
On Thu, 3 Jan 2013, Peter Meerwald wrote: From: Peter Meerwald Signed-off-by: Peter Meerwald --- libavresample/avresample.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavresample/avresample.h b/libavresample/avresample.h index 34998aa..0012787 100644 --- a/libavre

[libav-devel] [PATCH] lavr: fix missing " in header documentation

2013-01-03 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- libavresample/avresample.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavresample/avresample.h b/libavresample/avresample.h index 34998aa..0012787 100644 --- a/libavresample/avresample.h +++ b/libavresample/avr

Re: [libav-devel] [PATCH] build: Avoid detecting bogus components named 'x'

2013-01-03 Thread Martin Storsjö
On Wed, 2 Jan 2013, Martin Storsjö wrote: On Wed, 2 Jan 2013, Diego Biurrun wrote: From: Clément Bœsch The function find_things() in configure is confused by component registration calls as part of multiline macros defining combined component registration. Coalesce those macros into one lin

Re: [libav-devel] [PATCH] avprobe: also output dar/par if only defined in stream

2013-01-03 Thread Jan Gerber
On 01/03/2013 12:03 PM, Anton Khirnov wrote: > Based on a patch by Jan Gerber > --- > Duplicating the code your patch is not very pretty, I'd prefer something like > this instead. LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.l

Re: [libav-devel] [PATCH 1/5] lavu/dict: add av_dict_set_string()

2013-01-03 Thread Anton Khirnov
On Wed, 2 Jan 2013 17:04:23 -0500, Justin Ruggles wrote: > Can be used to set multiple key/value pairs from a string. > --- > better error handling in parse_key_value_pair() > LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.or

[libav-devel] [PATCH] avprobe: also output dar/par if only defined in stream

2013-01-03 Thread Anton Khirnov
Based on a patch by Jan Gerber --- Duplicating the code your patch is not very pretty, I'd prefer something like this instead. --- avprobe.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/avprobe.c b/avprobe.c index 4da9621..38b74a3 100644 --- a/avprobe.c ++

Re: [libav-devel] [PATCH] dca_parser: Handle loss of bitstream sync better

2013-01-03 Thread Diego Biurrun
On Wed, Jan 02, 2013 at 11:49:40AM -0800, John Stebbins wrote: > A change in framesize caused a perpetual loss of synchronization. So > when the sync pattern is not found where it is expected, reset and > recalculate the framesize. > --- a/libavcodec/dca_parser.c > +++ b/libavcodec/dca_parser.c > @