changeset 1488:41a7ed2b064a libavformat

Fix avidec.c compilation when dv demuxer is disabled.
author aurel
date Sun, 12 Nov 2006 16:35:19 +0000
parents a3f1e3720b29
children 40290ec3d034
files avidec.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Sun Nov 12 16:24:05 2006 +0000
+++ b/avidec.c	Sun Nov 12 16:35:19 2006 +0000
@@ -306,9 +306,11 @@
                 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 @@
     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 @@
             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 @@
             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);