@@ -83,7 +83,7 @@ static inline int avpriv_ass_add_rect(AVSubtitle *sub, const char *dialog,
rects[sub->num_rects] = av_mallocz(sizeof(*rects[0]));
if (!rects[sub->num_rects])
return AVERROR(ENOMEM);
- rects[sub->num_rects]->type = SUBTITLE_ASS;
+ rects[sub->num_rects]->type = AV_SUBTITLE_FMT_ASS;
ass_str = avpriv_ass_get_dialog(readorder, layer, style, speaker, dialog);
if (!ass_str)
return AVERROR(ENOMEM);
@@ -53,7 +53,7 @@ static int ass_decode_frame(AVCodecContext *avctx, AVSubtitle *sub,
if (!sub->rects[0])
return AVERROR(ENOMEM);
sub->num_rects = 1;
- sub->rects[0]->type = SUBTITLE_ASS;
+ sub->rects[0]->type = AV_SUBTITLE_FMT_ASS;
sub->rects[0]->ass = av_strdup(avpkt->data);
if (!sub->rects[0]->ass)
return AVERROR(ENOMEM);
@@ -796,7 +796,7 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou
rect->w = region->width;
rect->h = region->height;
rect->nb_colors = (1 << region->depth);
- rect->type = SUBTITLE_BITMAP;
+ rect->type = AV_SUBTITLE_FMT_BITMAP;
rect->linesize[0] = region->width;
clut = get_clut(ctx, region->clut);
@@ -405,7 +405,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
sub_header->rects[0]->y = y1;
sub_header->rects[0]->w = w;
sub_header->rects[0]->h = h;
- sub_header->rects[0]->type = SUBTITLE_BITMAP;
+ sub_header->rects[0]->type = AV_SUBTITLE_FMT_BITMAP;
sub_header->rects[0]->linesize[0] = w;
sub_header->rects[0]->flags = is_menu ? AV_SUBTITLE_FLAG_FORCED : 0;
}
@@ -269,7 +269,7 @@ static int encode_dvd_subtitles(AVCodecContext *avctx,
if (rects == 0 || !h->rects)
return AVERROR(EINVAL);
for (i = 0; i < rects; i++)
- if (h->rects[i]->type != SUBTITLE_BITMAP) {
+ if (h->rects[i]->type != AV_SUBTITLE_FMT_BITMAP) {
av_log(avctx, AV_LOG_ERROR, "Bitmap subtitle required\n");
return AVERROR(EINVAL);
}
@@ -534,7 +534,7 @@ static int display_end_segment(AVCodecContext *avctx, AVSubtitle *sub,
if (!rect)
return AVERROR(ENOMEM);
sub->rects[sub->num_rects++] = rect;
- rect->type = SUBTITLE_BITMAP;
+ rect->type = AV_SUBTITLE_FMT_BITMAP;
/* Process bitmap */
object = find_object(ctx->presentation.objects[i].id, &ctx->objects);
@@ -107,7 +107,7 @@ static int decode_frame(AVCodecContext *avctx, AVSubtitle *sub,
sub->num_rects = 1;
rect->x = x; rect->y = y;
rect->w = w; rect->h = h;
- rect->type = SUBTITLE_BITMAP;
+ rect->type = AV_SUBTITLE_FMT_BITMAP;
rect->linesize[0] = w;
rect->data[0] = av_malloc(w * h);
rect->nb_colors = 4;