[FFmpeg-devel] [PATCH] avformat/concatdec: do not close previous input if failed to open next

2015-01-29 Thread Zhang Rui
Avoid NULL access in next call of concat_read_packet(). --- libavformat/concatdec.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index e109524..a593686 100644 --- a/libavformat/concatdec.c +++ b/

Re: [FFmpeg-devel] [PATCH] avformat/concatdec: do not close previous input if failed to open next

2015-01-29 Thread Zhang Rui
2015-01-29 16:41 GMT+08:00 Nicolas George : > Le decadi 10 pluviôse, an CCXXIII, Zhang Rui a écrit : >> Avoid NULL access in next call of concat_read_packet(). > Can you explain how to trigger it? I use concatdec for concat multiple stream over http protocol, by set option "

[FFmpeg-devel] [PATCH] avformat/concatdec: avoid NULL dereference when failed to open file.

2015-01-29 Thread Zhang Rui
--- libavformat/concatdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index e109524..f07cfd7 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -482,6 +482,9 @@ static int concat_read_packet(AVFormatContext *avf, AV

[FFmpeg-devel] [PATCH] avformat/cache: pass options to the underlying protocol via the url_open2

2015-01-30 Thread Zhang Rui
--- libavformat/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/cache.c b/libavformat/cache.c index 02b02bb..26e68c5 100644 --- a/libavformat/cache.c +++ b/libavformat/cache.c @@ -70,7 +70,7 @@ static int cmp(void *key, const void *node) return (*

[FFmpeg-devel] [PATCH 1/2] avformat/mov: check result of avio_seek

2015-05-20 Thread Zhang Rui
--- libavformat/mov.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 085d2a7..bfbf599 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4229,7 +4229,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)

[FFmpeg-devel] [PATCH 2/2] avformat/mov: increase current_sample after reading, to avoid discontinuous sample

2015-05-20 Thread Zhang Rui
--- libavformat/mov.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index bfbf599..a8f818f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4241,8 +4241,6 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mov: increase current_sample after reading, to avoid discontinuous sample

2015-05-20 Thread Zhang Rui
Discontinuous sample could cause corrupted image if next video frame is non-key frame. Mostly, avio_seek() fails on I/O error for http/ftp/... stream. In my opinion, retry is better than skip. > -/* must be done just before reading, to avoid infinite loop on sample */ > -sc->current_sampl

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mov: increase current_sample after reading, to avoid discontinuous sample

2015-06-01 Thread Zhang Rui
2015-06-02 7:26 GMT+08:00 Michael Niedermayer : > On Thu, May 21, 2015 at 12:31:21PM +0800, Zhang Rui wrote: >> Discontinuous sample could cause corrupted image if next video frame >> is non-key frame. >> >> Mostly, avio_seek() fails on I/O error for http/ftp/... stream.

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mov: increase current_sample after reading, to avoid discontinuous sample

2015-06-03 Thread Zhang Rui
void loosing a packet > > Based on patch by: Zhang Rui > Signed-off-by: Michael Niedermayer > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 5300704..bc5743a 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -4316,6 +4316,13

[FFmpeg-devel] [PATCH] avutil/log: modify AV_LOG_MAX_OFFSET for AV_LOG_TRACE

2015-06-26 Thread Zhang Rui
--- libavutil/log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/log.h b/libavutil/log.h index db7eb3f..321748c 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -196,13 +196,13 @@ typedef struct AVClass { */ #define AV_LOG_DEBUG48 -#define AV_LOG_

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-06-30 Thread Zhang Rui
> +static void videotoolbox_default_free(AVCodecContext *avctx) > +{ > +AVVideotoolboxContext *videotoolbox = avctx->hwaccel_context; > + > +if (videotoolbox) { > +if (videotoolbox->cm_fmt_desc) > +CFRelease(videotoolbox->cm_fmt_desc); > + > +if (videotoolbox->se

[FFmpeg-devel] [PATCH] configure: try to fix \r when build for android on cygwin

2015-07-09 Thread Zhang Rui
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5833808..46c4788 100755 --- a/configure +++ b/configure @@ -475,7 +475,7 @@ sh_quote(){ } cleanws(){ -echo "$@" | sed 's/^ *//;s/ */ /g;s/ *$//;s/\\r//g' +echo "$@" | sed "s/^

[FFmpeg-devel] [PATCH] configure: clean whitespace with [:space:]

2015-07-13 Thread Zhang Rui
https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cc23991..2e54930 100755 --- a/configure +++ b/configure @@ -476,7 +476,7 @@ sh_quote(){ } cleanws(){ -

Re: [FFmpeg-devel] [PATCH] configure: clean whitespace with [:space:]

2015-07-13 Thread Zhang Rui
Gmail seems do not recognize 'in-reply-to' Previous patch is here: http://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/175291.html With NDKr10e on Cygwin, CC_IDENT is defined as #define CC_IDENT "gcc 4.8 \r(GCC)" ___ ffmpeg-devel mailing list ffmpeg-devel

[FFmpeg-devel] [PATCH] avutil/fifo: func could return less bytes in av_fifo_generic_write()

2015-07-13 Thread Zhang Rui
--- libavutil/fifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 4ff3194..f2fe93d 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -129,7 +129,8 @@ int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, do {

[FFmpeg-devel] [PATCH] [RFC] avformat/async: support filling with a background thread.

2015-07-16 Thread Zhang Rui
OCOL(BLURAY, bluray); REGISTER_PROTOCOL(CACHE,cache); REGISTER_PROTOCOL(CONCAT, concat); diff --git a/libavformat/async.c b/libavformat/async.c new file mode 100644 index 000..36c7a061 --- /dev/null +++ b/libavformat/async.c @@ -0,0 +1,380 @@ +/* + * Input as

Re: [FFmpeg-devel] [PATCH] [RFC] avformat/async: support filling with a background thread.

2015-07-16 Thread Zhang Rui
Supposed to work as: async:cache:http://example.org/video.mp4 or async:http://example.org/video.mp4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

[FFmpeg-devel] [PATCH] [RFC] doc: add a section about async protocol

2015-07-16 Thread Zhang Rui
--- doc/protocols.texi | 12 1 file changed, 12 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 453dbcf..f152f5a 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -19,6 +19,18 @@ supported protocols. A description of the currently available proto

Re: [FFmpeg-devel] [PATCH] [RFC] avformat/async: support filling with a background thread.

2015-07-16 Thread Zhang Rui
2015-07-16 22:00 GMT+08:00 Michael Niedermayer : > On Thu, Jul 16, 2015 at 03:04:42PM +0800, Zhang Rui wrote: >> --- >> configure| 1 + >> libavformat/Makefile | 1 + >> libavformat/allformats.c | 1 + >>

Re: [FFmpeg-devel] [PATCH] [RFC] avformat/async: support filling with a background thread.

2015-07-18 Thread Zhang Rui
2015-07-17 21:52 GMT+08:00 Michael Niedermayer : > On Fri, Jul 17, 2015 at 12:00:57PM +0800, Zhang Rui wrote: >> 2015-07-16 22:00 GMT+08:00 Michael Niedermayer : >> > On Thu, Jul 16, 2015 at 03:04:42PM +0800, Zhang Rui wrote: >> >> --- >> >> configure

[FFmpeg-devel] [PATCH 1/3] MAINTAINERS: add myself as a maintainer for async protocol

2015-07-21 Thread Zhang Rui
Zhang Rui bluray.c Petri Hintukainen ftp.c Lukasz Marek http.cRonald S. Bultje -- 2.0.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 2/3] fate: add test for async protocol

2015-07-21 Thread Zhang Rui
--- libavformat/Makefile | 3 +- libavformat/async.c| 169 + tests/fate/libavformat.mak | 4 ++ tests/ref/fate/async | 7 ++ 4 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/async diff --git

[FFmpeg-devel] [PATCH 3/3] avformat/async: avoid deadlock on close

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/async.c b/libavformat/async.c index 1ab28d3..36c86d0 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -129,7 +129,8 @@ static void *async_buffer_task(void *arg) if (c->io

Re: [FFmpeg-devel] [PATCH 2/3] fate: add test for async protocol

2015-07-21 Thread Zhang Rui
2015-07-21 17:22 GMT+08:00 Michael Niedermayer : > On Tue, Jul 21, 2015 at 03:46:03PM +0800, Zhang Rui wrote: >> --- >> libavformat/Makefile | 3 +- >> libavformat/async.c| 169 >> + >> tests/fate/libav

Re: [FFmpeg-devel] [PATCH 1/5] lavu: add JNI support

2015-10-09 Thread Zhang Rui
2015-10-10 0:26 GMT+08:00 Matthieu Bouron : > From: Matthieu Bouron > +#include "config.h" > +#include "jni.h" > +#include "log.h" > + > +#include > + > +JavaVM *java_vm = NULL; Maybe static is better for --enable-static. ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH 5/5] lavf: add Android content resolver protocol support

2015-10-09 Thread Zhang Rui
> +struct JFields { > + > +jclass uri_class; > +jclass parse_id; > + > +jclass context_class; > +jmethodID get_content_resolver_id; > + > +jclass content_resolver_class; > +jmethodID open_file_descriptor_id; > + > +jclass parcel_file_descriptor_class; > +jmethodID de

Re: [FFmpeg-devel] [PATCH 3/5] lavu/jni: add helpers to manage android application contexts

2015-10-09 Thread Zhang Rui
2015-10-10 0:26 GMT+08:00 Matthieu Bouron : > From: Matthieu Bouron > > --- > libavutil/jni.c | 104 > +++ > libavutil/jni.h | 28 + > libavutil/jni_internal.c | 30 ++ > libavutil/jni_internal.h | 11 +

[FFmpeg-devel] [PATCH 1/2] avformat/async: pass internal I/O error

2015-10-10 Thread Zhang Rui
av_fifo_generic_write() does not return any error code. --- libavformat/async.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index a01673d..9172f5d 100644 --- a/libavformat/async.c +++ b/libavformat/asyn

[FFmpeg-devel] [PATCH 2/2] fate/async: test error code from underlying protocol

2015-10-10 Thread Zhang Rui
--- libavformat/async.c | 41 + tests/ref/fate/async | 2 ++ 2 files changed, 43 insertions(+) diff --git a/libavformat/async.c b/libavformat/async.c index 9172f5d..a8c8f54 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -387,6 +387,9 @@ sta

[FFmpeg-devel] [PATCH 1/2] avutil/fifo: add function av_fifo_generic_peek_at()

2015-10-13 Thread Zhang Rui
--- libavutil/fifo.c| 37 + libavutil/fifo.h| 11 +++ tests/ref/fate/fifo | 14 ++ 3 files changed, 62 insertions(+) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 07fb4ec..cabb009 100644 --- a/libavutil/fifo.c +++ b/libavuti

[FFmpeg-devel] [PATCH 2/2] avformat/async: cache some data for fast seek backward

2015-10-13 Thread Zhang Rui
--- libavformat/async.c | 123 1 file changed, 104 insertions(+), 19 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index a8c8f54..9fac84a 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -24,7 +24,6 @@ /**

[FFmpeg-devel] [PATCH 1/2] avutil/fifo: add function av_fifo_generic_peek_at()

2015-10-13 Thread Zhang Rui
--- libavutil/fifo.c| 55 + libavutil/fifo.h| 11 +++ tests/ref/fate/fifo | 27 ++ 3 files changed, 93 insertions(+) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 07fb4ec..a7da591 100644 --- a/lib

Re: [FFmpeg-devel] [PATCH] avutil/WIP: add AVAsync API

2015-11-10 Thread Zhang Rui
2015-11-11 8:27 GMT+08:00 Clément Bœsch : > From: Clément Bœsch > > --- > > So here is a first prototype of a higher level API following an > asynchronous model to (for now) simply use the current synchronous API. > > I suggest to look at libavutil/async.h (sorry no doxy yet) and > doc/examples/as

Re: [FFmpeg-devel] [SURVEY] Summary of first 2015 survey

2015-11-15 Thread Zhang Rui
2015-11-16 2:50 GMT+08:00 compn : > On Sun, 15 Nov 2015 15:19:05 +0100 > Clément Bœsch wrote: > >> Hi folks, >> >> So the October/November 2015 FFmpeg survey ended, so as promised here >> is a summary. It was planed for yesterday but due to some unfortunate >> national issues it was kind of postpo

[FFmpeg-devel] [PATCH] avformat/concatdec: get bit_rate from internal format

2015-12-28 Thread Zhang Rui
--- libavformat/concatdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index d21805f..4c7217c 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -310,6 +310,7 @@ static int open_file(AVFormatContext *avf, unsigned fileno

Re: [FFmpeg-devel] [PATCH] avformat/concatdec: get bit_rate from internal format

2016-01-03 Thread Zhang Rui
ping? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] avformat/concatdec: get bit_rate from internal format

2016-01-04 Thread Zhang Rui
>> av_dump_format() could show something better than 0. > > Yes, but what would be the point? How is it actually useful to know the > average bitrate of a concatenated stream? Actually, I use custom IO in my own application to prefetch data via HTTP. I'm trying to calculate duration from bytes wit

Re: [FFmpeg-devel] [PATCH] avformat/concatdec: get bit_rate from internal format

2016-01-04 Thread Zhang Rui
2016-01-05 2:12 GMT+08:00 Nicolas George : > Le quintidi 15 nivôse, an CCXXIV, Zhang Rui a écrit : >> Actually, I use custom IO in my own application to prefetch data via HTTP. >> I'm trying to calculate duration from bytes with bit_rate, for: >> 1. Calculate necessary do

[FFmpeg-devel] [PATCH 2/3] fate: add test for async protocol

2015-07-21 Thread Zhang Rui
--- libavformat/Makefile | 3 +- libavformat/async.c| 171 + tests/fate/libavformat.mak | 4 ++ tests/ref/fate/async | 7 ++ 4 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/async diff --git

[FFmpeg-devel] [PATCH 3/3] avformat/async: avoid deadlock on close

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 53 ++--- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index be02308..45c484a 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -71,17 +71,16 @@ typede

[FFmpeg-devel] [PATCH 1/4] avformat/async: fix interrupt_callback usage and return code

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index be02308..0c7f054 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -75,13 +75,12 @@ static int async_interrupt_callback(void *arg) {

[FFmpeg-devel] [PATCH 2/4] avformat/async: rename async_interrupt_callback to async_check_interrupt

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index 0c7f054..e524d33 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -71,7 +71,7 @@ typedef struct Context { AVIOInterruptCB interru

[FFmpeg-devel] [PATCH 3/4] avformat/async: move more code into locked area in background thread

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index e524d33..856b4dd 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -95,15 +95,15 @@ static void *async_buffer_task(void *arg) while

[FFmpeg-devel] [PATCH 4/4] avformat/async: wake up main thread before exit background thread

2015-07-21 Thread Zhang Rui
--- libavformat/async.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/async.c b/libavformat/async.c index 856b4dd..a905f8d 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -99,6 +99,7 @@ static void *async_buffer_task(void *arg) if (async_check_interrupt(h))

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-27 Thread Zhang Rui
2015-07-15 21:51 GMT+08:00 Clément Bœsch : > On Sat, Jun 20, 2015 at 01:33:00PM +0200, Sebastien Zwickert wrote: >> Old videtotoolbox patch rebased and updated to target the new HWAccel API. >> As VDA is a wrapper of VideoToolbox framework, the changes base vda >> implementation >> upon the videot

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-27 Thread Zhang Rui
2015-07-27 19:22 GMT+08:00 wm4 : > On Mon, 27 Jul 2015 18:13:30 +0800 > Zhang Rui wrote: > >> 2015-07-15 21:51 GMT+08:00 Clément Bœsch : >> > On Sat, Jun 20, 2015 at 01:33:00PM +0200, Sebastien Zwickert wrote: >> >> Old videtotoolbox patch rebased and u

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-27 Thread Zhang Rui
2015-07-27 20:14 GMT+08:00 Clément Bœsch : > On Mon, Jul 27, 2015 at 06:13:30PM +0800, Zhang Rui wrote: >> 2015-07-15 21:51 GMT+08:00 Clément Bœsch : >> > On Sat, Jun 20, 2015 at 01:33:00PM +0200, Sebastien Zwickert wrote: >> >> Old videtotoolbox patch rebased and upd

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-28 Thread Zhang Rui
2015-07-28 16:04 GMT+08:00 Clément Bœsch : > On Mon, Jul 27, 2015 at 10:10:12PM +0800, Zhang Rui wrote: >> 2015-07-27 20:14 GMT+08:00 Clément Bœsch : >> > On Mon, Jul 27, 2015 at 06:13:30PM +0800, Zhang Rui wrote: >> >> 2015-07-15 21:51 GMT+08:00 Clément Bœsch : >

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-30 Thread Zhang Rui
2015-07-30 0:01 GMT+08:00 Clément Bœsch : > On Tue, Jul 28, 2015 at 09:01:50PM +0800, Zhang Rui wrote: >> 2015-07-28 16:04 GMT+08:00 Clément Bœsch : >> > On Mon, Jul 27, 2015 at 10:10:12PM +0800, Zhang Rui wrote: >> >> 2015-07-27 20:14 GMT+08:00 Clément Bœsch : >

Re: [FFmpeg-devel] [PATCH] avcodec: add new Videotoolbox hwaccel.

2015-07-30 Thread Zhang Rui
2015-07-30 16:37 GMT+08:00 wm4 : > On Thu, 30 Jul 2015 16:08:36 +0800 > Zhang Rui wrote: > >> 2015-07-30 0:01 GMT+08:00 Clément Bœsch : >> > On Tue, Jul 28, 2015 at 09:01:50PM +0800, Zhang Rui wrote: >> >> 2015-07-28 16:04 GMT+08:00 Clément Bœsch : >> >

Re: [FFmpeg-devel] [PATCH] videotoolbox: allow to enable the async decoding.

2015-08-12 Thread Zhang Rui
> status = VTDecompressionSessionDecodeFrame(videotoolbox->session, > sample_buf, > - 0, // decodeFlags > + decodeFlags, >

Re: [FFmpeg-devel] [PATCH] videotoolbox: allow to enable the async decoding.

2015-08-12 Thread Zhang Rui
2015-08-09 19:19 GMT+08:00 Hendrik Leppkes : > On Sun, Aug 9, 2015 at 1:11 PM, Sebastien Zwickert wrote: >> This patch allows to use the Videotoolbox API in asynchonous mode. >> Note that when using async decoding the user is responsible for >> releasing the async frame. >> Moreover, an option cal

Re: [FFmpeg-devel] [PATCH] videotoolbox: allow to enable the async decoding.

2015-08-13 Thread Zhang Rui
2015-08-13 14:26 GMT+08:00 Clément Bœsch : > On Thu, Aug 13, 2015 at 01:07:38PM +0800, Zhang Rui wrote: >> > status = VTDecompressionSessionDecodeFrame(videotoolbox->session, >> >

[FFmpeg-devel] [PATCH] ffplay: remove unused include libavutil/colorspace.h

2015-08-26 Thread Zhang Rui
--- ffplay.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index cde88db..d0e1822 100644 --- a/ffplay.c +++ b/ffplay.c @@ -31,7 +31,6 @@ #include #include "libavutil/avstring.h" -#include "libavutil/colorspace.h" #include "libavutil/eval.h" #include "libavutil/mathe

[FFmpeg-devel] [PATCH] avformat/async: replace strerror with av_err2str

2015-09-05 Thread Zhang Rui
Fixes CID1322337 --- libavformat/async.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index 60ea14c..15355fb 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -170,7 +170,7 @@ static int async_open(URLContext

Re: [FFmpeg-devel] [PATCH 2/2] avformat/http: exponentially delay reconnection to avoid flooding the server

2015-09-06 Thread Zhang Rui
>> Doesn't this have overflow issues? >> More precisely, are you sure this behaves correctly when the int >> reconnect_delay wraps around? > > i intend to add a reconnect_max that limits reconnects and prevents > overflow, just wanted to first make sure noone has objections to > these 2 patches bef

[FFmpeg-devel] [PATCH] avformat/async: fix integer conversion warning

2015-09-06 Thread Zhang Rui
--- libavformat/async.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index 15355fb..003212d 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -50,7 +50,7 @@ typedef struct Context { URLContext

[FFmpeg-devel] [RFC] avformat: access AVFormatContext.filename[] filed via getter/setter.

2015-09-14 Thread Zhang Rui
URLs longer than 1024 could be truncated by AVFormatContext. The field filename[1024] should be replaced with allocated string in future. --- ffmpeg.c | 8 +++ ffmpeg_opt.c | 8 +++ ffplay.c | 20 +- ffpr

Re: [FFmpeg-devel] [RFC] avformat: access AVFormatContext.filename[] filed via getter/setter.

2015-09-14 Thread Zhang Rui
2015-09-14 17:48 GMT+08:00 Zhang Rui : > URLs longer than 1024 could be truncated by AVFormatContext. > The field filename[1024] should be replaced with allocated string in future. I'd like to know if this API-change could happen, since it will break many things. And there is one dire

Re: [FFmpeg-devel] [RFC] avformat: access AVFormatContext.filename[] filed via getter/setter.

2015-09-14 Thread Zhang Rui
2015-09-14 18:54 GMT+08:00 Nicolas George : > L'octidi 28 fructidor, an CCXXIII, Zhang Rui a écrit : >> I'd like to know if this API-change could happen, since it will break >> many things. > > It depends on the decision about ABI compatibility, that itself depe

Re: [FFmpeg-devel] [PATCH 2/3] avformat/async: Allow compilation with native threads.

2015-09-25 Thread Zhang Rui
2015-09-25 15:56 GMT+08:00 Matt Oliver : > Allows async to be compiled and used when using native win32/os2 threads > aswell as pthreads. LGTM about async. BTW: Attachment of "[PATCH 3/3]" seems missing. Regards. ___ ffmpeg-devel mailing list ffmpeg-de

[FFmpeg-devel] [PATCH 1/2] lavf/avformat: add support for passing options to nested input

2015-03-05 Thread Zhang Rui
--- libavformat/avformat.h | 5 + libavformat/utils.c| 14 -- libavformat/version.h | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 4211a95..035e2d4 100644 --- a/libavformat/avformat.h +++ b/libavf

[FFmpeg-devel] [PATCH 2/2] lavf/concatdef: pass options to nested input

2015-03-05 Thread Zhang Rui
--- libavformat/concatdec.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index f07cfd7..a6bf6ee 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -56,6 +56,7 @@ typedef struct {

Re: [FFmpeg-devel] [PATCH 2/2] lavf/concatdef: pass options to nested input

2015-03-05 Thread Zhang Rui
2015-03-05 19:06 GMT+08:00 Nicolas George : > Le quintidi 15 ventôse, an CCXXIII, Zhang Rui a écrit : >> Subject: [FFmpeg-devel] [PATCH 2/2] lavf/concatdef: pass options to > > "concatdec" I suppose? Sorry, my fault. > >> --- >> libavformat/concatdec.c

Re: [FFmpeg-devel] [PATCH 2/2] lavf/concatdef: pass options to nested input

2015-03-05 Thread Zhang Rui
2015-03-05 20:34 GMT+08:00 Nicolas George : > Le quintidi 15 ventôse, an CCXXIII, Zhang Rui a écrit : > >> Your solution is enough for my case. >> And as you said, my patch may be not desirable. > > I believe it depends on the use case, and it is not completely obvious w

[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread Zhang Rui
--- libavformat/http.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 55dcb6e..9d44f3b 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -93,6 +93,7 @@ typedef struct HTTPContext { A

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-08 Thread Zhang Rui
>> +{ "reconnect", "auto reconnect after disconnect before EOF", >> OFFSET(reconnect), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, D }, > > The default of this setting is probably worth a discussion. The default value is not my concern, So I make the default behavior remain unchanged. May I have you

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-08 Thread Zhang Rui
>> +read_ret = http_buf_read(h, buf, size); >> +if (s->reconnect && s->filesize > 0 && s->off < s->filesize && >> read_ret < 0) { >> > > minor: you can chek read_ret < 0 first, this condition usually will net be > meet. Fine, I'll fix. >> +av_log(h, AV_LOG_WARNING, "Will reconnect

[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-11 Thread Zhang Rui
--- libavformat/http.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 55dcb6e..86380b2 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -93,6 +93,7 @@ typedef struct HTTPContext { A

[FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-08 Thread Zhang Rui
avio_feof() and avio_seek() could reset eof_reached to 0, after some silent IO error in avio_r*(). And the reconnection caused by seek makes demuxer to continue read at wrong position. --- libavformat/flvdec.c | 66 1 file changed, 41 insertions

Re: [FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-11 Thread Zhang Rui
2015-04-10 22:04 GMT+08:00 wm4 : > On Fri, 10 Apr 2015 21:17:42 +0800 > Zhang Rui wrote: >> >> This kind of error handling need some more work in aviobuf.c, >> and more advises from ffmpeg developers. >> And i prefer this way than the patch I posted. > > s

Re: [FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-12 Thread Zhang Rui
2015-04-12 22:45 GMT+08:00 Michael Niedermayer : > On Sun, Apr 12, 2015 at 12:00:18PM +0800, Zhang Rui wrote: >> 2015-04-10 22:04 GMT+08:00 wm4 : >> > On Fri, 10 Apr 2015 21:17:42 +0800 >> > Zhang Rui wrote: >> >> >> >> This kind of error handli

Re: [FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-13 Thread Zhang Rui
2015-04-14 1:09 GMT+08:00 wm4 : > On Mon, 13 Apr 2015 12:02:29 +0800 > Zhang Rui wrote: > >> 2015-04-12 22:45 GMT+08:00 Michael Niedermayer : >> > On Sun, Apr 12, 2015 at 12:00:18PM +0800, Zhang Rui wrote: >> >> 2015-04-10 22:04 GMT+08:00 wm4 : >&g

Re: [FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-16 Thread Zhang Rui
2015-04-15 18:38 GMT+08:00 wm4 : > On Tue, 14 Apr 2015 11:24:23 +0800 > Zhang Rui wrote: > >> 2015-04-14 1:09 GMT+08:00 wm4 : >> > On Mon, 13 Apr 2015 12:02:29 +0800 >> > Zhang Rui wrote: >> > >> >> 2015-04-12 22:45 GMT+08:00 Michael Niederma

Re: [FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently

2015-04-16 Thread Zhang Rui
>>> I want to let av_read_frame() tell us (user application) what to do next, >>> by returning limited code, at least limited on special situation >>> which need more handling, including >>> AV_ERROR_EAGIN; >>> AV_ERROR_END_OF_STREAM_YOU_NAME_IT; >>> AV_ERROR_EXIT; // interrupted with interrupt cal