Re: [Mlt-devel] AVFormat consumer not checking for write error
Brought to you by:
ddennedy,
lilo_booter
|
From: Dan D. <da...@de...> - 2010-12-09 07:52:12
|
On Sat, Nov 27, 2010 at 1:12 PM, jb <j-...@us...> wrote: > Hi! > > As described in Kdenlive issue 1894 (*), the avformat consumer does not check > for write errors, and writing to a full drive terminates successfully. > > The patch below somehow fixes the issue by checking the ret value, but I guess > something better than exit(1) should be possible. Yeah, exit() in a lib should be avoided. I will add an event, have melt listen on it, and melt can exit with error. > regards > jb > > (*) http://www.kdenlive.org/mantis/view.php?id=1894 > > diff --git a/src/modules/avformat/consumer_avformat.c > b/src/modules/avformat/consumer_avformat.c > index 29d730d..a366554 100644 > --- a/src/modules/avformat/consumer_avformat.c > +++ b/src/modules/avformat/consumer_avformat.c > @@ -1453,6 +1453,11 @@ static void *consumer_thread( void *arg ) > } > frame_count++; > mlt_frame_close( frame ); > + if ( ret != 0 ) > + { > + mlt_log_error( > MLT_CONSUMER_SERVICE( this ), "%s: error writing frame\n", __FILE__ ); > + exit(1); > + } > } > else > { > |