[Ffmpeg-devel] Questions on lavf/lavc inner workflow with AVI type I

Axel Holzinger aholzinger
Sat Sep 2 21:02:36 CEST 2006


Hi all,

FOA many thanks to everybody working on ffmpeg, your work is very much
appreciated.

Currently I'm trying to become a little familiar with ffmpeg and the inner
workflow of lavf and lavc, regarding the handling of AVI files. By fiddling
with gdb a little, I see that on av_read_header only one single AVStream is
allocated to the fctx. Clearly an AVIStream struct is allocated as the
priv_data member. This is the only stream that is allocated in
av_read_header.

On calling av_find_stream_info, avi_read_packet is called and interestingly
enough, as the AVIContext member is set,  av_produce_packet which creates a
second stream for the audio. In the first moment, I was a little puzzled
about this (would you expect a function called find_stream_info to change
the internal structures by creating some object?), but I realized that this
was an elegant way to bring everything up as normal, despite the audio/video
muxing inside one stream in AVI DV Type 1 files, meaning having a separate
video and audio stream for the codecs to work on.

Now what makes my brain buzz and I don't understand yet: Shouldn't this new
stream have the priv_data member point to an  AVIStream struct? In gdb I
see, that the priv_data member stays NULL.

By googling the ffmpeg mail list archives I found this thread:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-March/008236.html
Maybe the seek crash has something to do with the non-allocated AVIStream
struct in priv_data?

It would be great if one of the AVI gurus of ffmpeg could enlighten me just
a little bit on this.

Thanks a lot
Axel





More information about the ffmpeg-devel mailing list