Skip to content

Commit

Permalink
fix s3 upload issues
Browse files Browse the repository at this point in the history
  • Loading branch information
USAMAWIZARD committed Jan 16, 2025
1 parent f946cc4 commit ecdbbbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/io/antmedia/muxer/HLSMuxer.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ public void createID3StreamIfRequired() {
*/
@Override
public synchronized void writeTrailer() {
if(!isRunning.get())
return;

super.writeTrailer();

if (StringUtils.isBlank(this.httpEndpoint))
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/io/antmedia/muxer/RecordMuxer.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public void setPreviewPath(String path){
*/
@Override
public synchronized void writeTrailer() {
if(!isRunning.get())
return;

super.writeTrailer();

Expand Down Expand Up @@ -158,7 +160,7 @@ public synchronized void writeTrailer() {
if (appSettings.isS3RecordingEnabled() && this.uploadMP4ToS3 ) {
logger.info("Storage client is available saving {} to storage", f.getName());

saveToStorage(s3FolderPath + File.separator + (subFolder != null ? subFolder + File.separator : "" ), f, f.getName(), storageClient);
saveToStorage(getS3Prefix(s3FolderPath,subFolder), f, f.getName(), storageClient);
}

} catch (Exception e) {
Expand Down

0 comments on commit ecdbbbf

Please sign in to comment.