Fixed crash when start transcoding 68/42968/1
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 6 Jul 2015 11:27:12 +0000 (20:27 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 6 Jul 2015 11:27:12 +0000 (20:27 +0900)
Change-Id: Id21069c5a337c01969e39331f591a420d0fd1c8d
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
transcode/mm_transcode.c

index e1c7346..bf3f917 100755 (executable)
@@ -111,15 +111,15 @@ mm_audioencoder_e audioencoder)
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
-       debug_log("%s== %s", handle->property->sourcefile, in_Filename);
-       if(0 == strlen(handle->property->sourcefile) || 0 == strcmp(handle->property->sourcefile, in_Filename)) { /* protect the case of changing input file during transcoding */
-               /* set element*/
-               ret = _mm_transcode_set_handle_element(handle, in_Filename, containerformat, videoencoder, audioencoder);
-               if(ret != MM_ERROR_NONE) {
-                       debug_error("ERROR -Set element");
-                       return ret;
-               }
+       /* set element*/
+       ret = _mm_transcode_set_handle_element(handle, in_Filename, containerformat, videoencoder, audioencoder);
+       if(ret != MM_ERROR_NONE) {
+               debug_error("ERROR -Set element");
+               return ret;
+       }
 
+       debug_log("%s == %s", handle->property->sourcefile, in_Filename);
+       if(0 == strlen(handle->property->sourcefile) || 0 == strcmp(handle->property->sourcefile, in_Filename)) { /* protect the case of changing input file during transcoding */
                /* setup */
                ret = _mm_setup_pipeline(handle);
                if(ret == MM_ERROR_NONE) {