diff options
author | wm4 <wm4@nowhere> | 2018-01-29 13:47:05 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-30 03:10:27 -0800 |
commit | 3d367e009c22e390c021bd6b2be32adc641222e7 (patch) | |
tree | bd9cbd71e9dcf73a7d4acc88b4bdbdb430c87e43 /TOOLS/mpv_identify.sh | |
parent | 0366ba253159a551127a7d1817a4a000e078d322 (diff) | |
download | mpv-3d367e009c22e390c021bd6b2be32adc641222e7.tar.bz2 mpv-3d367e009c22e390c021bd6b2be32adc641222e7.tar.xz |
mp_image: factor buffer referencing
Reduce the trivial but still annoying code duplication in
mp_image_new_ref(), which has to create new buffer references and deal
with possible failure of creating them. The tricky part is that if
creating a reference fails, we must set the target to NULL, so that
unreferencing the failed new mp_image reference does not release the
buffer references of the original mp_image. For the same reason, the
code can't jump to error handling when it can't create a new reference,
and has to set a flag instead.
Diffstat (limited to 'TOOLS/mpv_identify.sh')
0 files changed, 0 insertions, 0 deletions