diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-09 19:44:28 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-09 19:44:28 +0200 |
commit | bc0f5249090cec1c460a910c2f46d2c760a2a3fe (patch) | |
tree | 91ea711bd517d7ebd21f96dc1e9e64da3e7953ac /stream | |
parent | a1b84c208002a293e663673af26ccaf639ae726f (diff) | |
parent | bc802c1e3efbe92cf653c415db5143291f096af4 (diff) | |
download | mpv-bc0f5249090cec1c460a910c2f46d2c760a2a3fe.tar.bz2 mpv-bc0f5249090cec1c460a910c2f46d2c760a2a3fe.tar.xz |
Merge svn changes up to r30502
Conflicts:
libswscale/rgb2rgb.c
libswscale/rgb2rgb.h
libswscale/swscale.c
libvo/x11_common.c
Diffstat (limited to 'stream')
-rw-r--r-- | stream/cookies.c | 2 | ||||
-rw-r--r-- | stream/stream_ffmpeg.c | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/stream/cookies.c b/stream/cookies.c index 6c8d5013aa..b7e89c79e6 100644 --- a/stream/cookies.c +++ b/stream/cookies.c @@ -133,7 +133,7 @@ static char *load_file(const char *filename, off_t * length) return NULL; } - lseek(fd, SEEK_SET, 0); + lseek(fd, 0, SEEK_SET); if (!(buffer = malloc(*length + 1))) { mp_msg(MSGT_NETWORK, MSGL_V, "Could not malloc."); diff --git a/stream/stream_ffmpeg.c b/stream/stream_ffmpeg.c index f8ca8f6e20..37c0800369 100644 --- a/stream/stream_ffmpeg.c +++ b/stream/stream_ffmpeg.c @@ -75,6 +75,7 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) URLContext *ctx = NULL; int res = STREAM_ERROR; int64_t size; + int dummy; av_register_all(); if (mode == STREAM_READ) @@ -95,25 +96,28 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) } if (!strncmp(filename, prefix, strlen(prefix))) filename += strlen(prefix); + dummy = !strncmp(filename, "rtsp:", 5); mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Opening %s\n", filename); - if (url_open(&ctx, filename, flags) < 0) + if (!dummy && url_open(&ctx, filename, flags) < 0) goto out; stream->priv = ctx; - size = url_filesize(ctx); + size = dummy ? 0 : url_filesize(ctx); if (size >= 0) stream->end_pos = size; stream->type = STREAMTYPE_FILE; stream->seek = seek; - if (ctx->is_streamed) { + if (dummy || ctx->is_streamed) { stream->type = STREAMTYPE_STREAM; stream->seek = NULL; } - stream->fill_buffer = fill_buffer; - stream->write_buffer = write_buffer; - stream->control = control; - stream->close = close_f; + if (!dummy) { + stream->fill_buffer = fill_buffer; + stream->write_buffer = write_buffer; + stream->control = control; + stream->close = close_f; + } res = STREAM_OK; out: |