rtmpsrc: Remove dead assignments
* read is only used within the while loop * todo and bsize only need to be assigned once
This commit is contained in:
parent
175e02ba7b
commit
a76ad40c6c
@ -324,7 +324,6 @@ gst_rtmp_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
|
|||||||
guint8 *data;
|
guint8 *data;
|
||||||
guint todo;
|
guint todo;
|
||||||
gsize bsize;
|
gsize bsize;
|
||||||
int read;
|
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
src = GST_RTMP_SRC (pushsrc);
|
src = GST_RTMP_SRC (pushsrc);
|
||||||
@ -342,20 +341,19 @@ gst_rtmp_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
|
|||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
bsize = todo = size;
|
todo = size;
|
||||||
gst_buffer_map (buf, &map, GST_MAP_WRITE);
|
gst_buffer_map (buf, &map, GST_MAP_WRITE);
|
||||||
data = map.data;
|
data = map.data;
|
||||||
read = bsize = 0;
|
bsize = 0;
|
||||||
|
|
||||||
while (todo > 0) {
|
while (todo > 0) {
|
||||||
read = RTMP_Read (src->rtmp, (char *) data, todo);
|
int read = RTMP_Read (src->rtmp, (char *) data, todo);
|
||||||
|
|
||||||
if (G_UNLIKELY (read == 0 && todo == size)) {
|
if (G_UNLIKELY (read == 0 && todo == size))
|
||||||
goto eos;
|
goto eos;
|
||||||
} else if (G_UNLIKELY (read == 0)) {
|
|
||||||
todo = 0;
|
if (G_UNLIKELY (read == 0))
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (G_UNLIKELY (read < 0))
|
if (G_UNLIKELY (read < 0))
|
||||||
goto read_failed;
|
goto read_failed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user