[FFmpeg-devel] [PATCH] Allow bit stream filters to be?applied?to input

Paul Kendall paul
Sun May 17 00:09:51 CEST 2009


On Saturday 16 May 2009 08:33:55 am Michael Niedermayer wrote:
> On Wed, May 06, 2009 at 04:58:29PM +1200, Paul Kendall wrote:
> > On Tuesday 05 May 2009 11:38:20 pm Michael Niedermayer wrote:
> > > On Tue, May 05, 2009 at 07:15:10PM +1200, Paul Kendall wrote:
> > > > @@ -1223,6 +1224,9 @@
> > > >          if(avpkt.size && avpkt.size != pkt->size && verbose>0)
> > > >              fprintf(stderr, "Multiple frames in a packet from stream
> > > > %d\n", pkt->stream_index);
> > > >
> > > > +        /* apply bitstream filters */
> > > > +        apply_filters(&avpkt, ist->st->codec,
> > > > input_bitstream_filters[ist->file_index][ist_index]);
> > >
> > > the comment seems redundant
> >
> > Removed, new patch for part 3 included.
> >
> > > > +
> > > >          /* decode the packet if needed */
> > > >          data_buf = NULL; /* fail safe */
> > > >          data_size = 0;
> > > >
> > > > @@ -1230,8 +1234,8 @@
> > > >          if (ist->decoding_needed) {
> > > >              switch(ist->st->codec->codec_type) {
> > > >              case CODEC_TYPE_AUDIO:{
> > > > -                if(pkt && samples_size <
> > > > FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) { -
> > > >               samples_size = FFMAX(pkt->size*sizeof(*samples),
> > > > AVCODEC_MAX_AUDIO_FRAME_SIZE); +                if(pkt &&
> > > > samples_size < FFMAX(avpkt.size*sizeof(*samples),
> > > > AVCODEC_MAX_AUDIO_FRAME_SIZE)) { + samples_size =
> > > > FFMAX(avpkt.size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE);
> > > > av_free(samples);
> > > >                      samples= av_malloc(samples_size);
> > > >                  }
> > >
> > > is this a seperate bugfix? if so it should be in a seperate patch
> >
> > This is part of the patch. As the packet my be modified by the filtering,
> > it really needs to check the size from the modified packet rather that
> > the original packet.
> >
> > > also this patch should be tested to make sure mixing input & output
> > > filters as well as several input & output files & streams work
> > >
> > > [...]
> >
> > Certainly I have tested it, but I assume you want someone independent
> > to do that.
> >
> > Cheers,
> > Paul
> >
> >  ffmpeg.c |   13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> > 1555bb576121ea7f8aa41f8d81fe61ca89bfd240  ffmpeg.3.input-filtering.patch
>
> ok if tested
>
>
> [...]
I have tested it.
I do not have commit rights to SVN so someone will have to do this.

Cheers,
Paul



More information about the ffmpeg-devel mailing list