*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
picture_t *p_pic_dst;
int i_plane, i, j, k, l;
+ if( !p_pic ) return NULL;
+
/* Request output picture */
p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
if( !p_pic_dst )
p_filter->fmt_out.video.i_height / 2 ) /
p_filter->fmt_out.video.i_height;
+ l = __MIN( (int)p_filter->fmt_in.video.i_height - 1, l );
+
for( j = 0; j < p_pic_dst->p[i_plane].i_visible_pitch; j++ )
{
k = ( p_filter->fmt_in.video.i_width * j +
p_filter->fmt_out.video.i_width / 2 ) /
p_filter->fmt_out.video.i_width;
+ k = __MIN( (int)p_filter->fmt_in.video.i_width - 1, k );
+
p_dst[i * i_dst_pitch + j] = p_src[l * i_src_pitch + k];
}
}