summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/dxr3/dxr3_decoder.c4
-rw-r--r--src/dxr3/dxr3_video_out.c4
-rw-r--r--src/xine-engine/video_out.c20
3 files changed, 19 insertions, 9 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index 943dacfb9..727669a65 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_decoder.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: dxr3_decoder.c,v 1.51 2001/12/23 18:13:35 hrm Exp $
+ * $Id: dxr3_decoder.c,v 1.52 2001/12/24 16:31:57 hrm Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -459,6 +459,7 @@ static void dxr3_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
vpts = 0;
+#if 0
/* if we're just coming from a BUF_VIDEO_FILL situation,
* do a flush for good riddance. (doesn't help much though) */
if (this->in_buffer_fill && buf->type != BUF_VIDEO_FILL)
@@ -486,6 +487,7 @@ static void dxr3_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->last_pts += duration; /* predict vpts */
return;
}
+#endif
/* count the number of frame codes in this block of data
* this code borrowed from libmpeg2.
diff --git a/src/dxr3/dxr3_video_out.c b/src/dxr3/dxr3_video_out.c
index be13d239b..7fa424b0a 100644
--- a/src/dxr3/dxr3_video_out.c
+++ b/src/dxr3/dxr3_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: dxr3_video_out.c,v 1.2 2001/12/23 02:36:55 hrm Exp $
+ * $Id: dxr3_video_out.c,v 1.3 2001/12/24 16:31:57 hrm Exp $
*
* mpeg1 encoding video out plugin for the dxr3.
*
@@ -250,7 +250,7 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen,
}
}
else {
- this->mpeg_source = 0;
+ /* this->mpeg_source = 0; */
}
/* for mpeg source, we don't have to do much. */
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;