#include "ffmpeg.h"
#include "indexfile.h"
#include "interlacemodes.h"
+#ifdef HAVE_DV
#include "libdv.h"
+#endif
#include "libmjpeg.h"
#include "mainerror.h"
#include "mwindow.h"
ret = avcodec_send_frame(avctx, frame);
if( !ret && frame ) return pkts;
if( ret < 0 && ret != AVERROR(EAGAIN) ) break;
+ if ( ret == AVERROR(EAGAIN) && !frame ) continue;
FFPacket opkt;
ret = avcodec_receive_packet(avctx, opkt);
if( !frame && ret == AVERROR_EOF ) return pkts;
ret = -1;
ret = ret > 0 ? 1 : ret < 0 ? -1 : 0;
+ av_frame_free(&frame);
return ret;
}