cbs_h264: Fix handling of unknown SEI
authorMark Thompson <sw@jkqxz.net>
Mon, 7 May 2018 22:05:52 +0000 (23:05 +0100)
committerMark Thompson <sw@jkqxz.net>
Thu, 10 May 2018 21:05:44 +0000 (22:05 +0100)
The user should only interact directly with the data length, not the
payload size.

libavcodec/cbs_h264_syntax_template.c

index 3ec4299..b789207 100644 (file)
@@ -761,8 +761,11 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
         break;
     default:
         {
-            allocate(current->payload.other.data, current->payload_size);
-            for (i = 0; i < current->payload_size; i++)
+#ifdef READ
+            current->payload.other.data_length = current->payload_size;
+#endif
+            allocate(current->payload.other.data, current->payload.other.data_length);
+            for (i = 0; i < current->payload.other.data_length; i++)
                 xu(8, payload_byte[i], current->payload.other.data[i], 0, 255, 1, i);
         }
     }