alexc | 1 May 01:08 2010
Picon

r22999 - trunk/libavcodec/aacsbr.c

Author: alexc
Date: Sat May  1 01:08:44 2010
New Revision: 22999

Log:
Move the SBR patch count check to prevent overwrites.

Thanks to Chromium.

Modified:
   trunk/libavcodec/aacsbr.c

Modified: trunk/libavcodec/aacsbr.c
==============================================================================
--- trunk/libavcodec/aacsbr.c	Sat May  1 00:42:52 2010	(r22998)
+++ trunk/libavcodec/aacsbr.c	Sat May  1 01:08:44 2010	(r22999)
 <at>  <at>  -519,6 +519,15  <at>  <at>  static int sbr_hf_calc_npatches(AACConte
             odd = (sb + sbr->k[0]) & 1;
         }

+        // Requirements (14496-3 sp04 p205) sets the maximum number of patches to 5.
+        // After this check the final number of patches can still be six which is
+        // illegal however the Coding Technologies decoder check stream has a final
+        // count of 6 patches
+        if (sbr->num_patches > 5) {
+            av_log(ac->avccontext, AV_LOG_ERROR, "Too many patches: %d\n", sbr->num_patches);
+            return -1;
+        }
+
         sbr->patch_num_subbands[sbr->num_patches]  = FFMAX(sb - usb, 0);
(Continue reading)

alexc | 1 May 01:32 2010
Picon

r23000 - trunk/libavcodec/aacsbr.c

Author: alexc
Date: Sat May  1 01:32:42 2010
New Revision: 23000

Log:
Enforce time border monotonicity.

Thanks to Chromium.

Modified:
   trunk/libavcodec/aacsbr.c

Modified: trunk/libavcodec/aacsbr.c
==============================================================================
--- trunk/libavcodec/aacsbr.c	Sat May  1 01:08:44 2010	(r22999)
+++ trunk/libavcodec/aacsbr.c	Sat May  1 01:32:42 2010	(r23000)
 <at>  <at>  -720,6 +720,13  <at>  <at>  static int read_sbr_grid(AACContext *ac,
         return -1;
     }

+    for (i = 1; i <= ch_data->bs_num_env; i++) {
+        if (ch_data->t_env[i-1] > ch_data->t_env[i]) {
+            av_log(ac->avccontext, AV_LOG_ERROR, "Non monotone time borders\n");
+            return -1;
+        }
+    }
+
     ch_data->bs_num_noise = (ch_data->bs_num_env > 1) + 1;

     ch_data->t_q[0]                     = ch_data->t_env[0];
(Continue reading)

Reimar Döffinger | 1 May 09:10 2010
Picon
Picon

Re: r22997 - trunk/libavcodec/rawdec.c

On Sat, May 01, 2010 at 12:09:42AM +0200, michael wrote:
> Author: michael
> Date: Sat May  1 00:09:42 2010
> New Revision: 22997
> 
> Log:
> avi bgr24 padding fix.
> Fixes issue1901
> 
> Modified:
>    trunk/libavcodec/rawdec.c
> 
> Modified: trunk/libavcodec/rawdec.c
> ==============================================================================
> --- trunk/libavcodec/rawdec.c	Fri Apr 30 23:43:29 2010	(r22996)
> +++ trunk/libavcodec/rawdec.c	Sat May  1 00:09:42 2010	(r22997)
>  <at>  <at>  -152,6 +152,8  <at>  <at>  static int raw_decode(AVCodecContext *av
>          memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
>          avctx->palctrl->palette_changed = 0;
>      }
> +    if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size)
> +        frame->linesize[0] = (frame->linesize[0]+3)&~3;

Nice hack :-), but shouldn't it use FFALIGN?
stefano | 1 May 10:24 2010
Picon

r23001 - trunk/libavdevice/v4l2.c

Author: stefano
Date: Sat May  1 10:24:24 2010
New Revision: 23001

Log:
Make device_open() store the VIDIOC_QUERYCAP ioctl errno, and in case
of failure return the stored value rather than the current errno,
which may be overwritten by a following call to close().

Modified:
   trunk/libavdevice/v4l2.c

Modified: trunk/libavdevice/v4l2.c
==============================================================================
--- trunk/libavdevice/v4l2.c	Sat May  1 01:32:42 2010	(r23000)
+++ trunk/libavdevice/v4l2.c	Sat May  1 10:24:24 2010	(r23001)
 <at>  <at>  -153,7 +153,7  <at>  <at>  static int device_open(AVFormatContext *
 {
     struct v4l2_capability cap;
     int fd;
-    int res;
+    int res, err;
     int flags = O_RDWR;

     if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
 <at>  <at>  -169,18 +169,18  <at>  <at>  static int device_open(AVFormatContext *

     res = ioctl(fd, VIDIOC_QUERYCAP, &cap);
     // ENOIOCTLCMD definition only availble on __KERNEL__
-    if (res < 0 && errno == 515) {
(Continue reading)

Stefano Sabatini | 1 May 10:24 2010
Picon

Re: r22966 - trunk/libavdevice/v4l2.c

On date Wednesday 2010-04-28 09:53:48 +0200, Luca Abeni wrote:
> Luca Abeni wrote:
> [...]
> > > -    if (res < 0 && errno == 515) {
> > > +    if (res < 0 && ((err = errno) == 515)) {
> > >          av_log(ctx, AV_LOG_ERROR, "QUERYCAP not implemented, probably V4L device but not supporting V4L2\n");
> > >          close(fd);
> > >
> > > -        return AVERROR(errno);
> > > +        return AVERROR(err);
> >
> >This should obviously be "return 515" :)
> 
> Make it AVERROR(515)... ;-)

Applied.
Michael Niedermayer | 1 May 13:44 2010
Picon
Picon

Re: r22997 - trunk/libavcodec/rawdec.c

On Sat, May 01, 2010 at 09:10:03AM +0200, Reimar Döffinger wrote:
> On Sat, May 01, 2010 at 12:09:42AM +0200, michael wrote:
> > Author: michael
> > Date: Sat May  1 00:09:42 2010
> > New Revision: 22997
> > 
> > Log:
> > avi bgr24 padding fix.
> > Fixes issue1901
> > 
> > Modified:
> >    trunk/libavcodec/rawdec.c
> > 
> > Modified: trunk/libavcodec/rawdec.c
> > ==============================================================================
> > --- trunk/libavcodec/rawdec.c	Fri Apr 30 23:43:29 2010	(r22996)
> > +++ trunk/libavcodec/rawdec.c	Sat May  1 00:09:42 2010	(r22997)
> >  <at>  <at>  -152,6 +152,8  <at>  <at>  static int raw_decode(AVCodecContext *av
> >          memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
> >          avctx->palctrl->palette_changed = 0;
> >      }
> > +    if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size)
> > +        frame->linesize[0] = (frame->linesize[0]+3)&~3;
> 
> Nice hack :-), but shouldn't it use FFALIGN?

iam all for factorizng code, but when the call is biger than the code
itself iam not sure. As is anyone knowing C should understand the code
with FFALIGN() the person must understand what FFALIGN does as well

(Continue reading)

Måns Rullgård | 1 May 14:53 2010

Re: r22997 - trunk/libavcodec/rawdec.c

Michael Niedermayer <michaelni <at> gmx.at> writes:

> On Sat, May 01, 2010 at 09:10:03AM +0200, Reimar Döffinger wrote:
>> On Sat, May 01, 2010 at 12:09:42AM +0200, michael wrote:
>> > Author: michael
>> > Date: Sat May  1 00:09:42 2010
>> > New Revision: 22997
>> > 
>> > Log:
>> > avi bgr24 padding fix.
>> > Fixes issue1901
>> > 
>> > Modified:
>> >    trunk/libavcodec/rawdec.c
>> > 
>> > Modified: trunk/libavcodec/rawdec.c
>> > ==============================================================================
>> > --- trunk/libavcodec/rawdec.c	Fri Apr 30 23:43:29 2010	(r22996)
>> > +++ trunk/libavcodec/rawdec.c	Sat May  1 00:09:42 2010	(r22997)
>> >  <at>  <at>  -152,6 +152,8  <at>  <at>  static int raw_decode(AVCodecContext *av
>> >          memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
>> >          avctx->palctrl->palette_changed = 0;
>> >      }
>> > +    if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size)
>> > +        frame->linesize[0] = (frame->linesize[0]+3)&~3;
>> 
>> Nice hack :-), but shouldn't it use FFALIGN?
>
> iam all for factorizng code, but when the call is biger than the code
> itself iam not sure. As is anyone knowing C should understand the code
(Continue reading)

Reimar Döffinger | 1 May 15:26 2010
Picon
Picon

Re: r22997 - trunk/libavcodec/rawdec.c

On Sat, May 01, 2010 at 01:44:02PM +0200, Michael Niedermayer wrote:
> On Sat, May 01, 2010 at 09:10:03AM +0200, Reimar Döffinger wrote:
> > On Sat, May 01, 2010 at 12:09:42AM +0200, michael wrote:
> > > Author: michael
> > > Date: Sat May  1 00:09:42 2010
> > > New Revision: 22997
> > > 
> > > Log:
> > > avi bgr24 padding fix.
> > > Fixes issue1901
> > > 
> > > Modified:
> > >    trunk/libavcodec/rawdec.c
> > > 
> > > Modified: trunk/libavcodec/rawdec.c
> > > ==============================================================================
> > > --- trunk/libavcodec/rawdec.c	Fri Apr 30 23:43:29 2010	(r22996)
> > > +++ trunk/libavcodec/rawdec.c	Sat May  1 00:09:42 2010	(r22997)
> > >  <at>  <at>  -152,6 +152,8  <at>  <at>  static int raw_decode(AVCodecContext *av
> > >          memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
> > >          avctx->palctrl->palette_changed = 0;
> > >      }
> > > +    if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size)
> > > +        frame->linesize[0] = (frame->linesize[0]+3)&~3;
> > 
> > Nice hack :-), but shouldn't it use FFALIGN?
> 
> iam all for factorizng code, but when the call is biger than the code
> itself iam not sure. As is anyone knowing C should understand the code
> with FFALIGN() the person must understand what FFALIGN does as well
(Continue reading)

reimar | 1 May 15:49 2010
Picon

r23002 - in trunk/libavformat: avformat.h utils.c

Author: reimar
Date: Sat May  1 15:49:35 2010
New Revision: 23002

Log:
Export av_probe_input_format2.

Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/utils.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Sat May  1 10:24:24 2010	(r23001)
+++ trunk/libavformat/avformat.h	Sat May  1 15:49:35 2010	(r23002)
 <at>  <at>  -22,7 +22,7  <at>  <at> 
 #define AVFORMAT_AVFORMAT_H

 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 61
+#define LIBAVFORMAT_VERSION_MINOR 62
 #define LIBAVFORMAT_VERSION_MICRO  0

 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
 <at>  <at>  -888,6 +888,18  <at>  <at>  AVInputFormat *av_find_input_format(cons
 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);

 /**
+ * Guesses the file format.
+ *
(Continue reading)

reimar | 1 May 15:54 2010
Picon

r23003 - trunk/doc/APIchanges

Author: reimar
Date: Sat May  1 15:54:13 2010
New Revision: 23003

Log:
Document av_probe_input_format2 API addition.

Modified:
   trunk/doc/APIchanges

Modified: trunk/doc/APIchanges
==============================================================================
--- trunk/doc/APIchanges	Sat May  1 15:49:35 2010	(r23002)
+++ trunk/doc/APIchanges	Sat May  1 15:54:13 2010	(r23003)
 <at>  <at>  -12,6 +12,10  <at>  <at>  libavutil:   2009-03-08

 API changes, most recent first:

+2010-05-01 - r23002 - lavf 52.62.0 - probe function
+  Add av_probe_input_format2 to API, it allows ignoring probe
+  results below given score and returns the actual probe score.
+
 2010-04-01 - r22806 - lavf 52.61.0 - metadata API
   Add a flag for av_metadata_set2() to disable overwriting of
   existing tags.

Gmane