Skip to content

copy frame prop from src (regression fix #52)#53

Closed
seiya-git wants to merge 1 commit intopinterf:masterfrom
seiya-dev:dev
Closed

copy frame prop from src (regression fix #52)#53
seiya-git wants to merge 1 commit intopinterf:masterfrom
seiya-dev:dev

Conversation

@seiya-git
Copy link

No description provided.

@pinterf
Copy link
Owner

pinterf commented Feb 1, 2026

I can see now, so the src first had to be copied, then it was already safe to make_writable?
No tricks needed before, this part has not changed for ages.
Also here in the InvertNeg sample, there is no special trick:
http://avisynth.nl/index.php/Filter_SDK/CInvertNeg

@seiya-git
Copy link
Author

seiya-git commented Feb 1, 2026

I can see now, so the src first had to be copied, then it was already safe to make_writable?

Yes, as far as I understand, avs_make_writable() may return the same frame if it’s already uniquely referenced, so writing can accidentally modify the upstream frame.

@pinterf
Copy link
Owner

pinterf commented Feb 2, 2026

Once you obtained the frame using avs_make_writable, the frame content is yours. If VideoFrame is referenced (even for reading) the reference count is not exactly 1, only then makes copy of that. Anyway I was not able to reproduce the avspmod display bug, I wonder if you did? (Put back the simple original single avs_make_writable)

@pinterf
Copy link
Owner

pinterf commented Feb 3, 2026

Thank you. Finally, after the tests, I reverted the code to the original single avs_make_writable. There must have been a different issue co-existing when the previous copying workaround had been introduced.

@pinterf pinterf closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants