Martin Storsjö | 1 Feb 2012 03:06
Favicon

movdec: Ignore sample_degradation_priority bits when checking first_sample_flags

ffmpeg | branch: master | Martin Storsjö <martin <at> martin.st> | Wed Jan 18 15:12:10 2012 +0200|
[75ab1e62d4187c8ad627835ee8fcf38501477caf] | committer: Martin Storsjö

movdec: Ignore sample_degradation_priority bits when checking first_sample_flags

This makes the first packet of a track fragment run to get
the keyframe flag set properly if sample_degradation_priority
is nonzero.

This makes the keyframes flag be set properly for ismv files
created by Microsoft.

Signed-off-by: Martin Storsjö <martin <at> martin.st>

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

 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index b7d8a55..0ce32e0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
 <at>  <at>  -2250,7 +2250,7  <at>  <at>  static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         sc->ctts_data[sc->ctts_count].duration = (flags & 0x800) ? avio_rb32(pb) : 0;
         sc->ctts_count++;
         if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO ||
-             (flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000))
+             (flags & 0x004 && !i && !(sample_flags & 0xffff0000)) || sample_flags & 0x2000000))
(Continue reading)

Diego Biurrun | 1 Feb 2012 03:06
Favicon

x86: Give RV40 init file a more suitable name.

ffmpeg | branch: master | Diego Biurrun <diego <at> biurrun.de> | Mon Jan 30 09:56:28 2012 +0100|
[91bafb52ae31d85314e77ba84dc1e10348cd114e] | committer: Diego Biurrun

x86: Give RV40 init file a more suitable name.

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

 libavcodec/x86/Makefile                      |    2 +-
 libavcodec/x86/{rv40dsp.c => rv40dsp_init.c} |    0
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 0576c3a..2f29138 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
 <at>  <at>  -27,7 +27,7  <at>  <at>  MMX-OBJS-$(CONFIG_H264PRED)            += x86/h264_intrapred_init.o
 MMX-OBJS-$(CONFIG_RV30_DECODER)        += x86/rv34dsp_init.o
 YASM-OBJS-$(CONFIG_RV30_DECODER)       += x86/rv34dsp.o
 MMX-OBJS-$(CONFIG_RV40_DECODER)        += x86/rv34dsp_init.o            \
-                                          x86/rv40dsp.o
+                                          x86/rv40dsp_init.o
 YASM-OBJS-$(CONFIG_RV40_DECODER)       += x86/rv34dsp.o

 YASM-OBJS-$(CONFIG_VC1_DECODER)        += x86/vc1dsp_yasm.o
diff --git a/libavcodec/x86/rv40dsp.c b/libavcodec/x86/rv40dsp_init.c
similarity index 100%
rename from libavcodec/x86/rv40dsp.c
rename to libavcodec/x86/rv40dsp_init.c
(Continue reading)

Martin Storsjö | 1 Feb 2012 03:06
Favicon

flvdec: Interpret a toplevel 'object' type metadata item as normal metadata , too

ffmpeg | branch: master | Martin Storsjö <martin <at> martin.st> | Mon Jan 30 22:47:40 2012 +0200|
[89f6e8a20c07ad779ca374fdc5b16a22a37a6150] | committer: Martin Storsjö

flvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too

Previously, we've only passed the key string on to the recursive
amf_parse_object for the mixedarray type, not for 'object'. By
passing the key string on, the recursive amf_parse_object can
store the amf objects as metadata.

This kind of data was seen in data from XSplit Broadcaster, received
over RTMP via Wowza. This patch allows reading this metadata.

Signed-off-by: Martin Storsjö <martin <at> martin.st>

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

 libavformat/flvdec.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 9296ef9..ad38653 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
 <at>  <at>  -240,22 +240,18  <at>  <at>  static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
             if(amf_get_string(ioc, str_val, sizeof(str_val)) < 0)
                 return -1;
             break;
-        case AMF_DATA_TYPE_OBJECT: {
(Continue reading)

Justin Ruggles | 1 Feb 2012 03:06
Favicon

mpc7: align local temp buffer

ffmpeg | branch: master | Justin Ruggles <justin.ruggles <at> gmail.com> | Mon Jan 30 14:29:05 2012 -0500|
[eac31dd163cd9168860aeed88112455cb44cc4f1] | committer: Justin Ruggles

mpc7: align local temp buffer

DSPContext.bswap_buf() requires aligned output

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

 libavcodec/mpc7.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 290ecfb..8bc0853 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
 <at>  <at>  -53,7 +53,7  <at>  <at>  static av_cold int mpc7_decode_init(AVCodecContext * avctx)
     int i, j;
     MPCContext *c = avctx->priv_data;
     GetBitContext gb;
-    uint8_t buf[16];
+    LOCAL_ALIGNED_16(uint8_t, buf, [16]);
     static int vlc_initialized = 0;

     static VLC_TYPE scfi_table[1 << MPC7_SCFI_BITS][2];
Justin Ruggles | 1 Feb 2012 03:06
Favicon

mpc7: check for allocation failure

ffmpeg | branch: master | Justin Ruggles <justin.ruggles <at> gmail.com> | Mon Jan 30 14:33:01 2012 -0500|
[3c4add27f7513f435e9daa03643fd992d5f6bcee] | committer: Justin Ruggles

mpc7: check for allocation failure

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

 libavcodec/mpc7.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 8bc0853..6b6bffe 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
 <at>  <at>  -224,6 +224,8  <at>  <at>  static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
     }

     bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
+    if (!bits)
+        return AVERROR(ENOMEM);
     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
     init_get_bits(&gb, bits, (buf_size - 4)* 8);
     skip_bits_long(&gb, buf[0]);
Diego Biurrun | 1 Feb 2012 03:06
Favicon

x86: Place mm_flags variable declaration below the appropriate #ifdef.

ffmpeg | branch: master | Diego Biurrun <diego <at> biurrun.de> | Mon Jan 30 09:39:16 2012 +0100|
[c30b198381706e94aab1097e49d2638763312b05] | committer: Diego Biurrun

x86: Place mm_flags variable declaration below the appropriate #ifdef.

This fixes some unused variable warnings with YASM disabled.

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

 libavcodec/x86/fmtconvert_mmx.c |    2 +-
 libavcodec/x86/rv40dsp.c        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/fmtconvert_mmx.c b/libavcodec/x86/fmtconvert_mmx.c
index 17079d3..42cb0bc 100644
--- a/libavcodec/x86/fmtconvert_mmx.c
+++ b/libavcodec/x86/fmtconvert_mmx.c
 <at>  <at>  -110,9 +110,9  <at>  <at>  static void float_interleave_sse(float *dst, const float **src,

 void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
 {
+#if HAVE_YASM
     int mm_flags = av_get_cpu_flags();

-#if HAVE_YASM
     if (mm_flags & AV_CPU_FLAG_MMX) {
         c->float_interleave = float_interleave_mmx;

diff --git a/libavcodec/x86/rv40dsp.c b/libavcodec/x86/rv40dsp.c
(Continue reading)

Justin Ruggles | 1 Feb 2012 03:06
Favicon

adpcmenc: check for coded_frame allocation failure

ffmpeg | branch: master | Justin Ruggles <justin.ruggles <at> gmail.com> | Mon Jan 30 13:03:01 2012 -0500|
[cb023d9afe9da0a9d221b5eeddd2981c520b5978] | committer: Justin Ruggles

adpcmenc: check for coded_frame allocation failure

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

 libavcodec/adpcmenc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 9cf1e391..26d673d 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
 <at>  <at>  -135,7 +135,8  <at>  <at>  static av_cold int adpcm_encode_init(AVCodecContext *avctx)
         goto error;
     }

-    avctx->coded_frame = avcodec_alloc_frame();
+    if (!(avctx->coded_frame = avcodec_alloc_frame()))
+        goto error;

     return 0;
 error:
Justin Ruggles | 1 Feb 2012 03:06
Favicon

adpcmenc: return proper AVERROR codes instead of -1

ffmpeg | branch: master | Justin Ruggles <justin.ruggles <at> gmail.com> | Mon Jan 30 13:06:57 2012 -0500|
[877a1d409c13887903cf6aa5d8ac01fd8091a3f2] | committer: Justin Ruggles

adpcmenc: return proper AVERROR codes instead of -1

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

 libavcodec/adpcmenc.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 26d673d..f0f8c1f 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
 <at>  <at>  -63,12 +63,16  <at>  <at>  static av_cold int adpcm_encode_init(AVCodecContext *avctx)
     ADPCMEncodeContext *s = avctx->priv_data;
     uint8_t *extradata;
     int i;
-    if (avctx->channels > 2)
-        return -1; /* only stereo or mono =) */
+    int ret = AVERROR(ENOMEM);
+
+    if (avctx->channels > 2) {
+        av_log(avctx, AV_LOG_ERROR, "only stereo or mono is supported\n");
+        return AVERROR(EINVAL);
+    }

     if (avctx->trellis && (unsigned)avctx->trellis > 16U) {
         av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n");
(Continue reading)

Justin Ruggles | 1 Feb 2012 03:06
Favicon

adpcmenc: Do not set coded_frame->key_frame.

ffmpeg | branch: master | Justin Ruggles <justin.ruggles <at> gmail.com> | Mon Jan 30 12:57:34 2012 -0500|
[ddf70db6d71fdab15bf8626aea4301b85891c2bd] | committer: Justin Ruggles

adpcmenc: Do not set coded_frame->key_frame.

It is already set in avcodec_alloc_frame().

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

 libavcodec/adpcmenc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 9697f82..9cf1e391 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
 <at>  <at>  -136,7 +136,6  <at>  <at>  static av_cold int adpcm_encode_init(AVCodecContext *avctx)
     }

     avctx->coded_frame = avcodec_alloc_frame();
-    avctx->coded_frame->key_frame= 1;

     return 0;
 error:
Alex Converse | 1 Feb 2012 03:06
Favicon

mp3dec: Fix a heap-buffer-overflow

ffmpeg | branch: master | Alex Converse <alex.converse <at> gmail.com> | Wed Jan 25 15:46:14 2012 -0800|
[f372ce119bd2458fa0b4ddfb2af3a36621df99f7] | committer: Alex Converse

mp3dec: Fix a heap-buffer-overflow

In some cases, what is left to read from ptr is smaller than EXTRABYTES.

Based on a patch by Thierry Foucu <tfoucu <at> gmail.com>.

Signed-off-by: Alex Converse <alex.converse <at> gmail.com>

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

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

diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 4ea5146..af125d5 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
 <at>  <at>  -1378,16 +1378,17  <at>  <at>  static int mp_decode_layer3(MPADecodeContext *s)
     if (!s->adu_mode) {
         int skip;
         const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3);
+        int extrasize = av_clip(get_bits_left(&s->gb) >> 3, 0, EXTRABYTES);
         assert((get_bits_count(&s->gb) & 7) == 0);
         /* now we get bits from the main_data_begin offset */
         av_dlog(s->avctx, "seekback: %d\n", main_data_begin);
     //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size);
(Continue reading)


Gmane