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

AVFMediaPlayerSession::setMedia() fails if QUrl contains spaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Duplicate
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      note this bug report comes with a free SOLUTION (see step 6)

      repro steps:

      1. on mac, open example project "Video Widget"
      2. in AVFMediaPlayerSession, put a breakpoint on line 543 (inside static void setURL() ), if you can't, then in videoplayer.cpp, put breakpoint on line 124 (m_mediaPlayer->setMedia(url); )
      3. run and open a file that has a space in its path
      4. hit the breakpoint.  if you could not break into AVFMPS, step in until you get to the static setURL() function
      5. note that NSURL *nsurl = [NSURL URLWithString:urlString];  is NULL since the url string is NOT percent escaped, therefore this entire thing will fail
      6. in AVFMediaPlayerSession, line 595, add "QUrl::FullyEncoded" as a parameter to the "toString()" call
      7. run and open a file that has a space in its path
      8. now it works???
      9. ship it

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              valentyn.doroshchuk Valentyn Doroshchuk
              Reporter:
              davecotter David M. Cotter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes