X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Futils.c;h=a63d71b0f4927a0d0b445699382732a7d4f3cbd9;hb=add68dcca958f0f6b42cabea6f546ceae5c7f16d;hp=9dc57063d299e293874ea445248be12995b8a50e;hpb=4f9a8d3fe2f9485ee08848d336ee96f15ec0e7e6;p=ffmpeg diff --git a/libavformat/utils.c b/libavformat/utils.c index 9dc57063d29..a63d71b0f49 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -357,7 +357,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, { 0 } }; int score; - AVInputFormat *fmt = av_probe_input_format3(pd, 1, &score); + const AVInputFormat *fmt = av_probe_input_format3(pd, 1, &score); if (fmt) { int i; @@ -535,7 +535,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int avformat_open_input(AVFormatContext **ps, const char *filename, - AVInputFormat *fmt, AVDictionary **options) + ff_const59 AVInputFormat *fmt, AVDictionary **options) { AVFormatContext *s = *ps; int i, ret = 0; @@ -1402,8 +1402,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, st->cur_dts = pkt->dts; if (s->debug & FF_FDEBUG_TS) - av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n", - presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts)); + av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s st:%d (%d)\n", + presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), st->index, st->id); /* update flags */ if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || is_intra_only(st->codecpar->codec_id)) @@ -2163,7 +2163,7 @@ static int64_t ff_read_timestamp(AVFormatContext *s, int stream_index, int64_t * int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags) { - AVInputFormat *avif = s->iformat; + const AVInputFormat *avif = s->iformat; int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; int64_t ts_min, ts_max, ts; int index; @@ -4730,7 +4730,7 @@ void av_url_split(char *proto, int proto_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url) { - const char *p, *ls, *ls2, *at, *at2, *col, *brk; + const char *p, *ls, *ls2, *ls3, *at, *at2, *col, *brk; if (port_ptr) *port_ptr = -1; @@ -4760,6 +4760,9 @@ void av_url_split(char *proto, int proto_size, /* separate path from hostname */ ls = strchr(p, '/'); ls2 = strchr(p, '?'); + ls3 = strchr(p, '@'); + if (ls3 && ls3 > ls && (!ls2 || ls2 > ls3)) + ls = strchr(ls3, '/'); if (!ls) ls = ls2; else if (ls && ls2)