summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_out.c
diff options
context:
space:
mode:
authorHarm van der Heijden <hrm@users.sourceforge.net>2001-12-24 16:31:57 +0000
committerHarm van der Heijden <hrm@users.sourceforge.net>2001-12-24 16:31:57 +0000
commit6254378bae8f4423f6dc46b66920240a7e424dc3 (patch)
tree5f957a2945c25ad6619f2d5c65d47efdbec2bf45 /src/xine-engine/video_out.c
parentf625a663097e74292a95ddaae868b0fdddcf0bdc (diff)
downloadxine-lib-6254378bae8f4423f6dc46b66920240a7e424dc3.tar.gz
xine-lib-6254378bae8f4423f6dc46b66920240a7e424dc3.tar.bz2
fixes for still image detection. rough hack, needs improvement.
the flushing by video_out.c causes the dxr3 to drop the still image. consider dxr3 still menu support to be broken for now. CVS patchset: 1301 CVS date: 2001/12/24 16:31:57
Diffstat (limited to 'src/xine-engine/video_out.c')
-rw-r--r--src/xine-engine/video_out.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 49c2ce12e..15c54ad7b 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.59 2001/12/24 00:45:03 guenter Exp $
+ * $Id: video_out.c,v 1.60 2001/12/24 16:31:57 hrm Exp $
*
*/
@@ -561,16 +561,24 @@ static vo_frame_t * vo_duplicate_frame( vo_instance_t *this, vo_frame_t *img ) {
image_size = img->width * img->height;
if (img->format == IMGFMT_YV12) {
- xine_fast_memcpy(dupl->base[0], img->base[0], image_size);
- xine_fast_memcpy(dupl->base[1], img->base[1], image_size >> 2);
- xine_fast_memcpy(dupl->base[2], img->base[2], image_size >> 2);
+ /* The dxr3 video out plugin does not allocate memory for the dxr3
+ * decoder, so we must check for NULL */
+ if (img->base[0])
+ xine_fast_memcpy(dupl->base[0], img->base[0], image_size);
+ if (img->base[1])
+ xine_fast_memcpy(dupl->base[1], img->base[1], image_size >> 2);
+ if (img->base[2])
+ xine_fast_memcpy(dupl->base[2], img->base[2], image_size >> 2);
} else {
- xine_fast_memcpy(dupl->base[0], img->base[0], image_size * 2);
+ if (img->base[0])
+ xine_fast_memcpy(dupl->base[0], img->base[0], image_size * 2);
}
dupl->bad_frame = 0;
dupl->PTS = dupl->SCR = 0;
-
+
+ /* Support copy; Dangerous, since some decoders may use a source that's
+ * not dupl->base. It's up to the copy implementation to check for NULL */
if (img->copy) {
int height = img->height;
int stride = img->width;