/*
* RTP packetization for MPEG video
* Copyright (c) 2002 Fabrice Bellard.
+ * Copyright (c) 2007 Luca Abeni.
*
* This file is part of FFmpeg.
*
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#include "libavcodec/mpegvideo.h"
#include "avformat.h"
#include "rtp_internal.h"
-#include "mpegvideo.h"
-
/* NOTE: a single frame must be passed with sequence header if
needed. XXX: use slices. */
void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
}
r1 = r;
} else {
- if (r - r1 < max_packet_size) {
+ if (r - r1 < max_packet_size - 4) {
len = r1 - buf1 - 4;
end_of_slice = 1;
}