[Ffmpeg-devel] [PATCH] Linking error when DV disabled
Baptiste Coudurier
baptiste.coudurier
Mon Sep 4 18:09:27 CEST 2006
Hi
Panagiotis Issaris wrote:
> Hi,
>
> 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.
> @@ -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.
> 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.
> @@ -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.
> [...]
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list