[FFmpeg-devel] [PATCH] libavformat/mov:the "stco" box parse no need return eof.

Michael Niedermayer michael at niedermayer.cc
Thu Nov 30 19:22:16 EET 2017


On Thu, Nov 30, 2017 at 03:18:47PM +0800, tiejun.peng wrote:
> discard corrupted track and good track have chance to play.
> 
> Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com>
> ---
>  libavformat/mov.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index c901859..5c2ce39 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1991,8 +1991,10 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
>  
>      sc->chunk_count = i;
>  
> -    if (pb->eof_reached)
> -        return AVERROR_EOF;
> +    if (i < entries) {
> +        av_log(c->fc, AV_LOG_WARNING, "stream id[0x%x]: corrupted STCO atom\n", st->id);
> +        st->discard = AVDISCARD_ALL;

why do you need AVDISCARD_ALL ?
st->discard is set by the user so the user can change this


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171130/9da0cff4/attachment.sig>


More information about the ffmpeg-devel mailing list