Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135445

Zooming QGraphicsVideoItem fails in release builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.2, 6.9.0
    • Multimedia
    • None
    • Windows

    Description

      I add zoom support to Qt example Multimedia/camera.

      I simply:

      • Add a ZoomedVideoWidget class to the project
      • Use it to promote ui's viewfinder
      • Zoom x3 at startup

      Debug builds just work fine

      Release build with 6.2.2 crashs in Qt6Multimedia.dll!QVideoFrame::paint()

      So I tested a most recent version, 6.9.0: it does not crash, but view remains all blank, the video is not visible at all (while in Debug, it still works fine).

      Skipping zoom computation on first paint as below fixes Release build to work for the two versions:

      void ZoomedVideoWidget::paintEvent(QPaintEvent* paint)
      {
          // not zooming on first paint fixes problem for all tested Qt versions
      
          static bool painted = false;
      
          baseClass::paintEvent(paint);
      
          if ( painted )
          {
              fitInView(m_pVideoWidget,Qt::KeepAspectRatio);
              transform();
              scale(zoom_percentage,zoom_percentage);
          }
          else
          {
              painted = true;
          }
      }
      

      There must be something wrong in the Qt code that may be fixed.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtmultimediateam Qt Multimedia Team
            jpo38 Jean Porcherot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes