[FFmpeg-devel] [PATCH] libavformat/dv.c bugfix for crash on certain dv-files

Baptiste Coudurier baptiste.coudurier
Wed Aug 26 02:45:48 CEST 2009


On 08/08/2009 11:28 PM, Peter Schlaile wrote:
> Hi,
>
> the following patch fixes nasty crashes, that happen if c->sys isn't
> available because of broken frames. (Can happen on tape read errors.)
>
> After applying this patch, Blender hasn't ever crashed for me on DV
> files since.
>
> The patch, although made against ffmpeg 0.5, applies cleanly against
> today's GIT.
>
> Cheers,
> Peter
>
> ----
> Peter Schlaile
>
>
> ------------------------------------------------------------------------
>
> Index: libavformat/dv.c
> ===================================================================
> --- libavformat/dv.c	(revision 20714)
> +++ libavformat/dv.c	(working copy)
> @@ -380,9 +380,12 @@
>
>   void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset)
>   {
> +    // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk)
> +    const DVprofile* sys = dv_codec_profile(c->vst->codec);
> +

It seem sys is already recomputed in dv_frame_offset, it seems better to 
reset c->sys here instead.

[...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list