From 7df85f15d576689b98c93e29cfd8df7080c47fd5 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Mon, 4 Jan 2016 19:01:30 +0900 Subject: [PATCH] Change time scale ms to ns using push media stream Change-Id: I3f03a05dc7eb37459d891a6417c53170db6da178 Signed-off-by: Gilbok Lee --- test/legacy_player_es_push_test.c | 2 +- test/legacy_player_test.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/legacy_player_es_push_test.c b/test/legacy_player_es_push_test.c index 524c753..08dbc3e 100644 --- a/test/legacy_player_es_push_test.c +++ b/test/legacy_player_es_push_test.c @@ -396,7 +396,7 @@ static bool feed_video_data(appdata_s *appdata) goto ERROR; } - if (media_packet_set_pts(ad->video_pkt, (uint64_t)(pts / 1000000)) != MEDIA_PACKET_ERROR_NONE) { + if (media_packet_set_pts(ad->video_pkt, (uint64_t)pts) != MEDIA_PACKET_ERROR_NONE) { LOGE("media_packet_set_pts failed\n"); goto ERROR; } diff --git a/test/legacy_player_test.c b/test/legacy_player_test.c index 3be9cf7..bae17b9 100644 --- a/test/legacy_player_test.c +++ b/test/legacy_player_test.c @@ -499,7 +499,7 @@ static void buffer_need_video_data_cb(unsigned int size, void *user_data) if (media_packet_get_buffer_data_ptr(g_video_pkt, &src) != MEDIA_PACKET_ERROR_NONE) goto EXIT; - if (media_packet_set_pts(g_video_pkt, (uint64_t) (pts / 1000000)) != MEDIA_PACKET_ERROR_NONE) + if (media_packet_set_pts(g_video_pkt, (uint64_t)pts) != MEDIA_PACKET_ERROR_NONE) goto EXIT; if (media_packet_set_buffer_size(g_video_pkt, (uint64_t) real_read_len) != MEDIA_PACKET_ERROR_NONE) @@ -573,7 +573,7 @@ static void buffer_need_audio_data_cb(unsigned int size, void *user_data) if (media_packet_get_buffer_data_ptr(g_audio_pkt, &src) != MEDIA_PACKET_ERROR_NONE) goto EXIT; - if (media_packet_set_pts(g_audio_pkt, (uint64_t) (audio_pts / 1000000)) != MEDIA_PACKET_ERROR_NONE) + if (media_packet_set_pts(g_audio_pkt, (uint64_t)audio_pts) != MEDIA_PACKET_ERROR_NONE) goto EXIT; if (media_packet_set_buffer_size(g_audio_pkt, (uint64_t) real_read_len) != MEDIA_PACKET_ERROR_NONE) -- 2.7.4