summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-08-12 13:53:30 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-08-12 13:53:30 +0000
commitb09c95b2af9688e76963d351ebe8a06c8c2f119a (patch)
tree4a6782693c76686ed3fee1a3acc95a67af04ac04
parent6fa3d8cc7c60e9c117df209fc77df2fcb4e3e299 (diff)
downloadxine-lib-b09c95b2af9688e76963d351ebe8a06c8c2f119a.tar.gz
xine-lib-b09c95b2af9688e76963d351ebe8a06c8c2f119a.tar.bz2
add a flags member to frame struct (the relevant API versions have already been
increased lately), store flags in video out loop and catch some wrong ratios CVS patchset: 5275 CVS date: 2003/08/12 13:53:30
-rw-r--r--src/xine-engine/video_out.c12
-rw-r--r--src/xine-engine/video_out.h3
2 files changed, 11 insertions, 4 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 6797023fa..d8657af98 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.167 2003/08/04 03:47:11 miguelfreitas Exp $
+ * $Id: video_out.c,v 1.168 2003/08/12 13:53:30 mroi Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -282,19 +282,24 @@ static vo_frame_t *vo_get_frame (xine_video_port_t *this_gen,
printf ("video_out: got a frame -> pthread_mutex_lock (&img->mutex)\n");
#endif
+ /* some decoders report strange ratios */
+ if (ratio <= 0.0)
+ ratio = (double)width / (double)height;
+
pthread_mutex_lock (&img->mutex);
img->lock_counter = 1;
img->width = width;
img->height = height;
img->ratio = ratio;
img->format = format;
+ img->flags = flags;
img->copy_called = 0;
img->bad_frame = 0;
img->progressive_frame = 0;
img->repeat_first_field = 0;
img->top_field_first = 1;
extra_info_reset ( img->extra_info );
-
+
/* let driver ensure this image has the right format */
this->driver->update_frame_format (this->driver, img, width, height,
@@ -541,9 +546,10 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) {
dupl->height = img->height;
dupl->ratio = img->ratio;
dupl->format = img->format;
+ dupl->flags = img->flags | VO_BOTH_FIELDS;
this->driver->update_frame_format (this->driver, dupl, dupl->width, dupl->height,
- dupl->ratio, dupl->format, VO_BOTH_FIELDS);
+ dupl->ratio, dupl->format, dupl->flags);
pthread_mutex_unlock (&dupl->mutex);
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 0fe4ba2bf..0ba8d9720 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -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.h,v 1.94 2003/08/05 15:03:14 mroi Exp $
+ * $Id: video_out.h,v 1.95 2003/08/12 13:53:30 mroi Exp $
*
*
* xine version of video_out.h
@@ -133,6 +133,7 @@ struct vo_frame_s {
int format; /* IMGFMT_YV12 or IMGFMT_YUY2 */
int drawn; /* used by decoder, frame has already been drawn */
+ int flags; /* remember the frame flags */
int copy_called; /* track use of copy() method */
/* "backward" references to where this frame originates from */