You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
rtpenc: Write a log message if the max packet size is too small
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -108,8 +108,10 @@ static int rtp_write_header(AVFormatContext *s1)
|
|||||||
NTP_OFFSET_US;
|
NTP_OFFSET_US;
|
||||||
|
|
||||||
max_packet_size = s1->pb->max_packet_size;
|
max_packet_size = s1->pb->max_packet_size;
|
||||||
if (max_packet_size <= 12)
|
if (max_packet_size <= 12) {
|
||||||
|
av_log(s1, AV_LOG_ERROR, "Max packet size %d too low\n", max_packet_size);
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
}
|
||||||
s->buf = av_malloc(max_packet_size);
|
s->buf = av_malloc(max_packet_size);
|
||||||
if (s->buf == NULL) {
|
if (s->buf == NULL) {
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user