rtptheorapay: If flushing a packet failed, go out of the loop immediately

This commit is contained in:
Sebastian Dröge 2015-08-08 17:42:22 +02:00
parent 4957cc7459
commit c8551b6285

View file

@ -651,6 +651,9 @@ gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
if (flush)
ret = gst_rtp_theora_pay_flush_packet (rtptheorapay);
if (ret != GST_FLOW_OK)
goto done;
/* create new packet if we must */
if (!rtptheorapay->packet) {
gst_rtp_theora_pay_init_packet (rtptheorapay, TDT, timestamp);
@ -720,10 +723,11 @@ gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
if (duration != GST_CLOCK_TIME_NONE)
rtptheorapay->payload_duration += duration;
}
} while (size);
} while (size && ret == GST_FLOW_OK);
if (rtp.buffer)
gst_rtp_buffer_unmap (&rtp);
done:
return ret;
}