diff options
Diffstat (limited to 'gst/videotestsrc')
-rw-r--r-- | gst/videotestsrc/Makefile.in | 7 | ||||
-rw-r--r-- | gst/videotestsrc/videotestsrc.c | 19 |
2 files changed, 18 insertions, 8 deletions
diff --git a/gst/videotestsrc/Makefile.in b/gst/videotestsrc/Makefile.in index e7747c1..16af29b 100644 --- a/gst/videotestsrc/Makefile.in +++ b/gst/videotestsrc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -140,8 +140,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/lrintf.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/ogg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/vorbis.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -481,8 +480,6 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ -VORBISENC_LIBS = @VORBISENC_LIBS@ -VORBISFILE_LIBS = @VORBISFILE_LIBS@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_LIBS = @VORBIS_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c index 2fec7e4..1235782 100644 --- a/gst/videotestsrc/videotestsrc.c +++ b/gst/videotestsrc/videotestsrc.c @@ -255,6 +255,9 @@ videotestsrc_convert_tmpline (paintinfo * p, GstVideoFrame * frame, int j) int x = p->x_offset; int i; int width = frame->info.width; + int height = frame->info.height; + int n_lines = p->n_lines; + int offset = p->offset; if (x != 0) { memcpy (p->tmpline2, p->tmpline, width * 4); @@ -270,6 +273,13 @@ videotestsrc_convert_tmpline (paintinfo * p, GstVideoFrame * frame, int j) } p->convert_tmpline (p, frame, j); + + if (j == height - 1) { + while (j % n_lines - offset != n_lines - 1) { + j++; + p->convert_tmpline (p, frame, j); + } + } } #define BLEND1(a,b,x) ((a)*(x) + (b)*(255-(x))) @@ -1175,7 +1185,7 @@ convert_hline_generic (paintinfo * p, GstVideoFrame * frame, int y) y -= n_lines - 1; for (i = 0; i < n_lines; i++) { - idx = CLAMP (y + i + offset, 0, height); + idx = CLAMP (y + i + offset, 0, height - 1); GST_DEBUG ("line %d, %d, idx %d", i, y + i + offset, idx); lines[i] = p->lines[idx % n_lines]; @@ -1185,10 +1195,13 @@ convert_hline_generic (paintinfo * p, GstVideoFrame * frame, int y) gst_video_chroma_resample (p->subsample, lines, width); for (i = 0; i < n_lines; i++) { - GST_DEBUG ("pack line %d", y + i + offset); + idx = y + i + offset; + if (idx > height - 1) + break; + GST_DEBUG ("pack line %d", idx); finfo->pack_func (finfo, GST_VIDEO_PACK_FLAG_NONE, lines[i], 0, frame->data, frame->info.stride, - frame->info.chroma_site, y + i + offset, width); + frame->info.chroma_site, idx, width); } } } |