Skip to content

Commit

Permalink
HLS: use ffmpeg with -nostdin argument to ignore stdin
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed Dec 30, 2024
1 parent 99e0e42 commit 4ddb97b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ff_decode (const string& filename, WavData& out_wav_data)
if (!tmp_file)
return Error ("failed to create temp file");

Error err = run ({"ffmpeg", "-v", "error", "-y", "-f", "mpegts", "-i", filename, "-f", "wav", tmp_file_name});
Error err = run ({"ffmpeg", "-v", "error", "-nostdin", "-y", "-f", "mpegts", "-i", filename, "-f", "wav", tmp_file_name});
if (err)
return err;

Expand Down Expand Up @@ -294,7 +294,7 @@ bit_rate_from_m3u8 (const string& m3u8, const WavData& wav_data, int& bit_rate)
if (!tmp_file)
return Error ("failed to create temp file");

Error err = run ({"ffmpeg", "-v", "error", "-y", "-i", m3u8, "-c:a", "copy", "-f", "adts", tmp_file_name});
Error err = run ({"ffmpeg", "-v", "error", "-nostdin", "-y", "-i", m3u8, "-c:a", "copy", "-f", "adts", tmp_file_name});
if (err)
return err;

Expand All @@ -319,7 +319,7 @@ load_audio_master (const string& filename, WavData& audio_master_data)
return Error ("failed to create temp file");

/* extract wav */
Error err = run ({"ffmpeg", "-v", "error", "-y", "-i", filename, "-f", "wav", tmp_file_name});
Error err = run ({"ffmpeg", "-v", "error", "-nostdin", "-y", "-i", filename, "-f", "wav", tmp_file_name});
if (err)
return err;

Expand Down

0 comments on commit 4ddb97b

Please sign in to comment.