*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*!
*/
/* FFmpeg includes */
+#include "libavutil/log.h"
#include "avcodec.h"
-#include "log.h"
/* libtheora includes */
#include <theora/theora.h>
avc_context->extradata = newdata;
avc_context->extradata_size = newsize;
- avc_context->extradata[ (*offset)++ ] = packet->bytes >> 8;
- avc_context->extradata[ (*offset)++ ] = packet->bytes & 0xff;
+ AV_WB16(avc_context->extradata + (*offset), packet->bytes);
+ *offset += 2;
memcpy( avc_context->extradata + (*offset), packet->packet, packet->bytes );
(*offset) += packet->bytes;
return 0;
return -1;
}
-static const enum PixelFormat supported_pixel_formats[] = { PIX_FMT_YUV420P, -1 };
+static const enum PixelFormat supported_pixel_formats[] = { PIX_FMT_YUV420P, PIX_FMT_NONE };
/*! AVCodec struct exposed to libavcodec */
AVCodec libtheora_encoder =
.close = encode_close,
.encode = encode_frame,
.pix_fmts = supported_pixel_formats,
+ .long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"),
};