summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormplayer-svn <svn@mplayerhq.hu>2012-03-10 10:23:42 +0000
committerwm4 <wm4@nowhere>2012-08-03 01:54:10 +0200
commit14a67dd301bfd68712440a65b0acbafc2121910e (patch)
tree82e86d3f2911c68a0130a537d308a228b9b2516f
parent08a71392be78ccd4b3e519c365a6833bb13530fd (diff)
downloadmpv-14a67dd301bfd68712440a65b0acbafc2121910e.tar.bz2
mpv-14a67dd301bfd68712440a65b0acbafc2121910e.tar.xz
vf_uspp: fix possible crash when the output format is Y8
Fix possible crash when using -vf uspp,format=y8 i.e. the destination format is Y8. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34805 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
-rw-r--r--libmpcodecs/vf_uspp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c
index ae044b19a6..91c0e61847 100644
--- a/libmpcodecs/vf_uspp.c
+++ b/libmpcodecs/vf_uspp.c
@@ -200,6 +200,8 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds
for(j=0; j<3; j++){
int is_chroma= !!j;
+ if (!dst[j])
+ continue; // HACK avoid crash for Y8 colourspace
store_slice_c(dst[j], p->temp[j], dst_stride[j], p->temp_stride[j], width>>is_chroma, height>>is_chroma, 8-p->log2_count);
}
}