[FFmpeg-devel] [PATCH]Stop demuxing wtv on eof

Peter Ross pross at xvid.org
Thu Oct 2 00:06:58 CEST 2014


On Wed, Oct 01, 2014 at 06:18:56PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes the wtv regression described in tickets #3991 and #3995 
> for me.
> 
> Please review, Carl Eugen

> diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
> index 4cb3295..674ff6e 100644
> --- a/libavformat/wtvdec.c
> +++ b/libavformat/wtvdec.c
> @@ -789,6 +789,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
>          len = avio_rl32(pb);
>          if (len < 32) {
>              int ret;
> +            if (avio_feof(pb))
> +                return AVERROR(EOF);
>              av_log(s, AV_LOG_WARNING, "encountered broken chunk\n");

Please commit. I have tested it also.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141002/1af68b93/attachment.asc>


More information about the ffmpeg-devel mailing list