File lightspark-0.5.7-ffmpeg_011.patch of Package lightspark

Index: src/backends/decoder.cpp
===================================================================
--- src/backends/decoder.cpp.orig
+++ src/backends/decoder.cpp
@@ -628,8 +628,7 @@ StreamDecoder::~StreamDecoder()
 FFMpegStreamDecoder::FFMpegStreamDecoder(std::istream& s):stream(s),formatCtx(NULL),audioFound(false),videoFound(false),avioContext(NULL)
 {
 	valid=false;
-	//NOTE: this will become avio_alloc_context in FFMpeg 0.7
-	avioContext=av_alloc_put_byte(avioBuffer,4096,0,this,avioReadPacket,NULL,NULL);
+	avioContext=avio_alloc_context(avioBuffer,4096,0,this,avioReadPacket,NULL,NULL);
 	if(avioContext==NULL)
 		return;
 
@@ -658,7 +657,9 @@ FFMpegStreamDecoder::FFMpegStreamDecoder
 	if(fmt==NULL)
 		return;
 
-	int ret=av_open_input_stream(&formatCtx, avioContext, "lightspark_stream", fmt, NULL);
+	formatCtx = avformat_alloc_context();
+	formatCtx->pb = avioContext;
+	int ret=avformat_open_input(&formatCtx, "lightspark_stream", fmt, NULL);
 	if(ret<0)
 		return;
 	
@@ -706,7 +707,7 @@ FFMpegStreamDecoder::~FFMpegStreamDecode
 	audioDecoder=NULL;
 	videoDecoder=NULL;
 	if(formatCtx)
-		av_close_input_stream(formatCtx);
+		av_close_input_file(formatCtx);
 	if(avioContext)
 		av_free(avioContext);
 }