summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-06-05 18:18:38 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:43 +0100
commit757086e3fa0b034b1b9b145f65a0512acc21f4d2 (patch)
treec8e74b27a320ac3f8678facaf48888a4587fe4ff /sys
parent3864e0349bb29a7a5bb4ff5961c2e72a14500811 (diff)
downloadgst-plugins-bad-757086e3fa0b034b1b9b145f65a0512acc21f4d2.tar.gz
gst-plugins-bad-757086e3fa0b034b1b9b145f65a0512acc21f4d2.tar.bz2
gst-plugins-bad-757086e3fa0b034b1b9b145f65a0512acc21f4d2.zip
vdpaumpegdec: only set base duration once
Diffstat (limited to 'sys')
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index db01527d..9475a948 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -251,6 +251,10 @@ gst_vdp_mpeg_decoder_set_caps (GstPad * pad, GstCaps * caps)
gst_buffer_unref (buf);
}
+ mpeg_dec->duration =
+ gst_util_uint64_scale (1, GST_SECOND * mpeg_dec->fps_d,
+ mpeg_dec->fps_n);
+
mpeg_dec->byterate = bitrate * 50;
GST_DEBUG ("byterate: %" G_GINT64_FORMAT, mpeg_dec->byterate);
}
@@ -496,9 +500,6 @@ gst_vdp_mpeg_decoder_parse_picture (GstVdpMpegDecoder * mpeg_dec,
memcpy (&mpeg_dec->vdp_info.f_code, &pic_hdr.f_code, 4);
}
- mpeg_dec->duration = gst_util_uint64_scale (1, GST_SECOND * mpeg_dec->fps_d,
- mpeg_dec->fps_n);
-
mpeg_dec->frame_nr = mpeg_dec->gop_frame + pic_hdr.tsn;
return TRUE;
@@ -1025,13 +1026,12 @@ gst_vdp_mpeg_decoder_init (GstVdpMpegDecoder * mpeg_dec,
mpeg_dec->display_name = NULL;
mpeg_dec->adapter = gst_adapter_new ();
- mpeg_dec->next_timestamp = 0;
-
mpeg_dec->device = NULL;
mpeg_dec->decoder = VDP_INVALID_HANDLE;
- gst_vdp_mpeg_decoder_init_info (&mpeg_dec->vdp_info);
+ mpeg_dec->vdp_info.forward_reference = VDP_INVALID_HANDLE;
+ mpeg_dec->vdp_info.backward_reference = VDP_INVALID_HANDLE;
- gst_segment_init (&mpeg_dec->segment, GST_FORMAT_TIME);
+ gst_vdp_mpeg_decoder_reset (mpeg_dec);
}
static void