Mercurial > libavformat.hg
changeset 502:813b0119a98e libavformat
ffserver fixes by (Koos Vriezen <koos.vriezen at xs4all dot nl>)
author | michael |
---|---|
date | Sun, 25 Jul 2004 11:59:34 +0000 |
parents | b0b8bf74cd49 |
children | f98831a3dc73 |
files | aviobuf.c ffm.c utils.c |
diffstat | 3 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/aviobuf.c Wed Jul 21 01:21:06 2004 +0000 +++ b/aviobuf.c Sun Jul 25 11:59:34 2004 +0000 @@ -148,7 +148,8 @@ return -EPIPE; s->buf_ptr = s->buffer; s->buf_end = s->buffer; - s->seek(s->opaque, offset, SEEK_SET); + if (s->seek(s->opaque, offset, SEEK_SET) == (offset_t)-EPIPE) + return -EPIPE; s->pos = offset; } s->eof_reached = 0; @@ -449,8 +450,8 @@ static int url_seek_packet(void *opaque, int64_t offset, int whence) { URLContext *h = opaque; - url_seek(h, offset, whence); - return 0; + return url_seek(h, offset, whence); + //return 0; } int url_fdopen(ByteIOContext *s, URLContext *h)
--- a/ffm.c Wed Jul 21 01:21:06 2004 +0000 +++ b/ffm.c Sun Jul 25 11:59:34 2004 +0000 @@ -150,6 +150,7 @@ fst = av_mallocz(sizeof(FFMStream)); if (!fst) goto fail; + av_set_pts_info(st, 64, 1, 1000000); st->priv_data = fst; codec = &st->codec;
--- a/utils.c Wed Jul 21 01:21:06 2004 +0000 +++ b/utils.c Sun Jul 25 11:59:34 2004 +0000 @@ -428,7 +428,13 @@ if (!fmt) { /* read probe data */ pd->buf_size = get_buffer(pb, buf, PROBE_BUF_SIZE); - url_fseek(pb, 0, SEEK_SET); + if (url_fseek(pb, 0, SEEK_SET) == (offset_t)-EPIPE) { + url_fclose(pb); + if (url_fopen(pb, filename, URL_RDONLY) < 0) { + err = AVERROR_IO; + goto fail; + } + } } }