Mercurial > mplayer.hg
comparison libmpcodecs/vf_harddup.c @ 17906:20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
author | michael |
---|---|
date | Tue, 21 Mar 2006 21:26:42 +0000 |
parents | 6ff3379a0862 |
children | 6a08d0dabca8 |
comparison
equal
deleted
inserted
replaced
17905:433494f162a9 | 17906:20aca9baf5d8 |
---|---|
13 | 13 |
14 struct vf_priv_s { | 14 struct vf_priv_s { |
15 mp_image_t *last_mpi; | 15 mp_image_t *last_mpi; |
16 }; | 16 }; |
17 | 17 |
18 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi) | 18 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) |
19 { | 19 { |
20 mp_image_t *dmpi; | 20 mp_image_t *dmpi; |
21 int ret; | 21 int ret; |
22 | 22 |
23 vf->priv->last_mpi = mpi; | 23 vf->priv->last_mpi = mpi; |
32 dmpi->stride[1] = mpi->stride[1]; | 32 dmpi->stride[1] = mpi->stride[1]; |
33 dmpi->planes[2] = mpi->planes[2]; | 33 dmpi->planes[2] = mpi->planes[2]; |
34 dmpi->stride[2] = mpi->stride[2]; | 34 dmpi->stride[2] = mpi->stride[2]; |
35 } | 35 } |
36 | 36 |
37 return vf_next_put_image(vf, dmpi); | 37 return vf_next_put_image(vf, dmpi, pts); |
38 } | 38 } |
39 | 39 |
40 static int control(struct vf_instance_s* vf, int request, void* data) | 40 static int control(struct vf_instance_s* vf, int request, void* data) |
41 { | 41 { |
42 switch (request) { | 42 switch (request) { |
44 if (!vf->priv->last_mpi) break; | 44 if (!vf->priv->last_mpi) break; |
45 // This is a huge hack. We assume nothing | 45 // This is a huge hack. We assume nothing |
46 // has been called earlier in the filter chain | 46 // has been called earlier in the filter chain |
47 // since the last put_image. This is reasonable | 47 // since the last put_image. This is reasonable |
48 // because we're handling a duplicate frame! | 48 // because we're handling a duplicate frame! |
49 if (put_image(vf, vf->priv->last_mpi)) | 49 if (put_image(vf, vf->priv->last_mpi, MP_NOPTS_VALUE)) |
50 return CONTROL_TRUE; | 50 return CONTROL_TRUE; |
51 break; | 51 break; |
52 } | 52 } |
53 return vf_next_control(vf, request, data); | 53 return vf_next_control(vf, request, data); |
54 } | 54 } |