Make is_obu_in_current_operating_point match spec

Make the is_obu_in_current_operating_point() function match the spec.
The corresponding part of the spec is the following in Section 5.3.1
(General OBU syntax):

    if ( obu_type != OBU_SEQUENCE_HEADER &&
        obu_type != OBU_TEMPORAL_DELIMITER &&
        OperatingPointIdc != 0 &&
        obu_extension_flag == 1 )
    {
        inTemporalLayer = (OperatingPointIdc >> temporal_id ) & 1
        inSpatialLayer = (OperatingPointIdc >> ( spatial_id + 8 ) ) & 1
        if ( !inTemporalLayer || ! inSpatialLayer ) {
            drop_obu( )
            return
        }
    }

Also pass obu_header to is_obu_in_current_operating_point() by reference
instead of by value.

BUG=aomedia:2794

Change-Id: Id4cb85fdc23eed6c1fb6c01b3bdf93cbecff4ceb
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 161a33e..82ee3af 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -52,13 +52,13 @@
 }
 
 static int is_obu_in_current_operating_point(AV1Decoder *pbi,
-                                             ObuHeader obu_header) {
-  if (!pbi->current_operating_point) {
+                                             const ObuHeader *obu_header) {
+  if (!pbi->current_operating_point || !obu_header->has_extension) {
     return 1;
   }
 
-  if ((pbi->current_operating_point >> obu_header.temporal_layer_id) & 0x1 &&
-      (pbi->current_operating_point >> (obu_header.spatial_layer_id + 8)) &
+  if ((pbi->current_operating_point >> obu_header->temporal_layer_id) & 0x1 &&
+      (pbi->current_operating_point >> (obu_header->spatial_layer_id + 8)) &
           0x1) {
     return 1;
   }
@@ -902,10 +902,9 @@
     cm->spatial_layer_id = obu_header.spatial_layer_id;
 
     if (obu_header.type != OBU_TEMPORAL_DELIMITER &&
-        obu_header.type != OBU_SEQUENCE_HEADER &&
-        obu_header.type != OBU_PADDING) {
+        obu_header.type != OBU_SEQUENCE_HEADER) {
       // don't decode obu if it's not in current operating mode
-      if (!is_obu_in_current_operating_point(pbi, obu_header)) {
+      if (!is_obu_in_current_operating_point(pbi, &obu_header)) {
         data += payload_size;
         continue;
       }