Fixup! [M120 Migration][MPEG-H][Hbbtv][MSE] Add proper demuxing for MPEG-H codec 08/308408/3
authorwuxiaoliang <xliang.wu@samsung.com>
Tue, 19 Mar 2024 07:14:29 +0000 (15:14 +0800)
committerBot Blink <blinkbot@samsung.com>
Tue, 26 Mar 2024 04:18:34 +0000 (04:18 +0000)
patch 290424 is merged in tizen.beta, side data get method is changed,
and it just comment it for build.
now add the right method to fill side data.

Change-Id: I55e6036c9d227fdce0aa56cd5873bb6c9e515a8b
Signed-off-by: wuxiaoliang <xliang.wu@samsung.com>
media/filters/source_buffer_range.cc

index b5e8f47..d44518e 100644 (file)
@@ -230,14 +230,20 @@ void SourceBufferRange::ModifyFirstFrameForMpeghCodec() {
   // Creating new buffer based on changed data
   auto new_buffer = StreamParserBuffer::CopyFrom(
       &(new_data.front()), new_data.size(),
-#if !defined(EWK_BRINGUP)  // FIXME: m120 bringup (Removed in Open Source)
-      buffers_[next_buffer_index_]->side_data(),
-      buffers_[next_buffer_index_]->side_data_size(),
-#endif
       buffers_[next_buffer_index_]->is_key_frame(),
       buffers_[next_buffer_index_]->type(),
       buffers_[next_buffer_index_]->track_id());
 
+  // set side_data/alpha_data for new buffer
+  if (buffers_[next_buffer_index_]->has_side_data()) {
+    auto side_data = buffers_[next_buffer_index_]->side_data();
+    if (!side_data->alpha_data.empty()) {
+      new_buffer->WritableSideData().alpha_data.assign(
+          side_data->alpha_data.data(),
+          side_data->alpha_data.data() + side_data->alpha_data.size());
+    }
+  }
+
   // Setting other necessary data not copied by previous function
   new_buffer->SetConfigId(buffers_[next_buffer_index_]->GetConfigId());
   new_buffer->SetDecodeTimestamp(