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

Aurelien Jacobs aurel
Tue Sep 5 00:06:47 CEST 2006


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.

> +#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...

>              /* 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.

Aurel




More information about the ffmpeg-devel mailing list