Commit 2a7f1bc
lavc/pngdec: always create a copy for APNG_DISPOSE_OP_BACKGROUND
Calling av_frame_make_writable() from decoders is tricky, especially
when frame threading is used. It is much simpler and safer to just make
a private copy of the frame.
This is not expected to have a major performance impact, since
APNG_DISPOSE_OP_BACKGROUND is not used often and
av_frame_make_writable() would typically make a copy anyway.
Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b593abd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>1 parent 25e794a commit 2a7f1bc
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
1091 | 1093 | | |
1092 | 1094 | | |
1093 | 1095 | | |
1094 | | - | |
1095 | 1096 | | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1099 | 1101 | | |
1100 | | - | |
1101 | | - | |
| 1102 | + | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | | - | |
| 1105 | + | |
1105 | 1106 | | |
1106 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
1107 | 1110 | | |
1108 | 1111 | | |
1109 | 1112 | | |
| |||
1738 | 1741 | | |
1739 | 1742 | | |
1740 | 1743 | | |
| 1744 | + | |
1741 | 1745 | | |
1742 | 1746 | | |
1743 | 1747 | | |
| |||
0 commit comments