OSDN Git Service

Fix a typo in rtp_h264.c:parse_h264_sdp_line(). Patch by Gordon Irlam
authorGordon Irlam <>
Thu, 5 Nov 2009 14:25:37 +0000 (14:25 +0000)
committerLuca Abeni <lucabe72@email.it>
Thu, 5 Nov 2009 14:25:37 +0000 (14:25 +0000)
(gordonipub2 AT gordoni DOT com).

This fixes H.264 over RTP when the SDP contains a "framesize:" attribute
(for example, rtsp://video3.americafree.tv/AFTVCartoonsH264250.sdp )

Originally committed as revision 20463 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtp_h264.c

index fb7891d..bc47078 100644 (file)
@@ -368,7 +368,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
         while (*p && *p == ' ') p++; // strip spaces.
         while (*p && *p != ' ') p++; // eat protocol identifier
         while (*p && *p == ' ') p++; // strip trailing spaces.
-        while (*p && *p != '-' && (buf1 - dst) < sizeof(buf1) - 1) {
+        while (*p && *p != '-' && (dst - buf1) < sizeof(buf1) - 1) {
             *dst++ = *p++;
         }
         *dst = '\0';