Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 75029033b88be7849626b2bd13e225db > files > 6

gpac-0.5.0-8.mga5.tainted.src.rpm

--- gpac/modules/ffmpeg_in/ffmpeg_decode.c.original	2012-02-29 18:24:24.000000000 +0200
+++ gpac/modules/ffmpeg_in/ffmpeg_decode.c	2013-05-28 13:45:02.415980878 +0300
@@ -169,7 +169,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
 		frame = &ffd->base_frame;
 	}
 	if (!(*ctx)){
-	  *ctx = avcodec_alloc_context();
+	  *ctx = avcodec_alloc_context3(NULL);
 	}
 
 	/*private FFMPEG DSI*/
@@ -317,7 +317,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
 		(*ctx)->pix_fmt = ffd->raw_pix_fmt;
 		if ((*ctx)->extradata && strstr((*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
 	} else {
-		if (avcodec_open((*ctx), (*codec) )<0) return GF_NON_COMPLIANT_BITSTREAM;
+		if (avcodec_open2((*ctx), (*codec), NULL)<0) return GF_NON_COMPLIANT_BITSTREAM;
 	}
 
 	/*setup audio streams*/
@@ -749,7 +749,7 @@ redecode:
 			here this means the DSI was broken, so no big deal*/
 			avcodec_close(ctx);
 			*codec = avcodec_find_decoder(CODEC_ID_H263);
-			if (! (*codec) || (avcodec_open(ctx, *codec)<0)) return GF_NON_COMPLIANT_BITSTREAM;
+			if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
 #if USE_AVCODEC2
 			if (avcodec_decode_video2(ctx, frame, &gotpic, &pkt) < 0) {
 #else
@@ -759,7 +759,7 @@ redecode:
 				avcodec_close(ctx);
 				*codec = avcodec_find_decoder(old_codec);
 				assert(*codec);
-				avcodec_open(ctx, *codec);
+				avcodec_open2(ctx, *codec, NULL);
 				return GF_NON_COMPLIANT_BITSTREAM;
 			}
 		}
--- gpac/modules/ffmpeg_in/ffmpeg_demux.c.original	2012-04-04 15:57:37.000000000 +0300
+++ gpac/modules/ffmpeg_in/ffmpeg_demux.c	2013-05-28 13:58:57.416188668 +0300
@@ -290,7 +290,7 @@ static Bool FFD_CanHandleURL(GF_InputSer
 			return 0;
 		}
 	}
-    if (!ctx || av_find_stream_info(ctx) <0) goto exit;
+    if (!ctx || avformat_find_stream_info(ctx, NULL) <0) goto exit;
 
 	/*figure out if we can use codecs or not*/
 	has_video = has_audio = 0;
@@ -614,7 +614,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
 			}
 			/*setup downloader*/
 			av_in->flags |= AVFMT_NOFILE;
-#if FF_API_FORMAT_PARAMETERS /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
+#if (LIBAVFORMAT_VERSION_MAJOR < 55) /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
 			res = avformat_open_input(&ffd->ctx, szName, av_in, NULL);
 #else
 			res = av_open_input_stream(&ffd->ctx, &ffd->io, szName, av_in, NULL);
@@ -637,7 +637,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
 
 	GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[FFMPEG] looking for streams in %s - %d streams - type %s\n", ffd->ctx->filename, ffd->ctx->nb_streams, ffd->ctx->iformat->name));
 
-	res = av_find_stream_info(ffd->ctx);
+	res = avformat_find_stream_info(ffd->ctx, NULL);
 	if (res <0) {
 		GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] cannot locate streams - error %d\n", res));
 		e = GF_NOT_SUPPORTED;
@@ -699,7 +699,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
 		if (!ffd->seekable) {
 			av_close_input_file(ffd->ctx);
 			open_file(&ffd->ctx, szName, av_in);
-			av_find_stream_info(ffd->ctx);
+			avformat_find_stream_info(ffd->ctx, NULL);
 		}
 	}
 
--- gpac/modules/redirect_av/ffmpeg_ts_muxer.c.original	2011-05-03 16:00:46.000000000 +0300
+++ gpac/modules/redirect_av/ffmpeg_ts_muxer.c	2013-05-28 13:39:10.694202510 +0300
@@ -231,12 +231,12 @@ GF_AbstractTSMuxer * ts_amux_new(GF_AVRe
     dump_format(ts->oc, 0, avr->destination, 1);
     GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[AVRedirect] DUMPING to %s...\n", ts->destination));
 
-    if (avcodec_open(ts->video_st->codec, avr->videoCodec) < 0) {
+    if (avcodec_open2(ts->video_st->codec, avr->videoCodec, NULL) < 0) {
         GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[AVRedirect] failed to open video codec\n"));
         return NULL;
     }
 #if REDIRECT_AV_AUDIO_ENABLED
-    if (avcodec_open(ts->audio_st->codec, avr->audioCodec) < 0) {
+    if (avcodec_open2(ts->audio_st->codec, avr->audioCodec, NULL) < 0) {
         GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[AVRedirect] failed to open audio codec\n"));
         return NULL;
     }