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
849849 if (st->codec->codec)
850850 avcodec_close(st->codec);
851851 }
852− av_close_input_file(c->fmt_in);
852+ avformat_close_input(&c->fmt_in);
853853 }
854854
855855 /* free RTP output streams if any */
@@ -2169,7 +2169,7 @@ static int open_input_stream(HTTPContext *c, const char *info) · 1313 unmodified lines
21692169 c->fmt_in = s;
21702170 if (strcmp(s->iformat->name, "ffm") && avformat_find_stream_info(c->fmt_in, NULL) < 0) {
21712171 http_log("Could not find stream info '%s'\n", input_filename);
2172− av_close_input_file(s);
2172+ avformat_close_input(&s);
21732173 return -1;
21742174 }
21752175
@@ -2311,8 +2311,7 @@ static int http_prepare_data(HTTPContext *c) · 135 unmodified lines
23112311 return 0;
23122312 } else {
23132313 if (c->stream->loop) {
2314− av_close_input_file(c->fmt_in);
2315− c->fmt_in = NULL;
2314+ avformat_close_input(&c->fmt_in);
23162315 if (open_input_stream(c, "") < 0)
23172316 goto no_loop;
23182317 goto redo;
@@ -2736,7 +2735,7 @@ static int http_receive_data(HTTPContext *c) · 417 unmodified lines
27362735
27372736 /* Now we have the actual streams */
27382737 if (s->nb_streams != feed->nb_streams) {
2739− av_close_input_file(s);
2738+ avformat_close_input(&s);
27402739 av_free(pb);
27412740 http_log("Feed '%s' stream number does not match registered feed\n",
27422741 c->stream->feed_filename);
@@ -2749,7 +2748,7 @@ static int http_receive_data(HTTPContext *c) · 6 unmodified lines
27492748 avcodec_copy_context(fst->codec, st->codec);
27502749 }
27512750
2752− av_close_input_file(s);
2751+ avformat_close_input(&s);
27532752 av_free(pb);
27542753 }
27552754 c->buffer_ptr = c->buffer;
@@ -3629,7 +3628,7 @@ static void build_file_streams(void) · 873 unmodified lines
36293628 if (avformat_find_stream_info(infile, NULL) < 0) {
36303629 http_log("Could not find codec parameters from '%s'\n",
36313630 stream->feed_filename);
3632− av_close_input_file(infile);
3631+ avformat_close_input(&infile);
36333632 goto fail;
36343633 }
36353634 extract_mpeg4_header(infile);
@@ -3637,7 +3636,7 @@ static void build_file_streams(void) · 1 unmodified line
36373636 for(i=0;i<infile->nb_streams;i++)
36383637 add_av_stream1(stream, infile->streams[i]->codec, 1);
36393638
3640− av_close_input_file(infile);
3639+ avformat_close_input(&infile);
36413640 }
36423641 }
36433642 }
@@ -3727,7 +3726,7 @@ static void build_feed_streams(void) · 83 unmodified lines
37273726 http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n",
37283727 feed->feed_filename, s->nb_streams, feed->nb_streams);
37293728
3730− av_close_input_file(s);
3729+ avformat_close_input(&s);
37313730 } else
37323731 http_log("Deleting feed file '%s' as it appears to be corrupt\n",
37333732 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