fix wrapper

This commit is contained in:
nap.liu 2022-12-16 21:44:54 +08:00
parent d7910422c8
commit 239b6c26d0
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
#########################
pid=$$
stderrfile="/tmp/ffmpeg-$pid.stderr"
stderrfile="/tmp/ffmpeg.stderr"
logfile="/tmp/ffmpeg.log"
#########################
@ -13,7 +13,7 @@ logfile="/tmp/ffmpeg.log"
#########################
function log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$1] $2" >> $logfile
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$pid] [$1] $2" >> $logfile
}
function newline() {
echo "" >> $logfile
@ -30,7 +30,7 @@ function handle_error() {
function endprocess() {
info "========================================[end ffmpeg $pid]"
newline
rm -f "$stderrfile"
# rm -f "$stderrfile"
exit 1
}

View File

@ -13,7 +13,7 @@ logfile="/tmp/gst-launch-1.0.log"
#########################
function log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$1] $2" >> $logfile
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$pid] [$1] $2" >> $logfile
}
function newline() {
echo "" >> $logfile
@ -30,7 +30,7 @@ function handle_error() {
function endprocess() {
info "========================================[end gst-launch $pid]"
newline
# rm -f "$stderrfile"
# rm -f "$stderrfile"
exit 1
}