gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9584: Make sure a valid pointer to t


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9584: Make sure a valid pointer to the header is returned.
Date: Wed, 13 Aug 2008 16:29:53 -0600
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9584
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2008-08-13 16:29:53 -0600
message:
  Make sure a valid pointer to the header is returned.
modified:
  utilities/flvdumper.cpp
=== modified file 'utilities/flvdumper.cpp'
--- a/utilities/flvdumper.cpp   2008-08-08 18:10:21 +0000
+++ b/utilities/flvdumper.cpp   2008-08-13 22:29:53 +0000
@@ -184,7 +184,12 @@
            Buffer buf;
             // Read just the initial 9 byte header
            ifs.read(reinterpret_cast<char *>(buf.reference()), 
sizeof(Flv::flv_header_t));
+           log_debug("header is: %s",  hexify(buf.reference(), 9, false));
            head  = flv.decodeHeader(&buf);
+           if (head == 0) {
+               log_error("Couldn't decode the header! %s",  
hexify(buf.reference(), 9, false));
+               exit(-1);
+           }
            if ((head->type & Flv::FLV_VIDEO) && (head->type & Flv::FLV_AUDIO)) 
{
                 cout <<"FLV File type: Video and Audio" << endl;
             } else if (head->type && Flv::FLV_VIDEO) {
@@ -195,7 +200,7 @@
            
            cout << "FLV Version: " << int(head->version) << " (should always 
be 1)" << endl;
            boost::uint32_t headsize = flv.convert24(head->head_size);
-           if (all) {   
+           if (all) {
                cout << "FLV Header size: " << headsize << " (should always be 
9)" << endl;
            }
             // Extract all the Tags


reply via email to

[Prev in Thread] Current Thread [Next in Thread]