Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Behavious of profile-cond with and #15614

Open
6 tasks done
randomcoder67 opened this issue Jan 1, 2025 · 1 comment
Open
6 tasks done

Inconsistent Behavious of profile-cond with and #15614

randomcoder67 opened this issue Jan 1, 2025 · 1 comment
Labels

Comments

@randomcoder67
Copy link

randomcoder67 commented Jan 1, 2025

mpv Information

mpv v0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Nov 27 2024 18:31:26
libplacebo version: v7.349.0
FFmpeg version: n7.1
FFmpeg library versions:
   libavcodec      61.19.100
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Linux version: Arch
- Kernel Version: 6.12.7-arch1-1
- GPU Model: Intel Iris
- Mesa/GPU Driver Version: 4.6
- Window Manager and Version: 47
- Source of mpv: Arch Repo
- Latest known working version: N/A
- Issue started after the following happened: N/A

Reproduction Steps

Using two different test configs:

Config 1:

gpu-context=x11

[AudioFiles]
profile-cond = not p["user-data/AudioFiles-applied"]
geometry=25%

Config 2:

gpu-context=x11

[AudioFiles]
profile-cond = (filename:match"%.mp3$" or filename:match"%.m4a$") ~= nil and not p["user-data/AudioFiles-applied"]
geometry=25%

Expected Behavior

Using config 1, playing an m4a file apply the profile, and then skipping the the next track will not re-apply the profile

Using config 2, skipping to next track does cause the profile to be re-applied

This can be fixed by adding:
input-commands = set user-data/AudioFiles-applied 1

Actual Behavior

I think there are 2 issues here:

  1. p["user-data/AudioFiles-applied"] returns true even when the input-commands line is left out

  2. There is inconsistency with the profile-cond when using and. The two configs should give the same results (assuming either a mp3 or m4a file), but they don't. Including the filename:match part causes the user-data part to be ignored in the and statement

Log File

config1.txt
config2.txt

Sample Files

No response

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.
@guidocella
Copy link
Contributor

This is because filename becomes nil while switching file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants