mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
gst/mpeg1videoparse/gstmp1videoparse.c: Committed wrong version last week... Grr... Didn't notice until now.
Original commit message from CVS: 2004-01-29 Ronald Bultje <rbultje@ronald.bitfreak.net> * gst/mpeg1videoparse/gstmp1videoparse.c: (gst_mp1videoparse_real_chain): Committed wrong version last week... Grr... Didn't notice until now.
This commit is contained in:
parent
b9e195f846
commit
8b821fcb23
2 changed files with 145 additions and 133 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-01-29 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/mpeg1videoparse/gstmp1videoparse.c:
|
||||
(gst_mp1videoparse_real_chain):
|
||||
Committed wrong version last week... Grr... Didn't notice until now.
|
||||
|
||||
2004-01-29 Julien MOUTTE <julien@moutte.net>
|
||||
|
||||
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_new):
|
||||
|
|
|
@ -376,6 +376,10 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
|
|||
|
||||
GST_DEBUG ("mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf));
|
||||
|
||||
do {
|
||||
data = GST_BUFFER_DATA(mp1videoparse->partialbuf);
|
||||
size = GST_BUFFER_SIZE(mp1videoparse->partialbuf);
|
||||
|
||||
head = GUINT32_FROM_BE(*((guint32 *)data));
|
||||
|
||||
GST_DEBUG ("mp1videoparse: head is %08x", (unsigned int)head);
|
||||
|
@ -485,7 +489,9 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
|
|||
|
||||
if (have_sync) {
|
||||
offset -= 2;
|
||||
outbuf = gst_buffer_create_sub(mp1videoparse->partialbuf, 0, offset);
|
||||
GST_DEBUG ("mp1videoparse: synced at %ld code 0x000001%02x",offset,data[offset+3]);
|
||||
|
||||
outbuf = gst_buffer_create_sub(mp1videoparse->partialbuf, 0, offset+4);
|
||||
g_assert(outbuf != NULL);
|
||||
GST_BUFFER_TIMESTAMP(outbuf) = mp1videoparse->last_pts;
|
||||
GST_BUFFER_DURATION(outbuf) = GST_SECOND / mp1videoparse->fps;
|
||||
|
@ -506,18 +512,18 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
|
|||
}
|
||||
mp1videoparse->picture_in_buffer = 0;
|
||||
|
||||
if (size > offset)
|
||||
temp = gst_buffer_create_sub(mp1videoparse->partialbuf, offset, size-offset);
|
||||
else
|
||||
temp = NULL;
|
||||
gst_buffer_unref(mp1videoparse->partialbuf);
|
||||
mp1videoparse->partialbuf = temp;
|
||||
offset = 0;
|
||||
}
|
||||
else {
|
||||
if (time_stamp != GST_CLOCK_TIME_NONE) {
|
||||
mp1videoparse->last_pts = time_stamp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
static GstElementStateReturn
|
||||
|
|
Loading…
Reference in a new issue