[Ffmpeg-devel] Patch: avi DV seeking

Amitha Perera perera-ffmpeg
Sat Jul 29 08:38:31 CEST 2006


Hi all

I have a large (11GB) DV file in avi that ffplay crashes when seeking
without the attached patch. I must admit, though, that this is a
"blind" fix, in that I don't know if the AVI format+ffmpeg
implementation should guarantee that ast2 should not be null at this
point. All I know is that in my particular DV file, it is null. And
st2->nb_index_entries == 0.

If this is not the correct way to fix the problem, let me know what
other info I could provide to help track down the problem.

Amitha.
-------------- next part --------------
--- libavformat/avidec.c	(revision 5845)
+++ libavformat/avidec.c	(working copy)
@@ -854,8 +854,10 @@
         AVStream *st2 = s->streams[i];
         AVIStream *ast2 = st2->priv_data;
 
-        ast2->packet_size=
-        ast2->remaining= 0;
+        if( ast2 ) {
+          ast2->packet_size=
+          ast2->remaining= 0;
+        }
 
         if (st2->nb_index_entries <= 0)
             continue;



More information about the ffmpeg-devel mailing list