Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 238641fde7980b244e5982934bc9977c > files > 4

2mandvd-1.8.4-9.mga5.src.rpm

diff -urN 2ManDVD.old/videowrapper.cpp 2ManDVD/videowrapper.cpp
--- 2ManDVD.old/videowrapper.cpp	2013-06-17 19:46:47.455636396 +0200
+++ 2ManDVD/videowrapper.cpp	2013-06-17 19:55:04.156618725 +0200
@@ -38,7 +38,7 @@
 int videowrapper::load_video(QString filename)
 {
     // *** OUVERTURE DU FICHIER VIDEO ***
-    #ifdef avformat_open_input
+    #if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,5,0)
         if (avformat_open_input(&pFormatCtx,filename.toAscii().data(),NULL,NULL)!=0)
         {
     #else
@@ -50,7 +50,7 @@
     }
 
     // *** RECUPERATION DES INFORMATIONS DU MEDIA ***
-    if(av_find_stream_info(pFormatCtx)<0)
+    if(avformat_find_stream_info(pFormatCtx, NULL)<0)
     {
         qDebug() << "CAN'T READ INFORMATION FROM VIDEO FILE : " << filename;
         return 1;
@@ -90,15 +90,10 @@
 
     // *** OUVERTURE DU CODEC ***
 
-    if(avcodec_open(pCodecCtx, pCodec)<0)
-    {
+    if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
         qDebug() << "CAN'T FIND VIDEO CODEC";
         return 1;
     }
-    /*if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
-        qDebug() << "CAN'T FIND VIDEO CODEC";
-        return 1;
-    }*/
 
     img_convert_ctx = sws_getContext(pCodecCtx->width,
                     pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,