[Ffmpeg-devel] Re: encoding twice from an app yields lots of "ac-tex damaged at 0 0"

QuickTime ffmpeg
Thu Jun 29 02:43:37 CEST 2006


Dear: Karl:

You should not call "av_free_static()" if you wanna enter
twice,otherwise,  it will destroy many VLC tables, so you obtain the
"ac damaged ...." information


>
> Hi all,
>
> any help on this would be greatly appreciated.
> I've tried bumping to recent SVN. Also, I've tried making ffmpeg encode
> execute the main look twice (which works without problems). I've also
> dumped every global variable I'm using for encoding and can see that every
> pointer is different execpt for output format and codec, which shoudl be
> references to objects in libavcodec/format and can prolly be expected to
> point to the same memory address.
> I'm running out of ideas quickly.
>
> You can take a look at the good and broken videos here:
> http://www.jarre-de-the.net/computing/test-broken.avi
> http://www.jarre-de-the.net/computing/test-works.avi
>
> TIA,
>
> Karl.
>
>
> On Mon, June 26, 2006 4:03 pm, Karl H. Beckers said:
> > Hi all,
> >
> > I may be doing smth. completely wrong here, but am unable to find what ...
> > and perhaps one of you guys has come across this:
> >
> > I have this app which encodes images gotten elsewhere to a video using
> > libavcodec/-format.
> > If I do this once everything works like a charm.
> > If I start the encoding again after stopping the first one and without
> > restarting the whole app, the resulting video is broken. It has MANY
> > artefacts most of the time more artefacts than actual video.
> > An MSMPEG4v2 video gives lots of these messages:
> > "ac-tex damaged at 0 0"
> > A FLV1 video these:
> > "run overflow at 0x0 i:1"
> >
> >
> > My first idea was "I must be forgetting to clean up smth. between the
> > encoding sessions", however I'm unable to find what. when stopping session
> > 1 I do:
> >
> >     if (out_st) {
> >         avcodec_close(out_st->codec);
> >         out_st = NULL;
> >     }
> >
> >     if (output_file) {
> >         /*
> >          * write trailer
> >          */
> >         av_write_trailer(output_file);
> >         /*
> >          * free stream(s) ... probably always only one
> >          */
> >         for (j = 0; j < output_file->nb_streams; j++)
> >             av_free(output_file->streams[j]);
> >
> >         /*
> >          * close file if multi-frame capture ... otherwise closed already
> >          */
> >         if (job->target >= CAP_MF)
> >             url_fclose(&output_file->pb);
> >         /*
> >          * free format context
> >          */
> >         av_free(output_file->priv_data);
> >         av_free(output_file);
> >         output_file = NULL;
> >     }
> >
> >     if (outpic_buf) { // this is the data of the output frame
> >         av_free(outpic_buf);
> >         outpic_buf = NULL;
> >     }
> >     free(outbuf); // this is the memory for the encoded frame
> >     outbuf = NULL;
> >     av_free(p_inpic);
> >     p_inpic = NULL; // the input frame
> >     av_free(outpic_buf); the actual image data of the output frame
> >     av_free(p_outpic);
> >     p_outpic = NULL; // the output frame
> >
> >     if (input_pixfmt == PIX_FMT_PAL8 && scratchbuf8bit) {
> >         free(scratchbuf8bit);
> >         scratchbuf8bit = NULL;
> >     }
> >
> >     codec = NULL;
> >
> >     av_free_static();
> >
> >
> > Any ideas, hints? Am I forgetting anything?
> >
> > TIA,
> >
> > Karl.
> >

-- 
//----------------------------------------
Heaven is not a place, it's just a feeling




More information about the ffmpeg-devel mailing list