mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
rtptheorapay: If flushing a packet failed, go out of the loop immediately
This commit is contained in:
parent
4957cc7459
commit
c8551b6285
1 changed files with 5 additions and 1 deletions
|
@ -651,6 +651,9 @@ gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
|
||||||
if (flush)
|
if (flush)
|
||||||
ret = gst_rtp_theora_pay_flush_packet (rtptheorapay);
|
ret = gst_rtp_theora_pay_flush_packet (rtptheorapay);
|
||||||
|
|
||||||
|
if (ret != GST_FLOW_OK)
|
||||||
|
goto done;
|
||||||
|
|
||||||
/* create new packet if we must */
|
/* create new packet if we must */
|
||||||
if (!rtptheorapay->packet) {
|
if (!rtptheorapay->packet) {
|
||||||
gst_rtp_theora_pay_init_packet (rtptheorapay, TDT, timestamp);
|
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)
|
if (duration != GST_CLOCK_TIME_NONE)
|
||||||
rtptheorapay->payload_duration += duration;
|
rtptheorapay->payload_duration += duration;
|
||||||
}
|
}
|
||||||
} while (size);
|
} while (size && ret == GST_FLOW_OK);
|
||||||
|
|
||||||
if (rtp.buffer)
|
if (rtp.buffer)
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
gst_rtp_buffer_unmap (&rtp);
|
||||||
|
done:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue