I have corrupted video stream with this header / parameters in the beginning.
00 00 00 01 67 64 00 1E AC D9 40 B0 33 FB C0 44 00 00 03 00 04 00 00 03 00
If frame_cropping_flag is 1, to get the dimensions you do:
width = ((pic_width_in_mbs_minus1 +1)*16) - frame_crop_left_offset*2 - frame_crop_right_offset*2; height= ((2 - frame_mbs_only_flag)* (pic_height_in_map_units_minus1 +1) * 16) - (frame_crop_top_offset * 2) - (frame_crop_bottom_offset * 2)