Skip to content

Commit a711064

Browse files
committed
Report an error instead of waiting for EOS indefinitely in sf2.
Change-Id: Id7bcfb90a3b6a61f0df8bd8f39ea4ffa3c433d87
1 parent ddc421d commit a711064

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmds/stagefright/sf2.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
//#define LOG_NDEBUG 0
18+
#define LOG_TAG "sf2"
19+
#include <utils/Log.h>
20+
1721
#include <binder/ProcessState.h>
1822

1923
#include <media/stagefright/foundation/hexdump.h>
@@ -205,6 +209,12 @@ struct Controller : public AHandler {
205209
}
206210

207211
looper()->stop();
212+
} else if (what == ACodec::kWhatError) {
213+
ALOGE("something went wrong, codec reported an error.");
214+
215+
printf("E\n");
216+
217+
(new AMessage(kWhatStop, id()))->post();
208218
}
209219
break;
210220
}

0 commit comments

Comments
 (0)