[gst-devel] libmpeg2 problem
vishnu at pobox.com
vishnu at pobox.com
Fri Oct 26 15:47:06 CEST 2001
Here's the patch i made to verify that libmpeg2 is not getting restarted
after a DISCONTINUOUS event : mpeg2dec->decoder->is_sequence_needed = 1;
Basically, as soon as is_sequence_needed gets set, i stop getting
vo * frame warnings even though g_warning ("mpeg2dec with %d", size);
keeps showing more data getting pumped into libmpeg2.
This only happens with mpeg1. mpeg2 works flawlessly. i'm using
mpeg2dec-0.2.0.tar.gz and current gstreamer CVS.
--
Victory to the Divine Mother!! ... after all,
http://sahajayoga.org http://why-compete.org
-------------- next part --------------
Index: gstmpeg2dec.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/plugins/mpeg2/mpeg2dec/gstmpeg2dec.c,v
retrieving revision 1.26
diff -u -p -r1.26 gstmpeg2dec.c
--- gstmpeg2dec.c 2001/10/26 19:44:47 1.26
+++ gstmpeg2dec.c 2001/10/26 22:39:53
@@ -182,6 +182,8 @@ gst_mpeg2dec_vo_frame_draw (vo_frame_t *
g_return_if_fail (frame != NULL);
g_return_if_fail (((gst_mpeg2dec_vo_frame_t *)frame)->buffer != NULL);
+ g_warning ("vo frame draw");
+
_frame = (gst_mpeg2dec_vo_frame_t *)frame;
_instance = (gst_mpeg2dec_vo_instance_t *)frame->instance;
@@ -252,6 +254,8 @@ gst_mpeg2dec_vo_get_frame (vo_instance_t
size_t size0;
uint8_t *data = NULL;
+ g_warning ("vo get frame");
+
g_return_val_if_fail (instance != NULL, NULL);
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: get_frame\n");
@@ -392,6 +396,7 @@ gst_mpeg2dec_loop (GstElement *element)
switch (ev->type) {
case GST_EVENT_DISCONTINUOUS:
//mpeg2dec->decoder->is_picture_needed = 1;
+ g_warning ("discontinuous");
mpeg2dec->decoder->is_sequence_needed = 1;
restart = 1;
break;
@@ -415,10 +420,13 @@ gst_mpeg2dec_loop (GstElement *element)
size = GST_BUFFER_SIZE (buf);
data = GST_BUFFER_DATA (buf);
offset = 0;
+
if (mpeg2dec->next_time <= GST_BUFFER_TIMESTAMP (buf)) {
mpeg2dec->next_time = GST_BUFFER_TIMESTAMP (buf);
GST_DEBUG (0, "in: %lld\n", GST_BUFFER_TIMESTAMP (buf));
}
+
+ g_warning ("mpeg2dec with %d", size);
//fprintf(stderr, "MPEG2DEC: in timestamp=%llu\n",GST_BUFFER_TIMESTAMP(buf));
//fprintf(stderr, "MPEG2DEC: have buffer of %d bytes\n",size);
More information about the gstreamer-devel
mailing list