font = optarg;
break;
case 't':
- ci->text = strdup(optarg);
+ ci->text = av_strdup(optarg);
break;
case 'f':
- ci->file = strdup(optarg);
+ ci->file = av_strdup(optarg);
break;
case 'x':
ci->x = atoi(optarg);
ci->cache = cache;
}
-void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, INT64 pts)
+void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, int64_t pts)
{
ContextInfo *ci = (ContextInfo *) ctx;
AVPicture picture1;
imlib_context_set_image(image);
data = imlib_image_get_data();
- if (pix_fmt != PIX_FMT_BGRA32) {
- avpicture_fill(&picture1, (UINT8 *) data, PIX_FMT_BGRA32, width, height);
- if (img_convert(&picture1, PIX_FMT_BGRA32,
+ if (pix_fmt != PIX_FMT_RGBA32) {
+ avpicture_fill(&picture1, (uint8_t *) data, PIX_FMT_RGBA32, width, height);
+ if (img_convert(&picture1, PIX_FMT_RGBA32,
picture, pix_fmt, width, height) < 0) {
goto done;
}
}
}
- strftime(buff, sizeof(buff), tbp, localtime(&now));
+ strftime(buff, sizeof(buff), tbp ? tbp : "[No data]", localtime(&now));
x = ci->x;
y = ci->y;
}
}
- if (pix_fmt != PIX_FMT_BGRA32) {
+ if (pix_fmt != PIX_FMT_RGBA32) {
if (img_convert(picture, pix_fmt,
- &picture1, PIX_FMT_BGRA32, width, height) < 0) {
+ &picture1, PIX_FMT_RGBA32, width, height) < 0) {
}
}