[Galaxy Tab 2 7" Android Development] Tsjoklat:
Thank you. Now I am sure it is software related. It looks like a buffer overflow of some kind. I am going to test video streams to try and find more info to track this down. This is the second time I rebuilt my tab because of this. Any help is appreciated.

Edit:

Upon further testing, I have found that this problem does not occur when I re-encode the mp4's that I download. This is the file information of a non-working video file:

MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team

Playing The.Colbert.Report.2012.06.26.Richard.Ford.HDTV.x264-LMAO.[VTV].mp4.
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 720x404 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=The.Colbert.Report.2012.06.26.Richard.Ford.HDTV.x264-LMAO.[VTV].mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=avc1
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=404
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=255
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=1289.56
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad
Starting playback...
VDec: vo config request - 720 x 404 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7822
VO: [xv] 720x404 => 720x404 Planar YV12
A: 1.8 V: 1.8 A-V: -0.000 ct: 0.022 0/ 0 16% 1% 0.7% 0 0
Exiting... (Quit)
ID_EXIT=QUIT

Here is the file information of a working video file with almost the exact same specs:

Playing The.Colbert.Report.2012.06.26.Richard.Ford.HDTV.x264-LMAO.[VTV].ENC.mp4.
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 720x404 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=The.Colbert.Report.2012.06.26.Richard.Ford.HDTV.x264-LMAO.[VTV].ENC.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=avc1
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=404
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=255
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=1289.47
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad
Starting playback...
VDec: vo config request - 720 x 404 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7822
VO: [xv] 720x404 => 720x404 Planar YV12
A: 4.4 V: 4.4 A-V: 0.000 ct: 0.021 0/ 0 8% 1% 0.6% 0 0
Exiting... (Quit)
ID_EXIT=QUIT

Notice that there is only one value that differs from these two files:

One file is ID_LENGTH=1289.56 and one file is ID_LENGTH=1289.47. So, there is a bug in the sections parser? When the video is re-encoded, the framerate/bitrate now becomes constant (which masks the problem). I think the problem has to do with the firmware not being able to handle the variation in the framerate/bitrate of the video.

This is how I re-encoded to fix the buffer overflow:

mencoder "$FILE" -o "$NOEXT".ENC.mp4 -sub "$NOEXT".srt -subcp cp1252 -utf8 -vf scale=1024:600::::::1,harddup -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=mp4 -ovc x264 -x264encopts bitrate=832:nocabac:level_idc=30:bframes=0:threads=auto:turbo=0:global_header:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh -fontconfig -font "Trebuchet MS" -subfont-outline 1 -subfont-text-scale 2 -sub-bg-alpha 0 -subfont-blur 0.5 -sub-bg-color 0 -subpos 99 -subalign 2

Best Regards.