History

Replace all uses of av_close_input_file() with avformat_close_input().

Anton Khirnov committed 14 years ago

Commit cd3716b1 parent 526604514 files · +22 −26Browse files

Showing the changes to avserver.c (1 of 14 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t