summaryrefslogtreecommitdiff
path: root/libavcodec/pgssubdec.c
diff options
context:
space:
mode:
authorhakuya <erikmiranda@gmail.com>2012-04-15 21:58:40 -0400
committerMichael Niedermayer <michaelni@gmx.at>2012-04-30 19:48:21 +0200
commit79e5902cf163dcb8b6539618936ff0ce28f742e4 (patch)
treebe00c4d77d86f5106cd802e72eb0bd59d5f23302 /libavcodec/pgssubdec.c
parent1f46b50a9591f68b697e943f829c79a4f4829dd6 (diff)
downloadffmpeg-79e5902cf163dcb8b6539618936ff0ce28f742e4.tar.gz
Exposing forced flag for DVD and PGS subtitles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pgssubdec.c')
-rw-r--r--libavcodec/pgssubdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index be0981df7f..4fb1e7dc8a 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -423,6 +423,9 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
sub->rects[rect]->nb_colors = 256;
sub->rects[rect]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
+ /* Copy the forced flag */
+ sub->rects[rect]->forced = (ctx->presentation.objects[rect].composition & 0x40) != 0;
+
if (!ctx->forced_subs_only || ctx->presentation.objects[rect].composition & 0x40)
memcpy(sub->rects[rect]->pict.data[1], ctx->clut, sub->rects[rect]->nb_colors * sizeof(uint32_t));
}