-#include "libavformat/avformat.h"
+/*
+ * Copyright (c) 2008 Luca Abeni
+ *
+ * This is free software; see GPL.txt
+ */
+/*#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
-#include "libswscale/swscale.h"
+#include "libswscale/swscale.h"*/
+
+#include <libavformat/avformat.h>
+#include <libavcodec/avcodec.h>
+#include <libswscale/swscale.h>
struct resample_data {
struct SwsContext *resample_ctx;
static AVPacket pkt;
int res;
+ pkt.size = 256 * 1024;
if (pkt.data == NULL) {
- pkt.size = 256 * 1024;
pkt.data = av_malloc(pkt.size);
}
res = avcodec_encode_video(c, pkt.data, pkt.size, frame);
return NULL;
}
+ pkt.size = res;
return &pkt;
}