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 | |
parent | a1b84c208002a293e663673af26ccaf639ae726f (diff) | |
parent | bc802c1e3efbe92cf653c415db5143291f096af4 (diff) |
Merge svn changes up to r30502
Conflicts:
libswscale/rgb2rgb.c
libswscale/rgb2rgb.h
libswscale/swscale.c
libvo/x11_common.c
-rw-r--r-- | libao2/ao_kai.c | 2 | ||||
-rw-r--r-- | libmpdemux/demux_lavf.c | 18 | ||||
-rw-r--r-- | libvo/x11_common.c | 2 | ||||
-rw-r--r-- | stream/cookies.c | 2 | ||||
-rw-r--r-- | stream/stream_ffmpeg.c | 18 |
5 files changed, 26 insertions, 16 deletions
diff --git a/libao2/ao_kai.c b/libao2/ao_kai.c index a52b60e0b5..cc0a3373a7 100644 --- a/libao2/ao_kai.c +++ b/libao2/ao_kai.c @@ -242,7 +242,7 @@ static int init(int rate, int channels, int format, int flags) ao_data.outburst = nBytesPerSample * OUTBURST_SAMPLES; ao_data.buffersize = m_kaiSpec.ulBufferSize; - m_nBufSize = (m_kaiSpec.ulBufferSize * m_kaiSpec.ulNumBuffers) << 3; + m_nBufSize = (m_kaiSpec.ulBufferSize * m_kaiSpec.ulNumBuffers) << 2; // multiple of CHUNK_SIZE m_nBufSize = (m_nBufSize / CHUNK_SIZE) * CHUNK_SIZE; diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index ad958889ed..6031b052fd 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -39,6 +39,7 @@ #include "libavformat/avformat.h" #include "libavformat/avio.h" #include "libavutil/avutil.h" +#include "libavutil/avstring.h" #include "libavcodec/opt.h" #include "mp_taglists.h" @@ -154,13 +155,15 @@ static int lavf_check_file(demuxer_t *demuxer){ } probe_data_size = stream_read(demuxer->stream, priv->buffer, PROBE_BUF_SIZE); - if(probe_data_size <= 0) + if(probe_data_size < 0) return 0; avpd.filename= demuxer->stream->url; + if (!strncmp(avpd.filename, "ffmpeg://", 9)) + avpd.filename += 9; avpd.buf= priv->buffer; avpd.buf_size= probe_data_size; - priv->avif= av_probe_input_format(&avpd, 1); + priv->avif= av_probe_input_format(&avpd, probe_data_size > 0); if(!priv->avif){ mp_msg(MSGT_HEADER,MSGL_V,"LAVF_check: no clue about this gibberish!\n"); return 0; @@ -458,10 +461,13 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ } } - if(demuxer->stream->url) - strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3); - else - strncpy(mp_filename + 3, "foobar.dummy", sizeof(mp_filename)-3); + if(demuxer->stream->url) { + if (!strncmp(demuxer->stream->url, "ffmpeg://rtsp:", 14)) + av_strlcpy(mp_filename, demuxer->stream->url + 9, sizeof(mp_filename)); + else + av_strlcat(mp_filename, demuxer->stream->url, sizeof(mp_filename)); + } else + av_strlcat(mp_filename, "foobar.dummy", sizeof(mp_filename)); priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0, demuxer->stream, mp_read, NULL, mp_seek); diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 3f10b164ca..f16c203a38 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1062,7 +1062,7 @@ void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, if (!vo_border) vo_x11_decoration(vo, 0); // map window XMapWindow(mDisplay, x11->window); - XClearWindow(mDisplay, x11->window); + vo_x11_clearwindow(vo, x11->window); // wait for map do { XNextEvent(mDisplay, &xev); 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: |