diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-19 14:05:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-19 14:05:41 +0100 |
commit | 4116151a4bf35cffd2b55b028e714bb2c383c86f (patch) | |
tree | 7c27376f37acef2ec4e908cd9275578e69e665ba /libavcodec | |
parent | fdbb6164a208df6d2665453da6d18d2cda13189b (diff) | |
parent | 1c5805521c3e406886341d752ebf38f8d41e1d13 (diff) | |
download | ffmpeg-4116151a4bf35cffd2b55b028e714bb2c383c86f.tar.gz |
Merge commit '1c5805521c3e406886341d752ebf38f8d41e1d13'
* commit '1c5805521c3e406886341d752ebf38f8d41e1d13':
PGS subtitles: Set AVSubtitle pts value
configure: Refactor CPPFLAGS settings for glibc/uclibc
configure: add basic support for ARM AArch64
build: set -U__STRICT_ANSI__ for newlib
Conflicts:
configure
libavcodec/pgssubdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pgssubdec.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index a303c08b80..b183f30616 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -52,6 +52,7 @@ typedef struct PGSSubPresentation { int id_number; int object_count; PGSSubPictureReference *objects; + int64_t pts; } PGSSubPresentation; typedef struct PGSSubPicture { @@ -67,7 +68,6 @@ typedef struct PGSSubContext { PGSSubPresentation presentation; uint32_t clut[256]; PGSSubPicture pictures[UINT16_MAX]; - int64_t pts; int forced_subs_only; } PGSSubContext; @@ -295,7 +295,8 @@ static void parse_palette_segment(AVCodecContext *avctx, * @todo TODO: Implement cropping */ static void parse_presentation_segment(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size, + int64_t pts) { PGSSubContext *ctx = avctx->priv_data; @@ -304,6 +305,8 @@ static void parse_presentation_segment(AVCodecContext *avctx, uint16_t object_index; + ctx->presentation.pts = pts; + av_dlog(avctx, "Video Dimensions %dx%d\n", w, h); if (av_image_check_size(w, h, 0, avctx) >= 0) @@ -394,10 +397,10 @@ static int display_end_segment(AVCodecContext *avctx, void *data, * not been cleared by a subsequent empty display command. */ - pts = ctx->pts != AV_NOPTS_VALUE ? ctx->pts : sub->pts; + pts = ctx->presentation.pts != AV_NOPTS_VALUE ? ctx->presentation.pts : sub->pts; memset(sub, 0, sizeof(*sub)); sub->pts = pts; - ctx->pts = AV_NOPTS_VALUE; + ctx->presentation.pts = AV_NOPTS_VALUE; // Blank if last object_count was 0. if (!ctx->presentation.object_count) @@ -493,8 +496,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, parse_picture_segment(avctx, buf, segment_length); break; case PRESENTATION_SEGMENT: - parse_presentation_segment(avctx, buf, segment_length); - ctx->pts = sub->pts; + parse_presentation_segment(avctx, buf, segment_length, sub->pts); break; case WINDOW_SEGMENT: /* |