diff options
author | JULIAN GARDNER <joolzg@btinternet.com> | 2011-10-14 15:28:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-14 20:19:59 +0200 |
commit | b522d2a3b74f0dbc64b2d0337c192d278bbb661a (patch) | |
tree | f11e5dcbacd24e3f48bed0916f38f2cf709e90aa /libavcodec/dvbsubdec.c | |
parent | eea064aea610ea41b5bda0b62dac56be536af9aa (diff) | |
download | ffmpeg-b522d2a3b74f0dbc64b2d0337c192d278bbb661a.tar.gz |
dvbsubdec: dirty handkling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r-- | libavcodec/dvbsubdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 4b6112682a..cb934500e6 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -209,6 +209,7 @@ typedef struct DVBSubRegion { uint8_t *pbuf; int buf_size; + int dirty; DVBSubObjectDisplay *display_list; @@ -781,6 +782,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis return; pbuf = region->pbuf; + region->dirty = 1; x_pos = display->x_pos; y_pos = display->y_pos; @@ -1044,6 +1046,7 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx, region->pbuf = av_malloc(region->buf_size); fill = 1; + region->dirty = 0; } region->depth = 1 << (((*buf++) >> 2) & 7); @@ -1356,6 +1359,10 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf, if (!region) continue; + if (!region->dirty) + continue; + + rect = sub->rects[i]; rect->x = display->x_pos + offset_x; rect->y = display->y_pos + offset_y; rect->w = region->width; |