Carl Eugen Hoyos | 1 Jul 2011 02:43
Favicon

Fix internal buffer size for 2bpp and 4bpp raw video.

ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos <at> ag.or.at> | Fri Jul  1 02:34:33 2011 +0200|
[dec126a932c8dc0605054dc3be07791b629cc275] | committer: Carl Eugen Hoyos

Fix internal buffer size for 2bpp and 4bpp raw video.

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

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

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 6644d6c..d48cbed 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
 <at>  <at>  -103,13 +103,15  <at>  <at>  static av_cold int raw_init_decoder(AVCodecContext *avctx)
     }

     ff_set_systematic_pal2(context->palette, avctx->pix_fmt);
-    context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
     if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
        avctx->pix_fmt==PIX_FMT_PAL8 &&
        (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
+        context->length = avpicture_get_size(avctx->pix_fmt, (avctx->width+3)&~3, avctx->height);
         context->buffer = av_malloc(context->length);
         if (!context->buffer)
             return -1;
+    } else {
+        context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
     }
(Continue reading)

Carl Eugen Hoyos | 1 Jul 2011 02:43
Favicon

Fix possible double free when encoding using xvid.

ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos <at> ag.or.at> | Fri Jul  1 02:38:28 2011 +0200|
[315f0e3fd8dcbd1362276b7407dad2e97cccc4b7] | committer: Carl Eugen Hoyos

Fix possible double free when encoding using xvid.

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

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

diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 9b5c17c..effd2db 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
 <at>  <at>  -528,6 +528,7  <at>  <at>  static av_cold int xvid_encode_close(AVCodecContext *avctx) {
     if( x->twopassbuffer != NULL ) {
         av_free(x->twopassbuffer);
         av_free(x->old_twopassbuffer);
+        avctx->stats_out = NULL;
     }
     av_free(x->twopassfile);
     av_free(x->intra_matrix);
Carl Eugen Hoyos | 1 Jul 2011 02:43
Favicon

Fix possible double free when encoding using xvid.

ffmpeg | branch: release/0.7 | Carl Eugen Hoyos <cehoyos <at> ag.or.at> | Fri Jul  1 02:38:28 2011 +0200|
[00498a7e59727cfe51703d84ac55e055b47c8872] | committer: Carl Eugen Hoyos

Fix possible double free when encoding using xvid.
(cherry picked from commit 315f0e3fd8dcbd1362276b7407dad2e97cccc4b7)

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

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

diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 9b5c17c..effd2db 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
 <at>  <at>  -528,6 +528,7  <at>  <at>  static av_cold int xvid_encode_close(AVCodecContext *avctx) {
     if( x->twopassbuffer != NULL ) {
         av_free(x->twopassbuffer);
         av_free(x->old_twopassbuffer);
+        avctx->stats_out = NULL;
     }
     av_free(x->twopassfile);
     av_free(x->intra_matrix);
Ronald S. Bultje | 1 Jul 2011 02:43
Favicon

ogg: fix double free when finding length of small chained oggs.

ffmpeg | branch: release/0.7 | Ronald S. Bultje <rsbultje <at> gmail.com> | Tue Jun 28 22:24:21 2011 -0700|
[b62c0c0bce5c3a203a6e01a4f07d991718c5fac5] | committer: Carl Eugen Hoyos

ogg: fix double free when finding length of small chained oggs.

ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
(cherry picked from commit 9ed6cbc3ee2ae3e7472fb25192a7e36fd7b15533)

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

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

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 655da35..dc9f7b6 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
 <at>  <at>  -240,7 +240,8  <at>  <at>  static int ogg_read_page(AVFormatContext *s, int *str)

             for (n = 0; n < ogg->nstreams; n++) {
                 av_freep(&ogg->streams[n].buf);
-                av_freep(&ogg->streams[n].private);
+                if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
+                    av_freep(&ogg->streams[n].private);
             }
(Continue reading)

Carl Eugen Hoyos | 1 Jul 2011 02:43
Favicon

Fix possible double free when encoding using xvid.

ffmpeg | branch: release/0.8 | Carl Eugen Hoyos <cehoyos <at> ag.or.at> | Fri Jul  1 02:38:28 2011 +0200|
[376dfd07abf8a5f493146d818bfb04807dc8bd5a] | committer: Carl Eugen Hoyos

Fix possible double free when encoding using xvid.
(cherry picked from commit 315f0e3fd8dcbd1362276b7407dad2e97cccc4b7)

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

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

diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 9b5c17c..effd2db 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
 <at>  <at>  -528,6 +528,7  <at>  <at>  static av_cold int xvid_encode_close(AVCodecContext *avctx) {
     if( x->twopassbuffer != NULL ) {
         av_free(x->twopassbuffer);
         av_free(x->old_twopassbuffer);
+        avctx->stats_out = NULL;
     }
     av_free(x->twopassfile);
     av_free(x->intra_matrix);
Ronald S. Bultje | 1 Jul 2011 02:43
Favicon

ogg: fix double free when finding length of small chained oggs.

ffmpeg | branch: release/0.8 | Ronald S. Bultje <rsbultje <at> gmail.com> | Tue Jun 28 22:24:21 2011 -0700|
[8f7f3f0453dfe3a14b70bae28301a2ee661fc3f4] | committer: Carl Eugen Hoyos

ogg: fix double free when finding length of small chained oggs.

ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
(cherry picked from commit 9ed6cbc3ee2ae3e7472fb25192a7e36fd7b15533)

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

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

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 655da35..dc9f7b6 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
 <at>  <at>  -240,7 +240,8  <at>  <at>  static int ogg_read_page(AVFormatContext *s, int *str)

             for (n = 0; n < ogg->nstreams; n++) {
                 av_freep(&ogg->streams[n].buf);
-                av_freep(&ogg->streams[n].private);
+                if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
+                    av_freep(&ogg->streams[n].private);
             }
(Continue reading)

Michael Niedermayer | 1 Jul 2011 03:06
Favicon

Fix mpeg4 padding bug detection with more than 128bit trash and slices.

ffmpeg | branch: master | Michael Niedermayer <michaelni <at> gmx.at> | Fri Jul  1 02:51:10 2011 +0200|
[9251942ca728e7807a2a95306415b27b36a8b8e7] | committer: Michael Niedermayer

Fix mpeg4 padding bug detection with more than 128bit trash and slices.
Fixes ticket302
The second hunk is from anatoly

Signed-off-by: Michael Niedermayer <michaelni <at> gmx.at>

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

 libavcodec/h263dec.c       |    2 +-
 libavcodec/mpeg4videodec.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index f079557..7b42046 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
 <at>  <at>  -269,7 +269,7  <at>  <at>  static int decode_slice(MpegEncContext *s){
     if(      s->codec_id==CODEC_ID_MPEG4
        &&   (s->workaround_bugs&FF_BUG_AUTODETECT)
        &&    get_bits_left(&s->gb) >=0
-       &&    get_bits_left(&s->gb) < 48
+       &&    get_bits_left(&s->gb) < 137
 //       &&   !s->resync_marker
        &&   !s->data_partitioning){

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

Alex Converse | 1 Jul 2011 05:45
Favicon

aacenc: Make chan_map const correct

ffmpeg | branch: master | Alex Converse <alex.converse <at> gmail.com> | Wed Jun 29 14:33:33 2011 -0700|
[ce2649af3d012d36d2f70d77867f18270f0e296d] | committer: Alex Converse

aacenc: Make chan_map const correct

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

 libavcodec/aacenc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index 3f590fe..acd185a 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
 <at>  <at>  -61,7 +61,7  <at>  <at>  typedef struct AACEncContext {
     int16_t *samples;                            ///< saved preprocessed input

     int samplerate_index;                        ///< MPEG-4 samplerate index
-    uint8_t *chan_map;                           ///< channel configuration map
+    const uint8_t *chan_map;                     ///< channel configuration map

     ChannelElement *cpe;                         ///< channel elements
     FFPsyContext psy;
Ronald S. Bultje | 1 Jul 2011 05:45
Favicon

swscale: fix yuv range correction when using 16-bit scaling.

ffmpeg | branch: master | Ronald S. Bultje <rsbultje <at> gmail.com> | Wed Jun 29 21:04:45 2011 -0700|
[e0b8fff6c7a293e35079ba1931bd19372686b3f6] | committer: Ronald S. Bultje

swscale: fix yuv range correction when using 16-bit scaling.

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

 libswscale/swscale.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 987afff..644f848 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
 <at>  <at>  -1982,8 +1982,8  <at>  <at>  static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
     int32_t *dstU = (int32_t *) _dstU;
     int32_t *dstV = (int32_t *) _dstV;
     for (i = 0; i < width; i++) {
-        dstU[i] = (FFMIN(dstU[i],30775)*4663 - 9289992)>>12; //-264
-        dstV[i] = (FFMIN(dstV[i],30775)*4663 - 9289992)>>12; //-264
+        dstU[i] = (FFMIN(dstU[i],30775<<4)*4663 - (9289992<<4))>>12; //-264
+        dstV[i] = (FFMIN(dstV[i],30775<<4)*4663 - (9289992<<4))>>12; //-264
     }
 }
 static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
 <at>  <at>  -1992,8 +1992,8  <at>  <at>  static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
     int32_t *dstU = (int32_t *) _dstU;
     int32_t *dstV = (int32_t *) _dstV;
     for (i = 0; i < width; i++) {
(Continue reading)

Mohamed Naufal | 1 Jul 2011 05:45
Favicon

swscale: Unbreak build with --enable-small

ffmpeg | branch: master | Mohamed Naufal <naufal11 <at> gmail.com> | Thu Jun 30 11:57:32 2011 +0300|
[705b21a06ed357ed2b432b967c4fcb09fb992d02] | committer: Martin Storsjö

swscale: Unbreak build with --enable-small

This fixes building with --enable-small, by using the correct
variable name.

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

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

 libswscale/swscale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 644f848..1e4994c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
 <at>  <at>  -977,7 +977,7  <at>  <at>  yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2,
         const uint32_t *b = (const uint32_t *) _b;

 #if CONFIG_SMALL
-        int sh = hasAlpha ? ((fmt == PIX_FMT_RGB32_1 || fmt == PIX_FMT_BGR32_1) ? 0 : 24) : 0;
+        int sh = hasAlpha ? ((target == PIX_FMT_RGB32_1 || target == PIX_FMT_BGR32_1) ? 0 : 24) : 0;

         dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1] + (hasAlpha ? A1 << sh : 0);
         dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2] + (hasAlpha ? A2 << sh : 0);

(Continue reading)


Gmane