Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 5bc8979650d4cac0212bfd5c2d62cb72 > files > 2

tupi-0.2-0.09122012.2.mga3.src.rpm

diff -uNr tupi.orig/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp tupi/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
--- tupi.orig/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp	2012-12-09 14:55:20.000000000 -0500
+++ tupi/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp	2012-12-31 19:02:29.605774034 -0500
@@ -473,6 +473,7 @@
         return false;
     }
 
+    /*  
     if (av_set_parameters(k->oc, 0) < 0) {
         k->errorMsg = "ffmpeg error: Invalid output format parameters. This is not a problem directly related to Tupi. \
                        Please, check your ffmpeg installation and codec support. More info: http://ffmpeg.org/";
@@ -481,8 +482,9 @@
         #endif
         return false;
     }
+   */ 
 
-    dump_format(k->oc, 0, k->movieFile.toLocal8Bit().data(), 1);
+    av_dump_format(k->oc, 0, k->movieFile.toLocal8Bit().data(), 1);
 
     if (!k->openVideo(k->oc, k->video_st)) {
         #ifdef K_DEBUG
@@ -491,6 +493,7 @@
         return false;
     }
 
+    /*  
     if (!(k->fmt->flags & AVFMT_NOFILE)) {
         if (url_fopen(&k->oc->pb, k->movieFile.toLocal8Bit().data(), URL_WRONLY) < 0) {
             k->errorMsg = "ffmpeg error: Could not open " + k->movieFile.toLocal8Bit() + ". This is not a problem directly related to Tupi. \
@@ -501,8 +504,10 @@
             return false;
         }
     }
+    */ 
 
-    av_write_header(k->oc);
+    // av_write_header(k->oc);
+    avformat_write_header(k->oc, NULL); 
 
     k->video_pts = 0.0;
     k->frameCount = 0;
@@ -545,7 +550,8 @@
     }
 
     if (!(k->fmt->flags & AVFMT_NOFILE)) {
-        url_fclose(k->oc->pb);
+        avio_close(k->oc->pb);
+        // url_fclose(k->oc->pb);
     }
 
     av_free(k->oc);