Crash when trying to play AVC High Profile video on Android 4.2 (Nexus 7) -


i have ts avc high profile video , not play @ on on android 4.2.
short stream sample available at: vid-avc-hp_aud-mp3.ts

the stream "vid-avc-hp_aud-mp3.ts" played using mediaplayer on such devices:
1. asus transformer tf201 (with android 4.1.1)
2. acer iconia tab a510 (with android 4.1.2)

when try play stream on nexus 7 (with android 4.2.2) using mediaplayer not play @ all. there here crash in logcat:

05-08 14:25:31.275: a/avc_utils(15626): frameworks/av/media/libstagefright/avc_utils.cpp:63 check_eq( br.getbits(1),0u) failed: 1 vs. 0 05-08 14:25:31.275: a/libc(15626): fatal signal 11 (sigsegv) @ 0xdeadbaad (code=1), thread 15666 (timedeventqueue) 

the full logcat nexus 7 available at: logcat_crash

the crash media/libstagefright/avc_utils.cpp @ following function of android sources:

// determine video dimensions sequence parameterset. void findavcdimensions(         const sp<abuffer> &seqparamset, int32_t *width, int32_t *height) {     abitreader br(seqparamset->data() + 1, seqparamset->size() - 1);      unsigned profile_idc = br.getbits(8);     br.skipbits(16);     parseue(&br);  // seq_parameter_set_id      unsigned chroma_format_idc = 1;  // 4:2:0 chroma format      if (profile_idc == 100 || profile_idc == 110             || profile_idc == 122 || profile_idc == 244             || profile_idc == 44 || profile_idc == 83 || profile_idc == 86) {         chroma_format_idc = parseue(&br);         if (chroma_format_idc == 3) {             br.skipbits(1);  // residual_colour_transform_flag         }         parseue(&br);  // bit_depth_luma_minus8         parseue(&br);  // bit_depth_chroma_minus8         br.skipbits(1);  // qpprime_y_zero_transform_bypass_flag         check_eq(br.getbits(1), 0u);  // seq_scaling_matrix_present_flag   //<<-- crash here     }     (...) 

i checked problem playback of avc highprofile transport streams since android 4.2

deeper analysis of stream "vid-avc-hp_aud-mp3.ts" showed issue parser of "sequence parameter set rbsp" avc high profile. "sequence parameter set rbsp" high profile contains additional fields. problem "seq_scaling_matrix_present_flag" , following scaling matrix structure. if "seq_scaling_matrix_present_flag" set 1 - next bytes contain scaling coefficients.

i have following questions:
1. how play ts stream avc high profile video on android?
note: due stream server performance limitations not possible transcode stream lower profile.
2. why android can't parse structure, correct according norm: iso/iec 14496-10?


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -