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

2015-06-03 Thread Michael Niedermayer
On Wed, Jun 03, 2015 at 07:49:25PM +0800, Zhang Rui wrote: > 2015-06-03 19:24 GMT+08:00 Michael Niedermayer : > > would below work ? > > Looks better than mine. ok, applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can

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

2015-06-03 Thread Zhang Rui
2015-06-03 19:24 GMT+08:00 Michael Niedermayer : > would below work ? Looks better than mine. > > commit 816047eb161e804ba6312947f6bd7349cf934f80 > Author: Michael Niedermayer > Date: Wed Jun 3 13:04:37 2015 +0200 > > avformat/mov: Retry same packet on IO failure to avoid loosing a packet

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

2015-06-03 Thread Michael Niedermayer
On Tue, Jun 02, 2015 at 11:15:16AM +0800, Zhang Rui wrote: > 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()

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. >> In my opinion, retry is

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

2015-06-01 Thread 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. > In my opinion, retry is better than skip. > > > -/* must be done just bef

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

[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)