Showing the changes to avserver.c (1 of 14 files). Show all
Unified · Split
| @@ -849,7 +849,7 @@ static void close_connection(HTTPContext *c) · 848 unmodified lines | ||
| 849 | 849 | if (st->codec->codec) |
| 850 | 850 | avcodec_close(st->codec); |
| 851 | 851 | } |
| 852 | − av_close_input_file(c->fmt_in); | |
| 852 | + avformat_close_input(&c->fmt_in); | |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | 855 | /* free RTP output streams if any */ |
| @@ -2169,7 +2169,7 @@ static int open_input_stream(HTTPContext *c, const char *info) · 1313 unmodified lines | ||
| 2169 | 2169 | c->fmt_in = s; |
| 2170 | 2170 | if (strcmp(s->iformat->name, "ffm") && avformat_find_stream_info(c->fmt_in, NULL) < 0) { |
| 2171 | 2171 | http_log("Could not find stream info '%s'\n", input_filename); |
| 2172 | − av_close_input_file(s); | |
| 2172 | + avformat_close_input(&s); | |
| 2173 | 2173 | return -1; |
| 2174 | 2174 | } |
| 2175 | 2175 | |
| @@ -2311,8 +2311,7 @@ static int http_prepare_data(HTTPContext *c) · 135 unmodified lines | ||
| 2311 | 2311 | return 0; |
| 2312 | 2312 | } else { |
| 2313 | 2313 | if (c->stream->loop) { |
| 2314 | − av_close_input_file(c->fmt_in); | |
| 2315 | − c->fmt_in = NULL; | |
| 2314 | + avformat_close_input(&c->fmt_in); | |
| 2316 | 2315 | if (open_input_stream(c, "") < 0) |
| 2317 | 2316 | goto no_loop; |
| 2318 | 2317 | goto redo; |
| @@ -2736,7 +2735,7 @@ static int http_receive_data(HTTPContext *c) · 417 unmodified lines | ||
| 2736 | 2735 | |
| 2737 | 2736 | /* Now we have the actual streams */ |
| 2738 | 2737 | if (s->nb_streams != feed->nb_streams) { |
| 2739 | − av_close_input_file(s); | |
| 2738 | + avformat_close_input(&s); | |
| 2740 | 2739 | av_free(pb); |
| 2741 | 2740 | http_log("Feed '%s' stream number does not match registered feed\n", |
| 2742 | 2741 | c->stream->feed_filename); |
| @@ -2749,7 +2748,7 @@ static int http_receive_data(HTTPContext *c) · 6 unmodified lines | ||
| 2749 | 2748 | avcodec_copy_context(fst->codec, st->codec); |
| 2750 | 2749 | } |
| 2751 | 2750 | |
| 2752 | − av_close_input_file(s); | |
| 2751 | + avformat_close_input(&s); | |
| 2753 | 2752 | av_free(pb); |
| 2754 | 2753 | } |
| 2755 | 2754 | c->buffer_ptr = c->buffer; |
| @@ -3629,7 +3628,7 @@ static void build_file_streams(void) · 873 unmodified lines | ||
| 3629 | 3628 | if (avformat_find_stream_info(infile, NULL) < 0) { |
| 3630 | 3629 | http_log("Could not find codec parameters from '%s'\n", |
| 3631 | 3630 | stream->feed_filename); |
| 3632 | − av_close_input_file(infile); | |
| 3631 | + avformat_close_input(&infile); | |
| 3633 | 3632 | goto fail; |
| 3634 | 3633 | } |
| 3635 | 3634 | extract_mpeg4_header(infile); |
| @@ -3637,7 +3636,7 @@ static void build_file_streams(void) · 1 unmodified line | ||
| 3637 | 3636 | for(i=0;i<infile->nb_streams;i++) |
| 3638 | 3637 | add_av_stream1(stream, infile->streams[i]->codec, 1); |
| 3639 | 3638 | |
| 3640 | − av_close_input_file(infile); | |
| 3639 | + avformat_close_input(&infile); | |
| 3641 | 3640 | } |
| 3642 | 3641 | } |
| 3643 | 3642 | } |
| @@ -3727,7 +3726,7 @@ static void build_feed_streams(void) · 83 unmodified lines | ||
| 3727 | 3726 | http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n", |
| 3728 | 3727 | feed->feed_filename, s->nb_streams, feed->nb_streams); |
| 3729 | 3728 | |
| 3730 | − av_close_input_file(s); | |
| 3729 | + avformat_close_input(&s); | |
| 3731 | 3730 | } else |
| 3732 | 3731 | http_log("Deleting feed file '%s' as it appears to be corrupt\n", |
| 3733 | 3732 | feed->feed_filename); |