mpv-player / mpv-player/mpv

`vo=libmpv` reports OpenGL `INVALID_ENUM` when creating some textures

Open
#15,019 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:linux
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv v0.39.0-82-gfb9ac9b570 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0 (v7.349.0-rc1-dirty)
FFmpeg version: 6.1.2
FFmpeg library versions:
   libavcodec      60.31.102
   libavdevice     60.3.100
   libavfilter     9.12.100
   libavformat     60.16.100
   libavutil       58.29.100
   libswresample   4.12.100
   libswscale      7.5.100
Other Information
- Linux version: Gentoo
- Kernel Version: 6.6.47-gentoo-x86_64
- GPU Model: GeForce RTX 4090
- Mesa/GPU Driver Version: 4.6.0 NVIDIA 560.35.03
- Window Manager and Version: Plasma 6.1.5
- Source mpv: emerge (built from source)
- Introduced in version: Reproduced on v0.38.0, verified to happen on v0.34.0 in #13228
Reproduction Steps
  1. Build qt_opengl example without mpv::qt::set_option_variant(mpv, "hwdec", "auto");.
  2. Open a file.
Expected Behavior

Video plays without issue and no INVALID_ENUM errors are written to console or logs.

Actual Behavior

Creating several textures in OpenGL fails with the INVALID_ENUM error. Playback is otherwise normal.

[   8.285][v][libmpv_render] Texture for plane 0: 1280x720
[   8.285][e][libmpv_render] after creating texture: OpenGL error INVALID_ENUM.
[   8.308][d][libmpv_render] Resizing texture: 480x270
[   8.308][e][libmpv_render] after creating texture: OpenGL error INVALID_ENUM.
Log File

https://0x0.st/XEIi.txt

Sample Files

Source code for the lightly modified qt_opengl example I used: https://files.catbox.moe/dvv86a.zip

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Build and run the libmpv/qt_opengl example using the reproduction conditions, then inspect the linked log and the supplied example source. Trace the texture-creation path that emits INVALID_ENUM for the affected OpenGL textures. Done means video playback remains functional without INVALID_ENUM errors in the console or logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.