fix up! Add video meta for video encoder 12/301412/1 accepted/tizen/unified/20231116.160816 accepted/tizen/unified/20231116.175517
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 15 Nov 2023 06:19:05 +0000 (15:19 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 15 Nov 2023 10:14:27 +0000 (19:14 +0900)
The invalid caps could be set for first input buffer.
This patch updates caps correctly before make first input buffer.

[Version] 0.6.39
[Issue Type] Bug fix

Change-Id: I31c07c8d0de5f16726d2a6861f011524373c13f7
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-codec.spec
src/media_codec_port_gst.c

index 39c7dfc..5f2fc05 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:       capi-media-codec
 Summary:    A Media Codec library in Tizen Native API
-Version:    0.6.38
+Version:    0.6.39
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index efafe39..dc9701e 100644 (file)
@@ -1276,8 +1276,13 @@ static gpointer feed_task(gpointer data)
 
                media_packet_get_format(input_buffer,  &format);
                if (format) {
-                       if (_mc_update_packet_info(core, format))
+                       if (_mc_update_packet_info(core, format)) {
                                is_format_change = TRUE;
+                               if (!core->mc_caps_new(core, core->codec_id, in_port_index)) {
+                                       LOGE("caps new failed");
+                                       goto ERROR;
+                               }
+                       }
                        media_format_unref(format);
                }
 
@@ -1331,11 +1336,6 @@ static gpointer feed_task(gpointer data)
                }
 
                if (is_format_change) {
-                       if (!core->mc_caps_new(core, core->codec_id, in_port_index)) {
-                               LOGE("caps new failed");
-                               goto ERROR;
-                       }
-
                        g_object_set(core->appsrc, "caps", core->caps, NULL);
 
                        if (core->encoder) {