[Ffmpeg-devel] [PATCH] Linking error when DV disabled

Panagiotis Issaris takis.issaris
Tue Sep 5 11:33:33 CEST 2006


Hi,

Op dinsdag 5 september 2006 00:06, schreef Aurelien Jacobs:
> On Mon, 4 Sep 2006 18:30:54 +0200
> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
> 
> > Hi,
> > 
> > Op maandag 4 september 2006 18:09, schreef Baptiste Coudurier:
> > > > Disabling the DV muxer and demuxer causes linking to fail. Attached patch tries to fix this.
> > 
> > +#if defined(CONFIG_DV_DEMUXER)
> >                  avi->dv_demux = dv_init_demux(s);
> >                  if (!avi->dv_demux)
> >                      goto fail;
> > +#else
> > +                avi->dv_demux = NULL;
> > +#endif
> 
> You could probably ifdef out the dv_demux field in the avi struct
> definition. Then you could remove the #else part here.

I could, but then I would have to modify this too:

    383         case MKTAG('s', 't', 'r', 'f'):
    384             /* stream header */
    385             if (stream_index >= s->nb_streams || avi->dv_demux) {
    386                 url_fskip(pb, size);
    387             } else {
    388                 st = s->streams[stream_index];

Would that be okay?

> > +#ifdef CONFIG_DV_MUXER
> >          if (avi->dv_demux) {
> >              dstr = pkt->destruct;
> >              size = dv_produce_packet(avi->dv_demux, pkt,
> > @@ -588,6 +595,7 @@ resync:
> >              pkt->destruct = dstr;
> >              pkt->flags |= PKT_FLAG_KEY;
> >          } else {
> > +#endif
> 
> Extract the last { from the ifdef...
Done.

> 
> >              /* XXX: how to handle B frames in avi ? */
> >              pkt->dts = ast->frame_offset;
> >  //                pkt->dts += ast->start;
> > @@ -620,7 +628,9 @@ resync:
> >                  ast->frame_offset += pkt->size;
> >              else
> >                  ast->frame_offset++;
> > +#ifdef CONFIG_DV_MUXER
> >          }
> > +#endif
> 
> Then you won't need to add one more ifdef here.
Done.


Thanks for reviewing! :)

With friendly regards,
Takis




More information about the ffmpeg-devel mailing list