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

Panagiotis Issaris takis.issaris
Mon Sep 4 18:30:54 CEST 2006


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_MUXER) || defined(CONFIG_DV_DEMUXER)
> >                  avi->dv_demux = dv_init_demux(s);
> >                  if (!avi->dv_demux)
> >                      goto fail;
> > +#else
> > +                avi->dv_demux = NULL;
> > +#endif
> >                  s->streams[0]->priv_data = ast;
> >                  url_fskip(pb, 3 * 4);
> >                  ast->scale = get_le32(pb);
> 
> Only CONFIG_DV_DEMUXER should be checked.

For the moment enabling the muxer of demuxer causes the
same file to be compiled, and the conditional blocks
within this file, do not alter the compilation of
the functions which cause the linking problems:
dv_produce_packet
dv_flush_audio_packets
dv_init_demux

So, even if only the DV muxer is enabled, I think the abovementioned
functions would be available.

Or should I also surround those functions with #ifdef CONFIG_DV_DEMUXER,
so that they only get compiled in if the DV demuxer is ./configured?

libavformat/Makefile shows:
 35 OBJS-$(CONFIG_DV_DEMUXER)                += dv.o
 36 OBJS-$(CONFIG_DV_MUXER)                  += dv.o

 
> > @@ -513,9 +517,11 @@ static int avi_read_packet(AVFormatConte
> >      void* dstr;
> >  
> >      if (avi->dv_demux) {
> > +#ifdef CONFIG_DV_DEMUXER
> >          size = dv_get_packet(avi->dv_demux, pkt);
> >          if (size >= 0)
> >              return size;
> > +#endif
> >      }
> 
> Whole "if" should be enclosed.
Done.


> >      if(avi->non_interleaved){
> > @@ -582,11 +588,13 @@ resync:
> >          av_get_packet(pb, pkt, size);
> >  
> >          if (avi->dv_demux) {
> > +#ifdef CONFIG_DV_MUXER
> >              dstr = pkt->destruct;
> >              size = dv_produce_packet(avi->dv_demux, pkt,
> >                                      pkt->data, pkt->size);
> >              pkt->destruct = dstr;
> >              pkt->flags |= PKT_FLAG_KEY;
> > +#endif
> >          } else {
> >              /* XXX: how to handle B frames in avi ? */
> >              pkt->dts = ast->frame_offset;
> 
> Same here.
Done.
 
> > @@ -923,7 +931,9 @@ static int avi_read_seek(AVFormatContext
> >      }
> >  
> >      if (avi->dv_demux)
> > +#ifdef CONFIG_DV_MUXER
> >          dv_flush_audio_packets(avi->dv_demux);
> > +#endif
> >      /* do the seek */
> >      url_fseek(&s->pb, pos, SEEK_SET);
> >      avi->stream_index= -1;
> > 
> 
> Same.
Done.

With friendly regards,
Takis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20060904T182958-ffmpeg-edm.diff
Type: text/x-diff
Size: 2105 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060904/27311965/attachment.diff>



More information about the ffmpeg-devel mailing list