LibRtmp-Client-for-Android
LibRtmp-Client-for-Android copied to clipboard
RtmpClient.write crashes
I am trying to use RtmpClient.write it crashes saying
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdf in tid 1198 (AsyncTask #3)
This is my code snippet
if (rtmpURL != null && !rtmpURL.isEmpty()) {
try {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... voids) {
Log.d(TAG, "doInBackground execute");
// mRtmpClient.writeVideo(mFrameData,0,mFrameData.length, (int) System.currentTimeMillis());
try {
Uri.Builder builder = Uri.parse(rtmpURL).buildUpon();
builder.appendQueryParameter("live", "1");
Log.d(TAG, "Final URL " + builder.build().toString());
/*mRtmpClient.open(builder.build().toString() + "", PREVIEW_WIDTH, PREVIEW_HEIGHT);
mRtmpClient.writeVideo(mFrameData, 0, mFrameData.length, (int) System.currentTimeMillis());*/
mRtmpLive.open(builder.build().toString(),true);
mRtmpLive.write(mFrameData);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
Log.d(TAG, "OnPost execute");
}
}.execute();
} catch (Exception e) {
e.printStackTrace();
}
}
Please make sure that you use this library as the way LiveVideoBroadcaster uses?
https://github.com/ant-media/LiveVideoBroadcaster
If you have still problem, please let us know.