From a2a6332b5622876c956d337002369a7c84299f11 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sun, 12 Nov 2006 16:35:19 +0000 Subject: [PATCH] Fix avidec.c compilation when dv demuxer is disabled. Originally committed as revision 6986 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avidec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index dfbe5c6ef7..f580c96a75 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -306,9 +306,11 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) av_freep(&s->streams[0]->codec->extradata); av_freep(&s->streams[0]); s->nb_streams = 0; + if (ENABLE_DV_DEMUXER) { avi->dv_demux = dv_init_demux(s); if (!avi->dv_demux) goto fail; + } s->streams[0]->priv_data = ast; url_fskip(pb, 3 * 4); ast->scale = get_le32(pb); @@ -525,7 +527,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) offset_t i, sync; void* dstr; - if (avi->dv_demux) { + if (ENABLE_DV_DEMUXER && avi->dv_demux) { size = dv_get_packet(avi->dv_demux, pkt); if (size >= 0) return size; @@ -594,7 +596,7 @@ resync: size= ast->remaining; av_get_packet(pb, pkt, size); - if (avi->dv_demux) { + if (ENABLE_DV_DEMUXER && avi->dv_demux) { dstr = pkt->destruct; size = dv_produce_packet(avi->dv_demux, pkt, pkt->data, pkt->size); @@ -935,7 +937,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp ast2->frame_offset *=ast2->sample_size; } - if (avi->dv_demux) + if (ENABLE_DV_DEMUXER && avi->dv_demux) dv_flush_audio_packets(avi->dv_demux); /* do the seek */ url_fseek(&s->pb, pos, SEEK_SET);