From 8f7b814f547d484a59702badc4545327439841ea Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 16 Nov 2012 21:02:15 +0000 Subject: [PATCH 1/4] build: set -U__STRICT_ANSI__ for newlib This is (erroneously) required to enable various things in the newlib headers. As cygwin uses newlib, it is covered by this. Signed-off-by: Mans Rullgard --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e6d4ecb8d8..f577f7c7e9 100755 --- a/configure +++ b/configure @@ -2832,7 +2832,6 @@ case $target_os in SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a' objformat="win32" enable dos_paths - add_cppflags -U__STRICT_ANSI__ ;; *-dos|freedos|opendos) network_extralibs="-lsocket" @@ -2933,6 +2932,7 @@ elif check_header _mingw.h; then die "ERROR: MinGW runtime version must be >= 3.15." elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then libc_type=newlib + add_cppflags -U__STRICT_ANSI__ elif check_func_headers stdlib.h _get_doserrno; then libc_type=msvcrt add_compat strtod.o strtod=avpriv_strtod From 5873b623a93cf5e314c6a11445a261b029921545 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 16 Nov 2012 21:02:53 +0000 Subject: [PATCH 2/4] configure: add basic support for ARM AArch64 Signed-off-by: Mans Rullgard --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure b/configure index f577f7c7e9..02391848a2 100755 --- a/configure +++ b/configure @@ -1064,6 +1064,7 @@ THREADS_LIST=' ' ARCH_LIST=' + aarch64 alpha arm avr32 @@ -2460,6 +2461,9 @@ fi # Deal with common $arch aliases case "$arch" in + aarch64|arm64) + arch="aarch64" + ;; arm*) arch="arm" ;; @@ -2635,6 +2639,17 @@ elif enabled avr32; then ;; esac +elif enabled aarch64; then + + case $cpu in + armv*) + cpuflags="-march=$cpu" + ;; + *) + cpuflags="-mcpu=$cpu" + ;; + esac + fi add_cflags $cpuflags From 3bd1eacd2a7dad1a01ab5ddad69aa4fb2a487312 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sat, 13 Oct 2012 18:21:34 +0100 Subject: [PATCH 3/4] configure: Refactor CPPFLAGS settings for glibc/uclibc Signed-off-by: Mans Rullgard --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 02391848a2..890ff93b3d 100755 --- a/configure +++ b/configure @@ -2855,7 +2855,6 @@ case $target_os in add_cppflags -U__STRICT_ANSI__ ;; linux) - add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 enable dv1394 ;; irix*) @@ -2886,10 +2885,9 @@ case $target_os in enable dos_paths ;; gnu/kfreebsd) - add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE + add_cppflags -D_BSD_SOURCE ;; gnu) - add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ;; qnx) add_cppflags -D_QNX_SOURCE @@ -2937,8 +2935,10 @@ esac if check_cpp_condition features.h "defined __UCLIBC__"; then libc_type=uclibc + add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 elif check_cpp_condition features.h "defined __GLIBC__"; then libc_type=glibc + add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 elif check_header _mingw.h; then libc_type=mingw check_cpp_condition _mingw.h \ From 1c5805521c3e406886341d752ebf38f8d41e1d13 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 2 Nov 2012 09:30:39 -0700 Subject: [PATCH 4/4] PGS subtitles: Set AVSubtitle pts value pts should be that of the packet containing the presentation segment. Signed-off-by: Diego Biurrun --- libavcodec/pgssubdec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index 0326ea8f1b..f22088a747 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -46,6 +46,7 @@ typedef struct PGSSubPresentation { int id_number; int object_number; uint8_t composition_flag; + int64_t pts; } PGSSubPresentation; typedef struct PGSSubPicture { @@ -272,7 +273,8 @@ static void parse_palette_segment(AVCodecContext *avctx, * @todo TODO: Implement forcing of subtitles */ 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; @@ -281,6 +283,8 @@ static void parse_presentation_segment(AVCodecContext *avctx, int w = bytestream_get_be16(&buf); int h = bytestream_get_be16(&buf); + ctx->presentation.pts = pts; + av_dlog(avctx, "Video Dimensions %dx%d\n", w, h); if (av_image_check_size(w, h, 0, avctx) >= 0) @@ -358,6 +362,8 @@ static int display_end_segment(AVCodecContext *avctx, void *data, */ memset(sub, 0, sizeof(*sub)); + sub->pts = ctx->presentation.pts; + // Blank if last object_number was 0. // Note that this may be wrong for more complex subtitles. if (!ctx->presentation.object_number) @@ -446,7 +452,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); + parse_presentation_segment(avctx, buf, segment_length, avpkt->pts); break; case WINDOW_SEGMENT: /*