[rtmpdump] patch: Stream does not start with requested frame, ignoring data

Peter Miller pmiller at opensource.org.au
Sat Apr 9 04:35:12 CEST 2011


This patch adds more information to the "Stream does not start with
requested frame, ignoring data" warning message, including the
presence/absence of key frames, and the packet type name when it isn't a
flash video packet.

I added this to track down a problem I'm having, where rtmpdump fails to
resume.  It turns out that the server is sending RTMP_PACKET_TYPE_AUDIO
and RTMP_PACKET_TYPE_VIDEO packets (and the video packets *do* contain a
key frame), rather than librtmp/rtmp.c Read_1_packet()'s expectation of
an RTMP_PACKET_TYPE_FLASH_VIDEO frame.  

Howard, what would be your preferred way to handle this case?


-- 
Regards
Peter Miller <pmiller at opensource.org.au>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"Real Programmers always confuse Christmas and Halloween
because Oct31 == Dec25." -- Andrew Rutherford
-------------- next part --------------
MIME-Version: 1.0
Content-Type: application/aegis-patch
Subject: rtmpdump.2.3 - Stream does not start with requested frame, ignoring data
Content-Name: rtmpdump.2.3.C026.patch
Content-Disposition: attachment; filename=rtmpdump.2.3.C026.patch
X-Aegis-Project-Name: rtmpdump.2.3
X-Aegis-Change-Number: 26

#	
#	This change set adds more information to the "Stream does not start
#	with requested frame, ignoring data" warning message, including the
#	presence/absence of key frames, and the packet type name when it isn't
#	a flash video packet.
#	
# Aegis-Change-Set-Begin
# QlpoMzFBWSZTWXdauacAAH1bgAAQUIf/6gwOv+//6kABvTpgcNTVPyTym1RsqN5UeiNpPU9E
# A0AMAA0aaAMmgNBkBoER6hT1MBPRGJhGRjSMJkBKEaCmEeplPU9ImaQxMAPUmQ+maGygMsUO
# fbzP8QRV90VSsvfvPM/tTaaVpXd4yR7iBD3L0BIwR1vjCK1YxzsJ4lptSJB/6koLlw4h6jDo
# xZ3z5SfTS5zuZJVNvaSnoC3oZErao3qoaNA3H0CBwGdkhExGMg3kloBKZWFn0FC2qSIEN6k8
# ldJfZSBD7hHOLiuFgfPZlfu2dPC75xKnLxjtCOoOo1MHCHT4UcUzaesvP8YStYp5b+vvxMIs
# COtNcDru0cWwE6pT9H4loFicimZGJFlim8lsS0RqY8e3PXXoVMmQ5KrD7zHpZOe3LPM1boxO
# /Rpq5wldFQwc1iYFt5Br7eHEk5VQh2NRLyjpqirgtLTclRURX7Bxx1r12HdDKORZTG6JM8d7
# QCpeVSmk8DWpx4R5SMxbspqeEppjnNMMWGpOGEHnDF0GGYuT7Z8BshcyqbhUvZiG7Ral6LeW
# pcPsWZIr0un4YnC+fFi0auoQDS6R+LuSKcKEg7rVzTg=
# Aegis-Change-Set-End
#
Index: librtmp/rtmp.c
--- librtmp/rtmp.c
+++ librtmp/rtmp.c
@@ -4007,8 +4007,20 @@
 	  if (!(r->m_read.flags & RTMP_READ_GOTKF) &&
 	  	packet.m_packetType != RTMP_PACKET_TYPE_FLASH_VIDEO)
 	    {
-	      RTMP_Log(RTMP_LOGWARNING,
-		  "Stream does not start with requested frame, ignoring data... ");
+              if (packet.m_packetType == RTMP_PACKET_TYPE_VIDEO)
+                {
+                  RTMP_Log(RTMP_LOGWARNING,
+                           "Stream does not start with requested frame "
+                           "(packet does not contain a key frame), "
+                           "ignoring data...");
+                }
+              else
+                {
+                  RTMP_Log(RTMP_LOGWARNING,
+                           "Stream does not start with requested frame "
+                           "(packet is %s), ignoring data...",
+                           rtmp_packet_type_name(packet.m_packetType));
+                }
 	      r->m_read.nIgnoredFrameCounter++;
 	      if (r->m_read.nIgnoredFrameCounter > MAX_IGNORED_FRAMES)
 		ret = RTMP_READ_ERROR;	/* fatal error, couldn't continue stream */
@@ -4020,8 +4032,20 @@
 	  if (!(r->m_read.flags & RTMP_READ_GOTFLVK) &&
 	  	packet.m_packetType == RTMP_PACKET_TYPE_FLASH_VIDEO)
 	    {
-	      RTMP_Log(RTMP_LOGWARNING,
-		  "Stream does not start with requested FLV frame, ignoring data... ");
+              if (packet.m_packetType == RTMP_PACKET_TYPE_FLASH_VIDEO)
+                {
+                  RTMP_Log(RTMP_LOGWARNING,
+                           "Stream does not start with requested frame "
+                           "(FLV packet does not contain a key frame), "
+                           "ignoring data...");
+                }
+              else
+                {
+                  RTMP_Log(RTMP_LOGWARNING,
+                           "Stream does not start with requested FLV frame "
+                           "(packet is %s), ignoring data...",
+                           rtmp_packet_type_name(packet.m_packetType));
+                }
 	      r->m_read.nIgnoredFlvFrameCounter++;
 	      if (r->m_read.nIgnoredFlvFrameCounter > MAX_IGNORED_FRAMES)
 		ret = RTMP_READ_ERROR;


More information about the rtmpdump mailing list