]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtp_mpv.c
Motion Pixels MVI Demuxer.
[ffmpeg] / libavformat / rtp_mpv.c
index 49074c7eeb11a9871e0cc7c0ad10ab47c6cd1505..061eb351924fb1bbd525e4ff7e36e4e1e258762e 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * 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)
@@ -75,7 +76,7 @@ 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;
                         }