[1.0.12] set pipeline state to null to destroy 44/285044/1 accepted/tizen/unified/20221209.014550
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 5 Dec 2022 08:11:08 +0000 (17:11 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 5 Dec 2022 08:11:10 +0000 (17:11 +0900)
- set pipeline state to null even if the start() has failed
  to release pipeline resources.

Change-Id: I98a85a2962de94cade167a63dac989a7532abc79

packaging/capi-media-transporter.spec
src/MediaTransporterBase.cpp
src/MediaTransporterSenderRtsp.cpp

index 278b5ea..71e31e7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-transporter
 Summary:    A Media Transporter library in Tizen Native API
-Version:    1.0.11
+Version:    1.0.12
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 7bba9bb..f483cb4 100644 (file)
@@ -131,10 +131,8 @@ void MediaTransporterBase::start()
 void MediaTransporterBase::stopInternal()
 {
        try {
-               if (_state != MTPR_STATE_IDLE) {
-                       stopPipeline();
-                       _state = MTPR_STATE_IDLE;
-               }
+               stopPipeline();
+               _state = MTPR_STATE_IDLE;
        } catch (const MediaTransporterException& e) {
                LOG_ERROR("%s", e.what());
                throw;
index 5a62024..67f5c31 100644 (file)
@@ -184,10 +184,7 @@ void MediaTransporterSenderRtsp::startRtspServer()
 
 void MediaTransporterSenderRtsp::stopRtspServer()
 {
-       if (!_rtspServer) {
-               LOG_ERROR("there is no running server");
-               throw MediaTransporterException(MTPR_ERROR_INVALID_OPERATION, "there is no running server");
-       }
+       RET_IF(!_rtspServer, "there is no running server");
 
        GstRTSPServer* server = static_cast<GstRTSPServer*>(_rtspServer);
        GstRTSPMountPoints* mounts = gst_rtsp_server_get_mount_points(server);