File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -385,11 +385,14 @@ bool CreateDataProcessJobsReq::GenerateRequestBody(std::string* body) const {
385385 doc.allocate_node (rapidxml::node_element, " Transcode" , NULL );
386386 // time_interval
387387 {
388- rapidxml::xml_node<>* transcode_time_interval_node =
388+ if (!options_.operation .transcode .time_interval .duration .empty () &&
389+ !options_.operation .transcode .time_interval .start .empty ()) {
390+ rapidxml::xml_node<>* transcode_time_interval_node =
389391 doc.allocate_node (rapidxml::node_element, " TimeInterval" , NULL );
390- TAG_STRING_FIELD (transcode_time_interval_node, options_.operation .transcode .time_interval .duration , " Duration" );
391- TAG_STRING_FIELD (transcode_time_interval_node, options_.operation .transcode .time_interval .start , " Start" );
392- operation_transcode_node->append_node (transcode_time_interval_node);
392+ TAG_STRING_FIELD (transcode_time_interval_node, options_.operation .transcode .time_interval .duration , " Duration" );
393+ TAG_STRING_FIELD (transcode_time_interval_node, options_.operation .transcode .time_interval .start , " Start" );
394+ operation_transcode_node->append_node (transcode_time_interval_node);
395+ }
393396 }
394397 // container
395398 {
Original file line number Diff line number Diff line change @@ -1074,7 +1074,6 @@ TEST_F(ObjectOpTest, MediaTest) {
10741074 opt.operation .output .region = m_region;
10751075 opt.operation .output .object = " output/transcode.m3u8" ;
10761076 req.setOperation (opt);
1077- req.setOperation (opt);
10781077 CosResult result = m_client->CreateDataProcessJobs (req, &resp);
10791078 ASSERT_TRUE (result.IsSucc ());
10801079 }
@@ -1104,7 +1103,6 @@ TEST_F(ObjectOpTest, MediaTest) {
11041103 opt.operation .output .region = m_region;
11051104 opt.operation .output .object = " output/transcode.dash" ;
11061105 req.setOperation (opt);
1107- req.setOperation (opt);
11081106 CosResult result = m_client->CreateDataProcessJobs (req, &resp);
11091107 ASSERT_TRUE (result.IsSucc ());
11101108 }
You can’t perform that action at this time.
0 commit comments