Skip to content

Commit

Permalink
Renamed field "audioWriter" to "audioExtractor"
Browse files Browse the repository at this point in the history
  • Loading branch information
flagbug committed Mar 9, 2012
1 parent 2ad9bc5 commit 40719fb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions YoutubeExtractor/YoutubeExtractor/FlvFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class FlvFile : IDisposable
private FileStream fileStream;
private long fileOffset;
private readonly long fileLength;
IAudioExtractor audioWriter;
IAudioExtractor audioExtractor;
private readonly string outputPath;

public event EventHandler<ProgressEventArgs> ConversionProgressChanged;
Expand Down Expand Up @@ -74,19 +74,19 @@ public void ExtractStreams()

private void CloseOutput(bool disposing)
{
if (this.audioWriter != null)
if (this.audioExtractor != null)
{
if (disposing && (this.audioWriter.Path != null))
if (disposing && (this.audioExtractor.Path != null))
{
try
{
File.Delete(this.audioWriter.Path);
File.Delete(this.audioExtractor.Path);
}
catch { }
}

this.audioWriter.Dispose();
this.audioWriter = null;
this.audioExtractor.Dispose();
this.audioExtractor = null;
}
}

Expand Down Expand Up @@ -116,18 +116,18 @@ private bool ReadTag()
if (tagType == 0x8)
{
// If we have no audio writer, create one
if (this.audioWriter == null)
if (this.audioExtractor == null)
{
this.audioWriter = this.GetAudioWriter(mediaInfo);
this.ExtractedAudio = this.audioWriter != null;
this.audioExtractor = this.GetAudioWriter(mediaInfo);
this.ExtractedAudio = this.audioExtractor != null;
}

if (this.audioWriter == null)
if (this.audioExtractor == null)
{
throw new InvalidOperationException();
}

this.audioWriter.WriteChunk(data, timeStamp);
this.audioExtractor.WriteChunk(data, timeStamp);
}

return true;
Expand Down

0 comments on commit 40719fb

Please sign in to comment.