From 368eb2f91b736bdd710ee8023abce449896d17b4 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 7 Jun 2013 17:31:21 +0100 Subject: completely fixed 2nd render bug --- rotord/libavwrapper_guarded.cpp | 12 ++++++++++-- rotord/rotor.h | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'rotord') diff --git a/rotord/libavwrapper_guarded.cpp b/rotord/libavwrapper_guarded.cpp index 829a07f..83a92a7 100755 --- a/rotord/libavwrapper_guarded.cpp +++ b/rotord/libavwrapper_guarded.cpp @@ -1452,13 +1452,21 @@ void libav::exporter::open_video(AVFormatContext *oc, AVCodec *codec, AVStream * void libav::exporter::close_video(AVFormatContext *oc, AVStream *st) { mutex.lock(); - avcodec_close(st->codec); - av_free(src_picture.data[0]); + //avcodec_close(st->codec); //change 0706 to trace 2nd render issue + avcodec_close(audio_st->codec); + avcodec_close(video_st->codec); + // + // + + + //av_free(src_picture.data[0]); //removed to explore weird 2nd render crash.. seems to WORK -- seems that the picture data is owned elsewhere av_free(dst_picture.data[0]); av_free(frame); //removed to explore crash 2nd time render //gives *** Error in `./rotord': corrupted double-linked list: 0x00007fd8b005bd60 *** //where is frame initialised??? //moved to destructor + + av_free(outPixels); //SIGSEV here??? mutex.unlock(); } diff --git a/rotord/rotor.h b/rotord/rotor.h index a0a310f..9494094 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -363,11 +363,13 @@ namespace Rotor { }; class Signal_node: public Node{ public: + virtual ~Signal_node(){}; const float get_output(const Time_spec &time) { update_params(time); return output(time); }; virtual const float output(const Time_spec &time) { return 0.0f; }; }; class Image_node: public Node{ public: + virtual ~Image_node(){}; vector image_inputs; //image node also has image inputs and outputs void create_image_input(const string &description) {image_inputs.push_back(new Image_input(description));}; Image *get_output(const Frame_spec &frame) { update_params((Time_spec)frame); return output(frame); }; @@ -379,6 +381,7 @@ namespace Rotor { }; class Base_audio_processor: public Signal_node { public: + virtual ~Base_audio_processor(){}; virtual int process_frame(uint8_t *data,int samples)=0; virtual bool init(int _channels,int _bits,int _samples,int _rate)=0; virtual void cleanup()=0; -- cgit v1.2.3