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

Michael Niedermayer michaelni
Fri May 15 22:33:55 CEST 2009


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


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090515/d32ebb90/attachment.pgp>



More information about the ffmpeg-devel mailing list