Revision 637af098

View differences:

ffserver.c
3757 3757
    const char *p;
3758 3758
    int val, errors, line_num;
3759 3759
    FFStream **last_stream, *stream, *redirect;
3760
    FFStream **last_feed, *feed;
3760
    FFStream **last_feed, *feed, *s;
3761 3761
    AVCodecContext audio_enc, video_enc;
3762 3762
    enum CodecID audio_id, video_id;
3763 3763

  
......
3865 3865
                        filename, line_num);
3866 3866
            } else {
3867 3867
                feed = av_mallocz(sizeof(FFStream));
3868
                /* add in stream list */
3869
                *last_stream = feed;
3870
                last_stream = &feed->next;
3871
                /* add in feed list */
3872
                *last_feed = feed;
3873
                last_feed = &feed->next_feed;
3874

  
3875 3868
                get_arg(feed->filename, sizeof(feed->filename), &p);
3876 3869
                q = strrchr(feed->filename, '>');
3877 3870
                if (*q)
3878 3871
                    *q = '\0';
3872

  
3873
                for (s = first_feed; s; s = s->next) {
3874
                    if (!strcmp(feed->filename, s->filename)) {
3875
                        fprintf(stderr, "%s:%d: Feed '%s' already registered\n",
3876
                                filename, line_num, s->filename);
3877
                        errors++;
3878
                    }
3879
                }
3880

  
3879 3881
                feed->fmt = guess_format("ffm", NULL, NULL);
3880 3882
                /* defaut feed file */
3881 3883
                snprintf(feed->feed_filename, sizeof(feed->feed_filename),
......
3883 3885
                feed->feed_max_size = 5 * 1024 * 1024;
3884 3886
                feed->is_feed = 1;
3885 3887
                feed->feed = feed; /* self feeding :-) */
3888

  
3889
                /* add in stream list */
3890
                *last_stream = feed;
3891
                last_stream = &feed->next;
3892
                /* add in feed list */
3893
                *last_feed = feed;
3894
                last_feed = &feed->next_feed;
3886 3895
            }
3887 3896
        } else if (!strcasecmp(cmd, "Launch")) {
3888 3897
            if (feed) {
......
3954 3963
                fprintf(stderr, "%s:%d: Already in a tag\n",
3955 3964
                        filename, line_num);
3956 3965
            } else {
3966
                FFStream *s;
3957 3967
                const AVClass *class;
3958 3968
                stream = av_mallocz(sizeof(FFStream));
3959
                *last_stream = stream;
3960
                last_stream = &stream->next;
3961

  
3962 3969
                get_arg(stream->filename, sizeof(stream->filename), &p);
3963 3970
                q = strrchr(stream->filename, '>');
3964 3971
                if (*q)
3965 3972
                    *q = '\0';
3973

  
3974
                for (s = first_stream; s; s = s->next) {
3975
                    if (!strcmp(stream->filename, s->filename)) {
3976
                        fprintf(stderr, "%s:%d: Stream '%s' already registered\n",
3977
                                filename, line_num, s->filename);
3978
                        errors++;
3979
                    }
3980
                }
3981

  
3966 3982
                stream->fmt = guess_stream_format(NULL, stream->filename, NULL);
3967 3983
                /* fetch avclass so AVOption works
3968 3984
                 * FIXME try to use avcodec_get_context_defaults2
......
3979 3995
                    audio_id = stream->fmt->audio_codec;
3980 3996
                    video_id = stream->fmt->video_codec;
3981 3997
                }
3998

  
3999
                *last_stream = stream;
4000
                last_stream = &stream->next;
3982 4001
            }
3983 4002
        } else if (!strcasecmp(cmd, "Feed")) {
3984 4003
            get_arg(arg, sizeof(arg), &p);

Also available in: Unified diff