Change time scale in media packet when use video stream callback 96/55196/1 accepted/tizen/mobile/20151223.105632 accepted/tizen/tv/20151223.105544 accepted/tizen/wearable/20151223.105609 submit/tizen/20151223.055703 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 22 Dec 2015 10:47:54 +0000 (19:47 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 22 Dec 2015 10:47:54 +0000 (19:47 +0900)
Change-Id: I4e667b19da755cc5ebf1d43bdcff67718d0e6151
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
src/player.c

index 6ff29d38c1fc29420c92a2d88e0d4f764aa4369e..a3b92cedf1afd32d6ea198cdaf8aaf2bdcbb3fcc 100644 (file)
@@ -947,15 +947,17 @@ static bool __video_stream_callback(void *stream, void *user_data)
                }
 
                if (pkt) {
-                       /*LOGD("media packet %p, internal buffer %p", pkt, stream->internal_buffer); */
+                       /* LOGD("media packet %p, internal buffer %p", pkt, stream->internal_buffer); */
                        if (video_stream->timestamp) {
-                               ret = media_packet_set_pts(pkt, video_stream->timestamp);
+                               ret = media_packet_set_pts(pkt, (uint64_t)video_stream->timestamp * 1000000);
                                if (ret != MEDIA_PACKET_ERROR_NONE) {
                                        LOGE("media_packet_set_pts failed");
 
                                        media_packet_destroy(pkt);
                                        pkt = NULL;
                                }
+                       } else {
+                               LOGD("media packet %p, didn't have video-stream timestamp", pkt);
                        }
 
                        /* set internal buffer */