changeset 11308:0c8d12a58a29

skip filter if codec doesnt provide the QP array and user didnt force a QP (fixes diegos segfault) its quite scary how many 10l bugs the spp filter had ...
author michael
date Tue, 28 Oct 2003 20:49:33 +0000
parents 487bf0179498
children fa738ed513f9
files libmpcodecs/vf_spp.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_spp.c	Tue Oct 28 14:00:07 2003 +0000
+++ b/libmpcodecs/vf_spp.c	Tue Oct 28 20:49:33 2003 +0000
@@ -371,9 +371,11 @@
         
         vf->priv->mpeg2= mpi->qscale_type;
 	if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
+	    if(mpi->qscale || vf->priv->qp){
 		filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, mpi->qscale, mpi->qstride, 1);
 		filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, mpi->qscale, mpi->qstride, 0);
 		filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, mpi->qscale, mpi->qstride, 0);
+	    }
 	}
         vf_clone_mpi_attributes(dmpi, mpi);