Ticket #2710: follow-http-redirect.patch
| File follow-http-redirect.patch, 2.8 KB (added by , 13 years ago) |
|---|
-
libavformat/http.c
202 202 location_changed = 0; 203 203 goto redo; 204 204 } 205 av_strlcpy(h->fileloc, s->location, sizeof(h->fileloc)); 205 206 return 0; 206 207 fail: 207 208 if (s->hd) -
libavformat/aviobuf.c
788 788 ffurl_close(h); 789 789 return err; 790 790 } 791 792 av_log(*s, AV_LOG_DEBUG, "Ressource opened: %s\n", h->fileloc); 793 memcpy((*s)->res_opened, h->fileloc, sizeof((*s)->res_opened)); 791 794 return 0; 792 795 } 793 796 -
libavformat/utils.c
505 505 return ret; 506 506 if (s->iformat) 507 507 return 0; 508 return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, s->probesize); 508 509 return av_probe_input_buffer(s->pb, &s->iformat, s->pb->res_opened, s, 0, s->probesize); 509 510 } 510 511 511 512 static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt, … … 572 573 } 573 574 574 575 s->duration = s->start_time = AV_NOPTS_VALUE; 575 av_strlcpy(s->filename, filename ? filename: "", sizeof(s->filename));576 av_strlcpy(s->filename, s->pb->res_opened ? s->pb->res_opened : "", sizeof(s->filename)); 576 577 577 578 /* allocate private data */ 578 579 if (s->iformat->priv_data_size > 0) { -
libavformat/avio.h
79 79 * to any av_opt_* functions in that case. 80 80 */ 81 81 const AVClass *av_class; 82 char res_opened[4096]; /**< Ressource opened during probing */ 82 83 unsigned char *buffer; /**< Start of the buffer. */ 83 84 int buffer_size; /**< Maximum buffer size */ 84 85 unsigned char *buf_ptr; /**< Current position in the buffer */ … … 140 141 * This field is internal to libavformat and access from outside is not allowed. 141 142 */ 142 143 int seek_count; 144 143 145 } AVIOContext; 144 146 145 147 /* unbuffered I/O */ -
libavformat/url.h
43 43 struct URLProtocol *prot; 44 44 void *priv_data; 45 45 char *filename; /**< specified URL */ 46 char fileloc[4096]; /**< file location of a specified URL */ 46 47 int flags; 47 48 int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */ 48 49 int is_streamed; /**< true if streamed (no seek possible), default = false */
