videotoolbox: reordering of frames is wrong when video playback for some files
I noticed that with a specific set of files I get very choppy playback in VLC, in other players, like mplayer/mpv it works fine though. It seems it's related to videotoolbox, as using avcodec I have no problems with choppy playback.
Media info (obtained with mediainfo):
General
Format : Matroska
Format version : Version 1
Overall bit rate : 1 786 Kbps
Encoded date : UTC 2010-01-12 01:44:43
Writing application : VirtualDubMod 1.5.4.1 (build 2128/release)
Writing library : libebml-0.5.0 & libmatroska-0.5.0
ErrorDetectionType : Per level 1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Format settings, GOP : N=1
Codec ID : V_MS/VFW/FOURCC / H264
Duration : 20mn 19s
Bit rate : 1 558 Kbps
Width : 736 pixels
Height : 544 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.156
Stream size : 222 MiB (85%)
Writing library : x264 core 58 svn-736bm
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x131 / me=hex / subme=5 / brdo=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=2 / nr=0 / decimate=1 / mbaff=0 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / bime=0 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=1558 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 20mn 19s
Bit rate mode : Constant
Bit rate : 224 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Frame rate : 31.250 fps (1536 spf)
Compression mode : Lossy
Stream size : 32.6 MiB (13%)
Language : English
Default : Yes
Forced : No
Menu
00:00:00.000 : Ch. 01 @ 00:00:00
00:02:29.400 : Ch. 02 @ 00:02:29
00:19:44.400 : Ch. 03 @ 00:19:44
Sample will be uploaded to streams.v.o.