| 134 | //----------------------------------------------------------------------------- |
| 135 | |
| 136 | bool OggTheoraDecoder::_detect( ogg_page* startPage ) |
| 137 | { |
| 138 | _setStartPage( startPage ); |
| 139 | |
| 140 | // Read first header packet. |
| 141 | |
| 142 | ogg_packet nextPacket; |
| 143 | if( !_readNextPacket( &nextPacket ) |
| 144 | || th_decode_headerin( &mTheoraInfo, &mTheoraComment, &mTheoraSetup, &nextPacket ) < 0 ) |
| 145 | { |
| 146 | th_comment_clear( &mTheoraComment ); |
| 147 | th_info_clear( &mTheoraInfo ); |
| 148 | |
| 149 | return false; |
| 150 | } |
| 151 | |
| 152 | return true; |
| 153 | } |
| 154 | |
| 155 | //----------------------------------------------------------------------------- |
| 156 |
no test coverage detected