Set PTS in media packet when use video stream callback 99/52099/1 accepted/tizen/mobile/20151119.232026 accepted/tizen/tv/20151119.232039 accepted/tizen/wearable/20151119.232054 submit/tizen/20151119.083029
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 19 Nov 2015 05:31:46 +0000 (14:31 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 19 Nov 2015 05:31:46 +0000 (14:31 +0900)
Change-Id: I1cb8cffce84208c53f33336ebd8677c4271691e1
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
packaging/legacy-capi-media-player.spec
src/player.c

index a227474..0d07160 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       legacy-capi-media-player
 Summary:    A Media Player library in Tizen Native API
-Version:    0.2.5
+Version:    0.2.6
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index aa2f3ca..8ebc11b 100644 (file)
@@ -997,6 +997,15 @@ static bool  __video_stream_callback(void *stream, void *user_data)
 
                if (pkt) {
                        /*LOGD("media packet %p, internal buffer %p", pkt, stream->internal_buffer);*/
+                       if (video_stream->timestamp) {
+                               ret = media_packet_set_pts(pkt, video_stream->timestamp);
+                               if (ret != MEDIA_PACKET_ERROR_NONE) {
+                                       LOGE("media_packet_set_pts failed");
+
+                                       media_packet_destroy(pkt);
+                                       pkt = NULL;
+                               }
+                       }
 
                        /* set internal buffer */
                        if (video_stream->internal_buffer)