mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
ext/mplex/gstmplexibitstream.cc: gcc madness.
Original commit message from CVS: * ext/mplex/gstmplexibitstream.cc: gcc madness.
This commit is contained in:
parent
6f2c618146
commit
79ba79f36a
2 changed files with 19 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-02-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* ext/mplex/gstmplexibitstream.cc:
|
||||||
|
gcc madness.
|
||||||
|
|
||||||
2005-02-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-02-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* ext/ogg/gstogmparse.c:
|
* ext/ogg/gstogmparse.c:
|
||||||
|
|
|
@ -66,21 +66,20 @@ GstMplexIBitStream::~GstMplexIBitStream (void)
|
||||||
* Read data.
|
* Read data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
|
size_t
|
||||||
|
GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
|
||||||
{
|
{
|
||||||
guint8 *
|
guint8 *data;
|
||||||
data;
|
|
||||||
guint
|
guint read = 0;
|
||||||
read;
|
|
||||||
|
|
||||||
if (eos)
|
if (eos)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
while (!eos && (read = gst_bytestream_peek_bytes (bs, &data, size)) != size) {
|
while (!eos && (read = gst_bytestream_peek_bytes (bs, &data, size)) != size) {
|
||||||
GstEvent *
|
GstEvent *event;
|
||||||
event;
|
|
||||||
guint
|
guint pending;
|
||||||
pending;
|
|
||||||
|
|
||||||
gst_bytestream_get_status (bs, &pending, &event);
|
gst_bytestream_get_status (bs, &pending, &event);
|
||||||
if (event) {
|
if (event) {
|
||||||
|
@ -95,8 +94,10 @@ size_t GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (buf, data, read);
|
if (read > 0) {
|
||||||
gst_bytestream_flush_fast (bs, read);
|
memcpy (buf, data, read);
|
||||||
|
gst_bytestream_flush_fast (bs, read);
|
||||||
|
}
|
||||||
|
|
||||||
return read;
|
return read;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +106,8 @@ size_t GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
|
||||||
* Are we at EOS?
|
* Are we at EOS?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool GstMplexIBitStream::EndOfStream (void)
|
bool
|
||||||
|
GstMplexIBitStream::EndOfStream (void)
|
||||||
{
|
{
|
||||||
return eos;
|
return eos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue