Hi, I want to add support for video compressed with the FFV1 codec. I made the attached patch, but cinelerra crashes immediately after the video has been loaded.

Here's some info from the crash:
========================
signal_entry: got SIGFPE my pid=5765 execution table size=16:
    mwindowedit.C: paste_edls: 1595
    mwindowedit.C: paste_edls: 1606
    mwindowedit.C: paste_edls: 1609
    bchash.C: copy_from: 255
    bchash.C: copy_from: 258
    bchash.C: copy_from: 267
    mwindow.C: load_filenames: 1134
    mwindow.C: load_filenames: 1139
    mwindow.C: load_filenames: 1142
    mwindow.C: load_filenames: 1144
    filemov.C: ~FileMOV: 100
    filemov.C: ~FileMOV: 102
    filemov.C: ~FileMOV: 104
    mwindow.C: load_filenames: 1147
    mwindow.C: load_filenames: 1151
    mwindow.C: load_filenames: 1153
signal_entry: lock table size=13
    0x8b225e8 CWindowTool::input_lock CWindowTool::run
    0x8521a18 BC_Synchronous::next_command BC_Synchronous::run
    0x8b5e588 BC_WindowBase::event_condition BC_WindowBase::get_event
    0x8ab82c8 BC_WindowBase::event_condition BC_WindowBase::get_event
    0x8b47528 BC_WindowBase::event_condition BC_WindowBase::get_event
    0x8c60e40 BC_WindowBase::event_condition BC_WindowBase::get_event
    0x8bd2700 TransportQue::output_lock PlaybackEngine::run
    0x8bd2cc8 MainIndexes::input_lock MainIndexes::run 1
    0x89a47b8 Cinelerra: Resources BC_WindowBase::dispatch_event 1 *
    0x8ce1a48 RenderEngine::interrupt_lock RenderEngine::start_command *
    0x8ce1988 RenderEngine::start_lock RenderEngine::start_command 2
    0x8bd4a68 BC_WindowBase::event_condition BC_WindowBase::get_event
    0x89a47b8 Cinelerra: Resources (null)
BC_Signals::dump_buffers: buffer table size=0
BC_Signals::delete_temps: deleting 0 temp files
SigHandler::signal_handler total files=0
Aborted
========================

Can please someone take a look at it, and tell me what is wrong? I guess that the patch is not enough, and much more has to be done.

BTW, why is the ffmpeg directory a subdirectory of quicktime? Puzzles me...

Ciao,
  Alberto
Index: quicktime/quicktime.h
===================================================================
--- quicktime/quicktime.h	(revision 985)
+++ quicktime/quicktime.h	(working copy)
@@ -50,6 +50,9 @@
 #define QUICKTIME_DVSD "dvsd"
 #define QUICKTIME_DVCP "dvcp"          // PAL video inside Quicktime
 
+/* FFV1 */
+#define QUICKTIME_FFV1 "FFV1"
+
 /* RGB uncompressed.  Allows alpha */
 #define QUICKTIME_RAW  "raw "
 
Index: quicktime/mpeg4.c
===================================================================
--- quicktime/mpeg4.c	(revision 985)
+++ quicktime/mpeg4.c	(working copy)
@@ -1279,8 +1279,17 @@
 	result->ffmpeg_id = CODEC_ID_MPEG4;
 }
 
+void quicktime_init_codec_ffv1(quicktime_video_map_t *vtrack)
+{
+	quicktime_mpeg4_codec_t *result = init_common(vtrack, 
+		QUICKTIME_FFV1,
+		"FF vcodec 1",
+		"FF video codec 1 is an experimental lossless video codec");
+	result->ffmpeg_id = CODEC_ID_FFV1;
+}
 
 
 
 
 
+
Index: quicktime/mpeg4.h
===================================================================
--- quicktime/mpeg4.h	(revision 985)
+++ quicktime/mpeg4.h	(working copy)
@@ -16,6 +16,7 @@
 extern void quicktime_init_codec_h263(quicktime_video_map_t *);
 extern void quicktime_init_codec_xvid(quicktime_video_map_t *);
 extern void quicktime_init_codec_div5(quicktime_video_map_t *vtrack);
+extern void quicktime_init_codec_ffv1(quicktime_video_map_t *);
 
 
 #endif
Index: quicktime/plugin.c
===================================================================
--- quicktime/plugin.c	(revision 985)
+++ quicktime/plugin.c	(working copy)
@@ -98,6 +98,7 @@
 	register_vcodec(quicktime_init_codec_dv);
 	register_vcodec(quicktime_init_codec_dvsd);
 	register_vcodec(quicktime_init_codec_dvcp);
+	register_vcodec(quicktime_init_codec_ffv1);
 
 	register_vcodec(quicktime_init_codec_jpeg);
 	register_vcodec(quicktime_init_codec_mjpa);

Reply via email to