rework histogram_bezier, init wm icon set_icon(gg), update de.po+msg/txt
[goodguy/history.git] / cinelerra-5.1 / cinelerra / fileffmpeg.C
index 10f685c12769f3b4edcbbe675ab6ac700d20fa24..5910dd202474e59856cfbd9b22b598dff3aa2632 100644 (file)
 #include "preferences.h"
 #include "videodevice.inc"
 
+#ifdef FFMPEG3
+#define url filename
+#endif
+
 FileFFMPEG::FileFFMPEG(Asset *asset, File *file)
  : FileBase(asset, file)
 {
@@ -627,6 +631,8 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset,
        this->asset = asset;
        this->edl = edl;
        preset_popup = 0;
+       ff_options_dialog = 0;
+       pixel_format = 0;
 
        bitrate = 0;
        quality = 0;
@@ -635,9 +641,10 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset,
 
 FFMPEGConfigVideo::~FFMPEGConfigVideo()
 {
-       delete ff_options_dialog;
        lock_window("FFMPEGConfigVideo::~FFMPEGConfigVideo");
-       if(preset_popup) delete preset_popup;
+       delete ff_options_dialog;
+       delete pixel_format;
+       delete preset_popup;
        presets.remove_all_objects();
        unlock_window();
 }
@@ -833,7 +840,7 @@ int FileFFMPEG::get_index(IndexFile *index_file, MainProgressBar *progress_bar)
        }
 
        FileSystem fs;
-       int64_t file_bytes = fs.get_size(ff->fmt_ctx->filename);
+       int64_t file_bytes = fs.get_size(ff->fmt_ctx->url);
        char *index_path = index_file->index_filename;
 
        int canceled = 0;
@@ -1460,6 +1467,7 @@ FFOptionsWindow::~FFOptionsWindow()
 
 void FFOptionsWindow::create_objects()
 {
+       lock_window("FFOptionsWindow::create_objects");
        BC_Title *title;
        int x0 = 10, y0 = 10;
        int x = x0, y = y0;
@@ -1505,6 +1513,7 @@ void FFOptionsWindow::create_objects()
        options.initialize(this, FF_KIND_CODEC);
        draw();
        show_window(1);
+       unlock_window();
 }
 
 void FFOptionsWindow::draw()