summaryrefslogtreecommitdiffstats
path: root/extra/faad2/faad2-2.6.1-broken-pipe.patch
blob: 0b356c92d3c591fad721ab2ecb1c625ee7503e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- faad2/frontend/main.c~	2007-11-01 06:33:29.000000000 -0600
+++ faad2/frontend/main.c	2008-01-03 18:05:10.000000000 -0700
@@ -640,7 +640,8 @@
 
         if ((frameInfo.error == 0) && (frameInfo.samples > 0) && (!adts_out))
         {
-            write_audio_file(aufile, sample_buffer, frameInfo.samples, 0);
+            if (write_audio_file(aufile, sample_buffer, frameInfo.samples, 0) == 0)
+                break;
         }
 
         /* fill buffer */
@@ -976,7 +977,8 @@
 
         if ((frameInfo.error == 0) && (sample_count > 0) && (!adts_out))
         {
-            write_audio_file(aufile, sample_buffer, sample_count, delay);
+            if (write_audio_file(aufile, sample_buffer, sample_count, delay) == 0)
+                break;
         }
 
         if (frameInfo.error > 0)