[FFmpeg-devel] Google Summer of Code participation

Thilo Borgmann thilo.borgmann
Wed Apr 1 20:16:45 CEST 2009

Michael Niedermayer schrieb:
> as ronald said, AVPacket can be moved to avcodec.h
> I think simply updating all AVCodecs should do.
> It would break applications that have their own private AVCodecs but these
> should be few and they are evil anyway because where they not they would
> have submitted their AVCodec to us.
> (i guess someone will in 5min explain a non evil reason why one would have
> ones own AVCodec ...)
> and to be honest i prefer bumping the major version than having anyone
> spend a lot of time comming up with some complex woraround. That is if
> theres no easy way to avoid it and simply changing AVCodec doesnt work
> breaks more than a obscure application.
I've altered the AVCodec struct to contain a decode function pointer 
parameterized by a pointer to an AVPacket struct.

I've already integrated the necessary update to the audio/video decoder 
related to the CorePNG testfile (pngdec.c & pcm.c). This comes as a new 
function avcodec_decode_frame2() which takes an AVPacket. It is a simple 
wrapper calling the original accodec_decode_frame() by now. The new 
function is then specified in the AVCodec struct.
For the pcm.c there were some prefix addons for the functions, so it 
seems not to be as generic as I thought it would be. Also, the content 
of the AVCodec struct was #define'd.

Fortunately, I can compile without touching the other codecs (of course, 
a call to them will cause a segmentation fault). So, this update already 
works for the CorePNG testfile.

The question is, if this approach is ok and, if so, if someone feels 
appointed to integrate the wrapper function to the other codecs. I can 
do but as time is running out for my qualification task I would like to 
start off with the real decoding task.

I would like to support the patches so far so that you can see for 
yourself what changes I made. Tell me how to diff them exactly 
(parameters, old -> new || new -> old) and I will provide them.


More information about the ffmpeg-devel mailing list